Search in sources :

Example 1 with ArrayEnumerator

use of org.apereo.portal.utils.ArrayEnumerator in project uPortal by Jasig.

the class PortalHttpServletRequestWrapper method getLocales.

/* (non-Javadoc)
     * @see org.apereo.portal.url.AbstractHttpServletRequestWrapper#getLocales()
     */
@Override
public Enumeration<Locale> getLocales() {
    if (super.getSession(false) == null) {
        return super.getLocales();
    }
    final IUserInstance userInstance = this.userInstanceManager.getUserInstance(this.getWrappedRequest());
    final LocaleManager localeManager = userInstance.getLocaleManager();
    final Locale[] locales = localeManager.getLocales();
    return new ArrayEnumerator<Locale>(locales);
}
Also used : IUserInstance(org.apereo.portal.user.IUserInstance) Locale(java.util.Locale) ArrayEnumerator(org.apereo.portal.utils.ArrayEnumerator) LocaleManager(org.apereo.portal.i18n.LocaleManager)

Aggregations

Locale (java.util.Locale)1 LocaleManager (org.apereo.portal.i18n.LocaleManager)1 IUserInstance (org.apereo.portal.user.IUserInstance)1 ArrayEnumerator (org.apereo.portal.utils.ArrayEnumerator)1