Search in sources :

Example 1 with IAuthorizationService

use of org.apereo.portal.security.IAuthorizationService in project uPortal by Jasig.

the class AuthorizationServiceLocator method getAuthorizationService.

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();
}
Also used : IAuthorizationService(org.apereo.portal.security.IAuthorizationService) ApplicationContext(org.springframework.context.ApplicationContext)

Aggregations

IAuthorizationService (org.apereo.portal.security.IAuthorizationService)1 ApplicationContext (org.springframework.context.ApplicationContext)1