Examples of IUserInstance


Examples of org.jasig.portal.user.IUserInstance

     * @param request
     * @return
     */
    protected EvaluationContext getEvaluationContext(WebRequest request) {
        final HttpServletRequest httpRequest = this.portalRequestUtils.getOriginalPortalRequest(request);
        final IUserInstance userInstance = this.userInstanceManager.getUserInstance(httpRequest);
        final IPerson person = userInstance.getPerson();
       
        final SpELEnvironmentRoot root = new SpELEnvironmentRoot(request, person);
        final StandardEvaluationContext context = new StandardEvaluationContext(root);
        context.setBeanResolver(this.beanResolver);
        return context;
View Full Code Here

Examples of org.jasig.portal.user.IUserInstance

        portletFailureMap.remove(failedPortletWindowId);
         */
    }
   
    protected IPortletWindowId getErrorPortletWindowId(HttpServletRequest request, String fname) {
        final IUserInstance userInstance = this.userInstanceManager.getUserInstance(request);
        final IPortletEntity errorPortletEntity = this.portletEntityRegistry.getOrCreatePortletEntityByFname(request, userInstance, fname);
        final IPortletWindow portletWindow = this.portletWindowRegistry.getOrCreateDefaultPortletWindow(request, errorPortletEntity.getPortletEntityId());
        return portletWindow.getPortletWindowId();
    }
View Full Code Here

Examples of org.jasig.portal.user.IUserInstance

     * Get the stylesheet description from the user preferences
     */
    protected abstract long getStylesheetDescriptorId(IUserPreferencesManager preferencesManager);

    private Resource getStylesheetResource(HttpServletRequest request) {
        final IUserInstance userInstance = this.userInstanceManager.getUserInstance(request);
        final IUserPreferencesManager preferencesManager = userInstance.getPreferencesManager();
        final long stylesheetDescriptorId = this.getStylesheetDescriptorId(preferencesManager);
        final IStylesheetDescriptor stylesheetDescriptor = this.stylesheetDescriptorDao.getStylesheetDescriptor(stylesheetDescriptorId);
        final String stylesheetResource = stylesheetDescriptor.getStylesheetResource();
        return this.resourceLoader.getResource(stylesheetResource);
    }
View Full Code Here

Examples of org.jasig.portal.user.IUserInstance

       
        return new StylesheetPreferencesKey(person, userProfile, stylesheetDescriptor);
    }
   
    protected final IStylesheetUserPreferences getDistributedStylesheetUserPreferences(HttpServletRequest request, PreferencesScope prefScope) {
        final IUserInstance userInstance = this.userInstanceManager.getUserInstance(request);
        final IUserPreferencesManager preferencesManager = userInstance.getPreferencesManager();
        final IUserLayoutManager userLayoutManager = preferencesManager.getUserLayoutManager();
        final IUserLayout userLayout = userLayoutManager.getUserLayout();
       
        return prefScope.getDistributedIStylesheetUserPreferences(userLayout);
    }
View Full Code Here

Examples of org.jasig.portal.user.IUserInstance

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

Examples of org.jasig.portal.user.IUserInstance

            return this.str;
        }
    }

    protected final StylesheetPreferencesKey getStylesheetPreferencesKey(HttpServletRequest request, PreferencesScope prefScope) {
        final IUserInstance userInstance = this.userInstanceManager.getUserInstance(request);
       
        final IPerson person = userInstance.getPerson();

        final IUserPreferencesManager preferencesManager = userInstance.getPreferencesManager();
        final IUserProfile userProfile = preferencesManager.getUserProfile();
       
        final int stylesheetId = prefScope.getStylesheetId(userProfile);
        final IStylesheetDescriptor stylesheetDescriptor = this.stylesheetDescriptorDao.getStylesheetDescriptor(stylesheetId);
       
View Full Code Here

Examples of org.jasig.portal.user.IUserInstance

    @Override
    public IPortletWindow getOrCreateDefaultPortletWindowByFname(HttpServletRequest request, String fname) {
        Validate.notNull(request, "HttpServletRequest cannot be null");
        Validate.notNull(fname, "fname cannot be null");
       
        final IUserInstance userInstance = this.userInstanceManager.getUserInstance(request);
        final IPortletEntity portletEntity = this.portletEntityRegistry.getOrCreatePortletEntityByFname(request, userInstance, fname);
        if (portletEntity == null) {
            return null;
        }
       
View Full Code Here

Examples of org.jasig.portal.user.IUserInstance

    @Override
    public IPortletWindow getOrCreateDefaultPortletWindowByLayoutNodeId(HttpServletRequest request, String subscribeId) {
        Validate.notNull(request, "HttpServletRequest cannot be null");
        Validate.notNull(subscribeId, "subscribeId cannot be null");
       
        final IUserInstance userInstance = this.userInstanceManager.getUserInstance(request);
        final IPortletEntity portletEntity = this.portletEntityRegistry.getOrCreatePortletEntity(request, userInstance, subscribeId);
        if (portletEntity == null) {
            logger.debug("No portlet entity found for id {}, no IPortletWindow will be returned.", subscribeId);
            return null;
        }
View Full Code Here

Examples of org.jasig.portal.user.IUserInstance

    public void storePortletWindow(HttpServletRequest request, IPortletWindow portletWindow) {
        if (isDisablePersistentWindowStates(request)) {
            return;
        }
       
        final IUserInstance userInstance = this.userInstanceManager.getUserInstance(request);
        final IPerson person = userInstance.getPerson();
        if (person.isGuest()) {
            //Never persist things for the guest user, just rely on in-memory storage
            return;
        }
       
View Full Code Here

Examples of org.jasig.portal.user.IUserInstance

    }
   
    @Override
    @RequestCache(keyMask = {false})
    public Set<IPortletWindow> getAllLayoutPortletWindows(HttpServletRequest request) {
        final IUserInstance userInstance = this.userInstanceManager.getUserInstance(request);
        final IUserPreferencesManager preferencesManager = userInstance.getPreferencesManager();
        final IUserLayoutManager userLayoutManager = preferencesManager.getUserLayoutManager();
        final Set<String> allSubscribedChannels = userLayoutManager.getAllSubscribedChannels();
       
        final Set<IPortletWindow> allLayoutWindows = new LinkedHashSet<IPortletWindow>(allSubscribedChannels.size());

        for (final String channelSubscribeId : allSubscribedChannels) {
            final IPortletEntity portletEntity = this.portletEntityRegistry.getOrCreatePortletEntity(request, userInstance, channelSubscribeId);
            if (portletEntity == null) {
                this.logger.debug("No portlet entity found for layout node {} for user {}", channelSubscribeId, userInstance.getPerson().getUserName());
                continue;
            }
           
            final IPortletEntityId portletEntityId = portletEntity.getPortletEntityId();
            final IPortletWindow portletWindow = this.getOrCreateDefaultPortletWindow(request, portletEntityId);
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.