Search in sources :

Example 1 with IProfileMapper

use of org.apereo.portal.layout.profile.IProfileMapper in project uPortal by Jasig.

the class ProfileEvaluator method isApplicable.

@Override
public boolean isApplicable(IPerson person) {
    final ApplicationContext applicationContext = ApplicationContextLocator.getApplicationContext();
    final IPortalRequestUtils portalRequestUtils = applicationContext.getBean(IPortalRequestUtils.class);
    final IProfileMapper profileMapper = applicationContext.getBean("profileMapper", IProfileMapper.class);
    final HttpServletRequest request = portalRequestUtils.getCurrentPortalRequest();
    final String currentFname = profileMapper.getProfileFname(person, request);
    return profileFname.equals(currentFname);
}
Also used : HttpServletRequest(javax.servlet.http.HttpServletRequest) ApplicationContext(org.springframework.context.ApplicationContext) IPortalRequestUtils(org.apereo.portal.url.IPortalRequestUtils) IProfileMapper(org.apereo.portal.layout.profile.IProfileMapper)

Aggregations

HttpServletRequest (javax.servlet.http.HttpServletRequest)1 IProfileMapper (org.apereo.portal.layout.profile.IProfileMapper)1 IPortalRequestUtils (org.apereo.portal.url.IPortalRequestUtils)1 ApplicationContext (org.springframework.context.ApplicationContext)1