Search in sources :

Example 1 with IPortletCategoryRegistry

use of org.apereo.portal.portlet.registry.IPortletCategoryRegistry in project uPortal by Jasig.

the class PortletCategoryRegistryLocator method getPortletCategoryRegistry.

public static IPortletCategoryRegistry getPortletCategoryRegistry() {
    AbstractBeanLocator<IPortletCategoryRegistry> 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(PortletCategoryRegistryLocator.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, IPortletCategoryRegistry.class);
        }
    }
    return locator.getInstance();
}
Also used : ApplicationContext(org.springframework.context.ApplicationContext) IPortletCategoryRegistry(org.apereo.portal.portlet.registry.IPortletCategoryRegistry)

Aggregations

IPortletCategoryRegistry (org.apereo.portal.portlet.registry.IPortletCategoryRegistry)1 ApplicationContext (org.springframework.context.ApplicationContext)1