@Override public void afterPropertiesSet() throws Exception { ParameterCheck.mandatory("authenticationContextManager", authenticationContextManager); //Attempt to get RepositoryAuthenticationDao from the subsystem for(String contextName : authenticationContextManager.getInstanceIds()) { ApplicationContext ctx = authenticationContextManager.getApplicationContext(contextName); try { authenticationDao = (RepositoryAuthenticationDao) ctx.getBean(RepositoryAuthenticationDao.class); } catch(NoSuchBeanDefinitionException e) {} } } }
@Override protected AuthenticationComponent getAuthenticationComponent(String instanceId) { ApplicationContext context = this.applicationContextManager.getApplicationContext(instanceId); if(context != null) { try { AuthenticationComponent authenticationComponent = (AuthenticationComponent) context .getBean(sourceBeanName); return authenticationComponent; } catch (NoSuchBeanDefinitionException e) { return null; } } return null; } }
@Override protected AuthenticationComponent getAuthenticationComponent(String instanceId) { ApplicationContext context = this.applicationContextManager.getApplicationContext(instanceId); if(context != null) { try { AuthenticationComponent authenticationComponent = (AuthenticationComponent) context .getBean(sourceBeanName); return authenticationComponent; } catch (NoSuchBeanDefinitionException e) { return null; } } return null; } }
@Override public void afterPropertiesSet() throws Exception { ParameterCheck.mandatory("authenticationContextManager", authenticationContextManager); //Attempt to get RepositoryAuthenticationDao from the subsystem for(String contextName : authenticationContextManager.getInstanceIds()) { ApplicationContext ctx = authenticationContextManager.getApplicationContext(contextName); try { authenticationDao = (RepositoryAuthenticationDao) ctx.getBean(RepositoryAuthenticationDao.class); } catch(NoSuchBeanDefinitionException e) {} } } }
@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 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 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; } }
try if (this.instanceIds == null || !this.instanceIds.equals(this.applicationContextManager.getInstanceIds())) this.instanceIds = this.applicationContextManager.getInstanceIds(); this.contexts.keySet().retainAll(this.instanceIds); this.sourceBeans.keySet().retainAll(this.instanceIds); try newContext = this.applicationContextManager.getApplicationContext(instance); newContext = this.applicationContextManager.getApplicationContext(instance); this.contexts.put(instance, newContext); this.sourceBeans.put(instance, newContext.getBean(this.sourceBeanName));
try if (this.instanceIds == null || !this.instanceIds.equals(this.applicationContextManager.getInstanceIds())) this.instanceIds = this.applicationContextManager.getInstanceIds(); this.contexts.keySet().retainAll(this.instanceIds); this.sourceBeans.keySet().retainAll(this.instanceIds); try newContext = this.applicationContextManager.getApplicationContext(instance); newContext = this.applicationContextManager.getApplicationContext(instance); this.contexts.put(instance, newContext); this.sourceBeans.put(instance, newContext.getBean(this.sourceBeanName));
Collection<String> instanceIds = this.applicationContextManager.getInstanceIds(); ApplicationContext context = this.applicationContextManager.getApplicationContext(id); UserRegistry plugin = (UserRegistry) context.getBean(this.sourceBeanName); if (!(plugin instanceof ActivateableBean) || ((ActivateableBean) plugin).isActive())
Collection<String> instanceIds = this.applicationContextManager.getInstanceIds(); ApplicationContext context = this.applicationContextManager.getApplicationContext(id); UserRegistry plugin = (UserRegistry) context.getBean(this.sourceBeanName); if (!(plugin instanceof ActivateableBean) || ((ActivateableBean) plugin).isActive())
try for (String instance : applicationContextManager.getInstanceIds()) .getApplicationContext(instance);
try for (String instance : applicationContextManager.getInstanceIds()) .getApplicationContext(instance);
Collection<String> instanceIds = this.applicationContextManager.getInstanceIds(); try ApplicationContext context = this.applicationContextManager.getApplicationContext(id); plugin = (UserRegistry) context.getBean(this.sourceBeanName);
Collection<String> instanceIds = this.applicationContextManager.getInstanceIds(); try ApplicationContext context = this.applicationContextManager.getApplicationContext(id); plugin = (UserRegistry) context.getBean(this.sourceBeanName);
Collection<String> instanceIds = this.applicationContextManager.getInstanceIds(); ApplicationContext context = this.applicationContextManager.getApplicationContext(authenticatorName); plugin = (UserRegistry) context.getBean(this.sourceBeanName);
Collection<String> instanceIds = this.applicationContextManager.getInstanceIds(); ApplicationContext context = this.applicationContextManager.getApplicationContext(authenticatorName); plugin = (UserRegistry) context.getBean(this.sourceBeanName);
ApplicationContext subsystem = authenticationChain.getApplicationContext(authenticationChain.getInstanceIds().iterator().next()); authenticationManager = (AuthenticationManager) subsystem.getBean("authenticationManager");