public boolean isActive() { return !(this.authenticationComponent instanceof ActivateableBean) || ((ActivateableBean) this.authenticationComponent).isActive(); }
public boolean isActive() { return !(this.authenticationComponent instanceof ActivateableBean) || ((ActivateableBean) this.authenticationComponent).isActive(); }
@Override public MutableAuthenticationService getMutableAuthenticationService() { this.lock.readLock().lock(); try { refreshBeans(); for (String instance : this.instanceIds) { AuthenticationService authenticationService = (AuthenticationService) this.sourceBeans.get(instance); // Only add active authentication services. E.g. we might have an ldap context that is only used for // synchronizing if (authenticationService instanceof MutableAuthenticationService && (!(authenticationService instanceof ActivateableBean) || ((ActivateableBean) authenticationService) .isActive())) { return (MutableAuthenticationService) authenticationService; } } return null; } finally { this.lock.readLock().unlock(); } }
@Override protected List<AuthenticationService> getUsableAuthenticationServices() { List<AuthenticationService> result = new LinkedList<AuthenticationService>(); this.lock.readLock().lock(); try { refreshBeans(); for (String instance : this.instanceIds) { AuthenticationService authenticationService = (AuthenticationService) this.sourceBeans.get(instance); // Only add active authentication components. E.g. we might have an ldap context that is only used for // synchronizing if (authenticationService != null && (!(authenticationService instanceof ActivateableBean) || ((ActivateableBean) authenticationService) .isActive())) { result.add(authenticationService); } } return result; } finally { this.lock.readLock().unlock(); } }
@Override public MutableAuthenticationService getMutableAuthenticationService() { this.lock.readLock().lock(); try { refreshBeans(); for (String instance : this.instanceIds) { AuthenticationService authenticationService = (AuthenticationService) this.sourceBeans.get(instance); // Only add active authentication services. E.g. we might have an ldap context that is only used for // synchronizing if (authenticationService instanceof MutableAuthenticationService && (!(authenticationService instanceof ActivateableBean) || ((ActivateableBean) authenticationService) .isActive())) { return (MutableAuthenticationService) authenticationService; } } return null; } finally { this.lock.readLock().unlock(); } }
@Override protected List<AuthenticationService> getUsableAuthenticationServices() { List<AuthenticationService> result = new LinkedList<AuthenticationService>(); this.lock.readLock().lock(); try { refreshBeans(); for (String instance : this.instanceIds) { AuthenticationService authenticationService = (AuthenticationService) this.sourceBeans.get(instance); // Only add active authentication components. E.g. we might have an ldap context that is only used for // synchronizing if (authenticationService != null && (!(authenticationService instanceof ActivateableBean) || ((ActivateableBean) authenticationService) .isActive())) { result.add(authenticationService); } } return result; } finally { this.lock.readLock().unlock(); } }
@Override protected List<FTPAuthenticatorBase> getUsableFtpAuthenticators() { List<FTPAuthenticatorBase> result = new LinkedList<FTPAuthenticatorBase>(); for (String instance : this.applicationContextManager.getInstanceIds()) { try { ApplicationContext context = this.applicationContextManager.getApplicationContext(instance); FTPAuthenticatorBase authenticator = (FTPAuthenticatorBase) context.getBean(sourceBeanName); if(this.getClass().isInstance(authenticator)) { continue; } // Only add active authenticators. E.g. we might have a FTP authenticator that is disabled. if (!(authenticator instanceof ActivateableBean) || ((ActivateableBean) authenticator).isActive()) { result.add(authenticator); } } catch (RuntimeException e) { // The bean doesn't exist or this subsystem won't start. The reason would have been logged. Ignore and continue. } } return result; } }
@Override protected Collection<AuthenticationComponent> getUsableAuthenticationComponents() { List<AuthenticationComponent> result = new LinkedList<AuthenticationComponent>(); for (String instance : this.applicationContextManager.getInstanceIds()) { try { ApplicationContext context = this.applicationContextManager.getApplicationContext(instance); AuthenticationComponent authenticationComponent = (AuthenticationComponent) context .getBean(sourceBeanName); // Only add active authentication components. E.g. we might have an ldap context that is only used for // synchronizing if (!(authenticationComponent instanceof ActivateableBean) || ((ActivateableBean) authenticationComponent).isActive()) { result.add(authenticationComponent); } } catch (RuntimeException e) { // The bean doesn't exist or this subsystem won't start. The reason would have been logged. Ignore and continue. } } return result; }
@Override protected List<FTPAuthenticatorBase> getUsableFtpAuthenticators() { List<FTPAuthenticatorBase> result = new LinkedList<FTPAuthenticatorBase>(); for (String instance : this.applicationContextManager.getInstanceIds()) { try { ApplicationContext context = this.applicationContextManager.getApplicationContext(instance); FTPAuthenticatorBase authenticator = (FTPAuthenticatorBase) context.getBean(sourceBeanName); if(this.getClass().isInstance(authenticator)) { continue; } // Only add active authenticators. E.g. we might have a FTP authenticator that is disabled. if (!(authenticator instanceof ActivateableBean) || ((ActivateableBean) authenticator).isActive()) { result.add(authenticator); } } catch (RuntimeException e) { // The bean doesn't exist or this subsystem won't start. The reason would have been logged. Ignore and continue. } } return result; } }
@Override protected Collection<AuthenticationComponent> getUsableAuthenticationComponents() { List<AuthenticationComponent> result = new LinkedList<AuthenticationComponent>(); for (String instance : this.applicationContextManager.getInstanceIds()) { try { ApplicationContext context = this.applicationContextManager.getApplicationContext(instance); AuthenticationComponent authenticationComponent = (AuthenticationComponent) context .getBean(sourceBeanName); // Only add active authentication components. E.g. we might have an ldap context that is only used for // synchronizing if (!(authenticationComponent instanceof ActivateableBean) || ((ActivateableBean) authenticationComponent).isActive()) { result.add(authenticationComponent); } } catch (RuntimeException e) { // The bean doesn't exist or this subsystem won't start. The reason would have been logged. Ignore and continue. } } return result; }
if (!(plugin instanceof ActivateableBean) || ((ActivateableBean) plugin).isActive())
if (!(plugin instanceof ActivateableBean) || ((ActivateableBean) plugin).isActive())
if (!(plugin instanceof ActivateableBean) || ((ActivateableBean) plugin).isActive())
if (!(plugin instanceof ActivateableBean) || ((ActivateableBean) plugin).isActive())
if(!((ActivateableBean) plugin).isActive())
if(!((ActivateableBean) plugin).isActive())
if(!((ActivateableBean) authenticationComponent).isActive())
if(!((ActivateableBean) authenticationComponent).isActive())