protected void notifyEventListeners( final Event<?> event ) { eventBus.post( event ); }
public void clearCache() { configuration = null; // fire clear cache event this.eventBus.post( new LdapClearCacheEvent( null ) ); }
private void fireAuthorizationChangedEvent() { this.eventBus.post( new AuthorizationConfigurationChanged() ); }
@AllowConcurrentEvents @Subscribe public void on( final AuthorizationConfigurationChanged event ) { eventBus.post( new AuthorizationConfigurationChangedEvent( this ) ); }
@AllowConcurrentEvents @Subscribe public void on( final SecurityConfigurationChanged event ) { eventBus.post( new SecurityConfigurationChangedEvent( this ) ); }
@Override public void save() throws IOException { super.save(); // fire clear cache event this.eventBus.post(new LdapClearCacheEvent(this)); }
@AllowConcurrentEvents @Subscribe public void on( final AuthorizationConfigurationChangedEvent event ) { if ( !this.equals( event.getEventSender() ) ) { eventBus.post( new AuthorizationConfigurationChanged() ); } }
@Override public void clearCache() { super.clearCache(); // fire clear cache event this.eventBus.post(new LdapClearCacheEvent(null)); } }
@AllowConcurrentEvents @Subscribe public void on( final SecurityConfigurationChangedEvent event ) { if ( !this.equals( event.getEventSender() ) ) { eventBus.post( new SecurityConfigurationChanged() ); } }
@Deprecated public void reindexAllRepositories( String path, boolean fullReindex ) throws IOException { this.eventBus.post( new ReindexRepositoriesEvent( this, new ReindexRepositoriesRequest( path, fullReindex ) ) ); }
private void sendContentValidationEvents( ResourceStoreRequest request, List<RepositoryItemValidationEvent> events, boolean isContentValid ) { if ( getLogger().isDebugEnabled() && !isContentValid ) { getLogger().debug( "Item " + request.toString() + " failed content integrity validation." ); } for ( RepositoryItemValidationEvent event : events ) { eventBus().post( event ); } }
public void deleteUser( String userId, String source ) throws UserNotFoundException, NoSuchUserManagerException { UserManager userManager = userManagerFacade.getUserManager( source ); userManager.deleteUser( userId ); this.eventBus.post( new UserPrincipalsExpired( userId, source ) ); }
@AllowConcurrentEvents @Subscribe public void on( final UserPrincipalsExpired event ) { eventBus.post( new UserPrincipalsExpiredEvent( this, event.getUserId(), event.getSource() ) ); }
@AllowConcurrentEvents @Subscribe public void on( final UserPrincipalsExpiredEvent event ) { if ( !this.equals( event.getEventSender() ) ) { eventBus.post( new UserPrincipalsExpired( event.getUserId(), event.getSource() ) ); } }
@Override public boolean commitChanges() throws ConfigurationException { boolean wasDirty = super.commitChanges(); if ( wasDirty ) { eventBus().post( new GlobalRemoteConnectionSettingsChangedEvent( this ) ); } return wasDirty; }
@Override public boolean commitChanges() throws ConfigurationException { boolean wasDirty = super.commitChanges(); if ( wasDirty ) { eventBus().post( new GlobalHttpProxySettingsChangedEvent( this ) ); } return wasDirty; }
private void postAuthcEvent(ServletRequest request, String username, String userAgent, boolean success) { if (eventBus != null) { eventBus.post( new NexusAuthenticationEvent( this, new ClientInfo(username, RemoteIPFinder.findIP((HttpServletRequest) request), userAgent), success ) ); } }
public synchronized boolean addRepositoryTarget( Target target ) throws ConfigurationException { CRepositoryTarget cnf = convert( target ); validate( cnf ); removeRepositoryTarget( cnf.getId(), true ); getCurrentConfiguration( true ).add( cnf ); eventBus().post( new TargetRegistryEventAdd( this, target ) ); return true; }
@Override public final void processItem( final WalkerContext context, final StorageItem item ) throws Exception { if ( !( item instanceof StorageCollectionItem ) ) { // cstamas: this should be not needed, as Walker should handle this! item.getItemContext().setParentContext( request.getRequestContext() ); // just fire it, and someone will eventually catch it eventBus.post( new RepositoryItemEventDeleteItem( context.getRepository(), item ) ); } } }
@Override public void setLocalStatus( LocalStatus localStatus ) { if ( !localStatus.equals( getLocalStatus() ) ) { LocalStatus oldLocalStatus = getLocalStatus(); super.setLocalStatus( localStatus ); localStatusChanged = true; eventBus().post( new RepositoryEventLocalStatusChanged( this, oldLocalStatus, localStatus ) ); } }