147148149150151152153154155156
@Override public void addChangeListenerAndPopulate(IEventHandler listener) { synchronized(this) { for(IWebHost wh: getAllWebHosts()) { listener.handleEvent(new NewWebEntityEvent(wh)); } eventManager.addListener(listener); } }
159160161162163164165
public void removeChangeListener(IEventHandler listener) { eventManager.removeListener(listener); } private void notifyNewEntity(IWebEntity entity) { eventManager.fireEvent(new NewWebEntityEvent(entity)); }
146147148149150151152
return database; } void notifyNewEntity(IWebEntity entity) { if(eventManager != null) eventManager.fireEvent(new NewWebEntityEvent(entity)); }