/** * Get a {@link Map} of {@link ILdapServer} instances from the spring configuration. * * @return A {@link Map} of {@link ILdapServer} instances. */ @SuppressWarnings("unchecked") public static Map<String, ILdapServer> getLdapServerMap() { final ApplicationContext applicationContext = PortalApplicationContextLocator.getApplicationContext(); final Map<String, ILdapServer> ldapServers = applicationContext.getBeansOfType(ILdapServer.class); if (LOG.isDebugEnabled()) { LOG.debug("Found Map of ILdapServers=" + ldapServers + "'"); } return Collections.unmodifiableMap(ldapServers); }
/** * Get a {@link Map} of {@link ILdapServer} instances from the spring configuration. * * @return A {@link Map} of {@link ILdapServer} instances. */ @SuppressWarnings("unchecked") public static Map<String, ILdapServer> getLdapServerMap() { final ApplicationContext applicationContext = PortalApplicationContextLocator.getApplicationContext(); final Map<String, ILdapServer> ldapServers = applicationContext.getBeansOfType(ILdapServer.class); if (LOG.isDebugEnabled()) { LOG.debug("Found Map of ILdapServers=" + ldapServers + "'"); } return Collections.unmodifiableMap(ldapServers); }
/** * Get the {@link ILdapServer} from the portal spring context with the specified name. * * @param name The name of the ILdapServer to return. * @return An {@link ILdapServer} with the specified name, <code>null</code> if there is no * connection with the specified name. */ public static ILdapServer getLdapServer(String name) { final ApplicationContext applicationContext = PortalApplicationContextLocator.getApplicationContext(); ILdapServer ldapServer = null; try { ldapServer = (ILdapServer) applicationContext.getBean(name, ILdapServer.class); } catch (NoSuchBeanDefinitionException nsbde) { // Ignore the exception for not finding the named bean. } if (LOG.isDebugEnabled()) { LOG.debug("Found ILdapServer='" + ldapServer + "' for name='" + name + "'"); } return ldapServer; }
/** * Get the {@link ILdapServer} from the portal spring context with the specified name. * * @param name The name of the ILdapServer to return. * @return An {@link ILdapServer} with the specified name, <code>null</code> if there is no * connection with the specified name. */ public static ILdapServer getLdapServer(String name) { final ApplicationContext applicationContext = PortalApplicationContextLocator.getApplicationContext(); ILdapServer ldapServer = null; try { ldapServer = (ILdapServer) applicationContext.getBean(name, ILdapServer.class); } catch (NoSuchBeanDefinitionException nsbde) { // Ignore the exception for not finding the named bean. } if (LOG.isDebugEnabled()) { LOG.debug("Found ILdapServer='" + ldapServer + "' for name='" + name + "'"); } return ldapServer; }
public static IDatabaseMetadata getPortalDbMetadata() { AbstractBeanLocator<IDatabaseMetadata> locator = locatorInstance; if (locator == null) { LOG.info( "Looking up bean '" + BEAN_NAME + "' in ApplicationContext due to context not yet being initialized"); final ApplicationContext applicationContext = PortalApplicationContextLocator.getApplicationContext(); applicationContext.getBean(PortalDbMetadataLocator.class.getName()); locator = locatorInstance; if (locator == null) { LOG.warn( "Instance of '" + BEAN_NAME + "' still null after portal application context has been initialized"); return applicationContext.getBean(BEAN_NAME, IDatabaseMetadata.class); } } return locator.getInstance(); }
public static ICounterStore getCounterStore() { AbstractBeanLocator<ICounterStore> locator = locatorInstance; if (locator == null) { LOG.info( "Looking up bean '" + BEAN_NAME + "' in ApplicationContext due to context not yet being initialized"); final ApplicationContext applicationContext = PortalApplicationContextLocator.getApplicationContext(); applicationContext.getBean(CounterStoreLocator.class.getName()); locator = locatorInstance; if (locator == null) { LOG.warn( "Instance of '" + BEAN_NAME + "' still null after portal application context has been initialized"); return applicationContext.getBean(BEAN_NAME, ICounterStore.class); } } return locator.getInstance(); }
public static ILocalAccountDao getLocalAccountDao() { AbstractBeanLocator<ILocalAccountDao> locator = locatorInstance; if (locator == null) { LOG.info( "Looking up bean '" + BEAN_NAME + "' in ApplicationContext due to context not yet being initialized"); final ApplicationContext applicationContext = PortalApplicationContextLocator.getApplicationContext(); applicationContext.getBean(LocalAccountDaoLocator.class.getName()); locator = locatorInstance; if (locator == null) { LOG.warn( "Instance of '" + BEAN_NAME + "' still null after portal application context has been initialized"); return applicationContext.getBean(BEAN_NAME, ILocalAccountDao.class); } } return locator.getInstance(); }
public static IEntitySearcher getReferenceEntitySearcher() { AbstractBeanLocator<IEntitySearcher> locator = locatorInstance; if (locator == null) { LOG.info( "Looking up bean '" + BEAN_NAME + "' in ApplicationContext due to context not yet being initialized"); final ApplicationContext applicationContext = PortalApplicationContextLocator.getApplicationContext(); applicationContext.getBean(ReferenceEntitySearcherLocator.class.getName()); locator = locatorInstance; if (locator == null) { LOG.warn( "Instance of '" + BEAN_NAME + "' still null after portal application context has been initialized"); return applicationContext.getBean(BEAN_NAME, IEntitySearcher.class); } } return locator.getInstance(); }
public static IPersonAttributeDao getPersonAttributeDao() { AbstractBeanLocator<IPersonAttributeDao> locator = locatorInstance; if (locator == null) { LOG.info( "Looking up bean '" + BEAN_NAME + "' in ApplicationContext due to context not yet being initialized"); final ApplicationContext applicationContext = PortalApplicationContextLocator.getApplicationContext(); applicationContext.getBean(PersonAttributeDaoLocator.class.getName()); locator = locatorInstance; if (locator == null) { LOG.warn( "Instance of '" + BEAN_NAME + "' still null after portal application context has been initialized"); return applicationContext.getBean(BEAN_NAME, IPersonAttributeDao.class); } } return locator.getInstance(); }
public static IEntityCachingService getEntityCachingService() { AbstractBeanLocator<IEntityCachingService> locator = locatorInstance; if (locator == null) { LOG.info( "Looking up bean '" + BEAN_NAME + "' in ApplicationContext due to context not yet being initialized"); final ApplicationContext applicationContext = PortalApplicationContextLocator.getApplicationContext(); applicationContext.getBean(EntityCachingServiceLocator.class.getName()); locator = locatorInstance; if (locator == null) { LOG.warn( "Instance of '" + BEAN_NAME + "' still null after portal application context has been initialized"); return applicationContext.getBean(BEAN_NAME, IEntityCachingService.class); } } return locator.getInstance(); }
public static EntityTypes getEntityTypes() { AbstractBeanLocator<EntityTypes> locator = locatorInstance; if (locator == null) { LOG.info( "Looking up bean '" + BEAN_NAME + "' in ApplicationContext due to context not yet being initialized"); final ApplicationContext applicationContext = PortalApplicationContextLocator.getApplicationContext(); applicationContext.getBean(EntityTypesLocator.class.getName()); locator = locatorInstance; if (locator == null) { LOG.warn( "Instance of '" + BEAN_NAME + "' still null after portal application context has been initialized"); return applicationContext.getBean(BEAN_NAME, EntityTypes.class); } } return locator.getInstance(); }
public static IAuthorizationService getAuthorizationService() { AbstractBeanLocator<IAuthorizationService> locator = locatorInstance; if (locator == null) { LOG.info( "Looking up bean '" + BEAN_NAME + "' in ApplicationContext due to context not yet being initialized"); final ApplicationContext applicationContext = PortalApplicationContextLocator.getApplicationContext(); applicationContext.getBean(AuthorizationServiceLocator.class.getName()); locator = locatorInstance; if (locator == null) { LOG.warn( "Instance of '" + BEAN_NAME + "' still null after portal application context has been initialized"); return applicationContext.getBean(BEAN_NAME, IAuthorizationService.class); } } return locator.getInstance(); }
public static ApplicationContext getApplicationContext() { AbstractBeanLocator<ApplicationContext> locator = locatorInstance; if (locator == null) { LOG.info( "Looking up bean '" + BEAN_NAME + "' in ApplicationContext due to context not yet being initialized"); final ApplicationContext applicationContext = PortalApplicationContextLocator.getApplicationContext(); applicationContext.getBean(ApplicationContextLocator.class.getName()); locator = locatorInstance; if (locator == null) { LOG.warn( "Instance of '" + BEAN_NAME + "' still null after portal application context has been initialized"); return applicationContext.getBean(BEAN_NAME, ApplicationContext.class); } } return locator.getInstance(); }
public static IPersonAttributeDao getPersonAttributeDao() { AbstractBeanLocator<IPersonAttributeDao> locator = locatorInstance; if (locator == null) { LOG.info( "Looking up bean '" + BEAN_NAME + "' in ApplicationContext due to context not yet being initialized"); final ApplicationContext applicationContext = PortalApplicationContextLocator.getApplicationContext(); applicationContext.getBean(PersonAttributeDaoLocator.class.getName()); locator = locatorInstance; if (locator == null) { LOG.warn( "Instance of '" + BEAN_NAME + "' still null after portal application context has been initialized"); return applicationContext.getBean(BEAN_NAME, IPersonAttributeDao.class); } } return locator.getInstance(); }
public static IAuthorizationService getAuthorizationService() { AbstractBeanLocator<IAuthorizationService> locator = locatorInstance; if (locator == null) { LOG.info( "Looking up bean '" + BEAN_NAME + "' in ApplicationContext due to context not yet being initialized"); final ApplicationContext applicationContext = PortalApplicationContextLocator.getApplicationContext(); applicationContext.getBean(AuthorizationServiceLocator.class.getName()); locator = locatorInstance; if (locator == null) { LOG.warn( "Instance of '" + BEAN_NAME + "' still null after portal application context has been initialized"); return applicationContext.getBean(BEAN_NAME, IAuthorizationService.class); } } return locator.getInstance(); }
public static EntityTypes getEntityTypes() { AbstractBeanLocator<EntityTypes> locator = locatorInstance; if (locator == null) { LOG.info( "Looking up bean '" + BEAN_NAME + "' in ApplicationContext due to context not yet being initialized"); final ApplicationContext applicationContext = PortalApplicationContextLocator.getApplicationContext(); applicationContext.getBean(EntityTypesLocator.class.getName()); locator = locatorInstance; if (locator == null) { LOG.warn( "Instance of '" + BEAN_NAME + "' still null after portal application context has been initialized"); return applicationContext.getBean(BEAN_NAME, EntityTypes.class); } } return locator.getInstance(); }
public static ApplicationContext getApplicationContext() { AbstractBeanLocator<ApplicationContext> locator = locatorInstance; if (locator == null) { LOG.info( "Looking up bean '" + BEAN_NAME + "' in ApplicationContext due to context not yet being initialized"); final ApplicationContext applicationContext = PortalApplicationContextLocator.getApplicationContext(); applicationContext.getBean(ApplicationContextLocator.class.getName()); locator = locatorInstance; if (locator == null) { LOG.warn( "Instance of '" + BEAN_NAME + "' still null after portal application context has been initialized"); return applicationContext.getBean(BEAN_NAME, ApplicationContext.class); } } return locator.getInstance(); }
public static IPortalPasswordService getPortalPasswordService() { AbstractBeanLocator<IPortalPasswordService> locator = locatorInstance; if (locator == null) { LOG.info( "Looking up bean '" + BEAN_NAME + "' in ApplicationContext due to context not yet being initialized"); final ApplicationContext applicationContext = PortalApplicationContextLocator.getApplicationContext(); applicationContext.getBean(PortalPasswordServiceLocator.class.getName()); locator = locatorInstance; if (locator == null) { LOG.warn( "Instance of '" + BEAN_NAME + "' still null after portal application context has been initialized"); return applicationContext.getBean(BEAN_NAME, IPortalPasswordService.class); } } return locator.getInstance(); }
public static IStringEncryptionService getPasswordEncryptionService() { AbstractBeanLocator<IStringEncryptionService> locator = locatorInstance; if (locator == null) { LOG.info( "Looking up bean '" + BEAN_NAME + "' in ApplicationContext due to context not yet being initialized"); final ApplicationContext applicationContext = PortalApplicationContextLocator.getApplicationContext(); applicationContext.getBean(PasswordEncryptionServiceLocator.class.getName()); locator = locatorInstance; if (locator == null) { LOG.warn( "Instance of '" + BEAN_NAME + "' still null after portal application context has been initialized"); return applicationContext.getBean(BEAN_NAME, IStringEncryptionService.class); } } return locator.getInstance(); }
public static DataSource getPortalDb() { AbstractBeanLocator<DataSource> locator = locatorInstance; if (locator == null) { LOG.info( "Looking up bean '" + BEAN_NAME + "' in ApplicationContext due to context not yet being initialized"); final ApplicationContext applicationContext = PortalApplicationContextLocator.getApplicationContext(); applicationContext.getBean(PortalDbLocator.class.getName()); locator = locatorInstance; if (locator == null) { LOG.warn( "Instance of '" + BEAN_NAME + "' still null after portal application context has been initialized"); return applicationContext.getBean(BEAN_NAME, DataSource.class); } } return locator.getInstance(); }