Examples of IUserProfile


Examples of org.jasig.portal.IUserProfile

    }

    public Hashtable getSystemProfileList () {
        Hashtable pl = this.getUserProfileList(this.getSystemUser());
        for (Enumeration e = pl.elements(); e.hasMoreElements();) {
            IUserProfile up = (IUserProfile)e.nextElement();
            up.setSystemProfile(true);
        }
        return  pl;
    }
View Full Code Here

Examples of org.jasig.portal.IUserProfile

        final PersonImpl person = new PersonImpl();
        person.setUserName(userName);
        person.setID(userId);
        person.setSecurityContext(new BrokenSecurityContext());

        final IUserProfile profile = layoutStore.getUserProfileByFname(person, UserProfile.DEFAULT_PROFILE_FNAME);
        final DistributedUserLayout userLayout = layoutStore.getUserLayout(person, (UserProfile) profile);

        return new Tuple<String, DistributedUserLayout>(userName, userLayout);
    }
View Full Code Here

Examples of org.jasig.portal.IUserProfile

    }

    public IStylesheetDescriptor getStylesheetDescriptor(HttpServletRequest request) {
        final IUserInstance userInstance = this.userInstanceManager.getUserInstance(request);
        final IUserPreferencesManager preferencesManager = userInstance.getPreferencesManager();
        final IUserProfile userProfile = preferencesManager.getUserProfile();
       
        final PreferencesScope stylesheetPreferencesScope = this.getStylesheetPreferencesScope(request);
        final int stylesheetId = stylesheetPreferencesScope.getStylesheetId(userProfile);
       
        return this.stylesheetDescriptorDao.getStylesheetDescriptor(stylesheetId);
View Full Code Here

Examples of org.jasig.portal.IUserProfile

        }

        // Create either a UserInstance or a GuestUserInstance
        final LocaleManager localeManager = this.getLocaleManager(request, person);
        final String userAgent = this.getUserAgent(request);
        final IUserProfile userProfile = this.getUserProfile(request, person, localeManager, userAgent);

        //Create the user layout manager and user instance object
        IUserLayoutManager userLayoutManager = userLayoutManagerFactory.getUserLayoutManager(person, userProfile);
        if (person.isGuest()) {
            userLayoutManager = userLayoutManagerFactory.immutableUserLayoutManager(userLayoutManager);
View Full Code Here

Examples of org.jasig.portal.IUserProfile

        return userInstance;
    }

    protected IUserProfile getUserProfile(HttpServletRequest request, IPerson person, LocaleManager localeManager, String userAgent) {
        final String profileFname = profileMapper.getProfileFname(person, request);
        IUserProfile userProfile = userLayoutStore.getUserProfileByFname(person, profileFname);

        if (userProfile == null) {
            userProfile = userLayoutStore.getSystemProfileByFname(profileFname);
        }
       
        if (localeManager != null && LocaleManager.isLocaleAware()) {
            userProfile.setLocaleManager(localeManager);
        }
       
        return userProfile;
    }
View Full Code Here

Examples of org.jasig.portal.IUserProfile

           
            final IUserInstance ui = userInstanceManager.getUserInstance(request);

            final IUserPreferencesManager upm = ui.getPreferencesManager();

            final IUserProfile profile = upm.getUserProfile();
            final DistributedUserLayout userLayout = userLayoutStore.getUserLayout(person, profile);
            Document document = userLayout.getLayout();
           
            NodeList portletNodes = document.getElementsByTagName("channel");
            for (int i = 0; i < portletNodes.getLength(); i++) {
View Full Code Here

Examples of org.jasig.portal.IUserProfile

        // the user
        if (profileName == null) {
            // get the profile for the current request
            final HttpServletRequest httpServletRequest = portalRequestUtils.getPortletHttpRequest(request);
            final IUserInstance ui = userInstanceManager.getUserInstance(httpServletRequest);
            final IUserProfile profile = ui.getPreferencesManager().getUserProfile();
           
            // check to see if the profile's fname matches one of the entries in
            // the profile key map used by the session attribute profile mapper
            for (Map.Entry<String, String> entry : mappings.entrySet()) {
                if (entry.getValue().equals(profile.getProfileFname())) {
                    profileName = entry.getKey();
                    break;
                }
            }
        }
View Full Code Here

Examples of org.jasig.portal.IUserProfile

        return currentPortalRequest;
    }

    private IStylesheetDescriptor getCurrentUserProfileStyleSheetDescriptor(IPerson person, HttpServletRequest currentPortalRequest) {
        final String currentFname = this.profileMapper.getProfileFname(person, currentPortalRequest);
        IUserProfile profile = this.userLayoutStore.getSystemProfileByFname(currentFname);
        int profileId = profile.getThemeStylesheetId();
        return this.stylesheetDescriptorDao.getStylesheetDescriptor(profileId);
    }
View Full Code Here

Examples of org.jasig.portal.IUserProfile

   */
  public Locale getCurrentUserLocale(PortletRequest request) {
      final HttpServletRequest originalPortalRequest = this.portalRequestUtils.getPortletHttpRequest(request);
    IUserInstance ui = userInstanceManager.getUserInstance(originalPortalRequest);
    IUserPreferencesManager upm = ui.getPreferencesManager();
    final IUserProfile userProfile = upm.getUserProfile();
        LocaleManager localeManager = userProfile.getLocaleManager();
       
        // first check the session locales
        Locale[] sessionLocales = localeManager.getSessionLocales();
        if (sessionLocales != null && sessionLocales.length > 0) {
          return sessionLocales[0];
View Full Code Here

Examples of org.jasig.portal.IUserProfile

   */
  public void updateUserLocale(HttpServletRequest request, String localeString) {

    IUserInstance ui = userInstanceManager.getUserInstance(request);
    IUserPreferencesManager upm = ui.getPreferencesManager();
        final IUserProfile userProfile = upm.getUserProfile();
        LocaleManager localeManager = userProfile.getLocaleManager();


        if (localeString != null) {
         
          // build a new Locale[] array from the specified locale
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.