Package org.jasig.portal.layout

Examples of org.jasig.portal.layout.IUserLayoutManager


         */


        final IUserInstance userInstance = this.userInstanceManager.getUserInstance(request);
        final IUserPreferencesManager preferencesManager = userInstance.getPreferencesManager();
        final IUserLayoutManager userLayoutManager = preferencesManager.getUserLayoutManager();
        final IUserLayout userLayout = userLayoutManager.getUserLayout();
       
        final String tabId = userLayout.findNodeId(new PortletTabIdResolver(layoutNodeId));
       
        if (StringUtils.isEmpty(tabId)) {
            return Collections.emptyList();
View Full Code Here


       
       
        //Verify the parsed layoutNodeId matches a node in the user's layout
        final IUserInstance userInstance = this.userInstanceManager.getUserInstance(request);
        final IUserPreferencesManager preferencesManager = userInstance.getPreferencesManager();
        final IUserLayoutManager userLayoutManager = preferencesManager.getUserLayoutManager();
       
        final IUserLayoutNodeDescription node;
        try {
            node = userLayoutManager.getNode(layoutNodeId);
        }
        catch (PortalException e) {

            logger.warn("Parsed requested folder names {} to layoutNodeId {} " +
                    "but did not match a node in the user layout.", folderNames, layoutNodeId, e);
View Full Code Here

       
        //If a layout node is targeted then look for a matching subscribeId under that targeted node
        if (targetedLayoutNodeId != null) {
          final IUserInstance userInstance = this.userInstanceManager.getUserInstance(request);
          final IUserPreferencesManager preferencesManager = userInstance.getPreferencesManager();
          final IUserLayoutManager userLayoutManager = preferencesManager.getUserLayoutManager();
         
          //First look for the layout node only under the specified folder
          subscribeId = userLayoutManager.getSubscribeId(targetedLayoutNodeId, fname);
        }

        //Find a subscribeId based on the fname
        final IPortletWindow portletWindow;
      if (subscribeId == null) {
View Full Code Here

        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);
        }
       
        final UserPreferencesManager userPreferencesManager = new UserPreferencesManager(person, userProfile, userLayoutManager);
View Full Code Here

    @RenderMapping
    public String initializeView(Model model, RenderRequest renderRequest) {

        IUserInstance ui = userInstanceManager.getUserInstance(portalRequestUtils.getCurrentPortalRequest());
        UserPreferencesManager upm = (UserPreferencesManager) ui.getPreferencesManager();
        IUserLayoutManager ulm = upm.getUserLayoutManager();

        IUserLayout userLayout = ulm.getUserLayout();

        // TODO: the portlet could predicate including a non-null marketplace portlet fname
        // on the accessing user having permission to render the portlet referenced by that fname
        // so that portlet would gracefully degrade when configured with bad marketplace portlet fname
        // and also gracefully degrade when the accessing user doesn't have permission to access an otherwise
View Full Code Here

            // ferret out the layout manager
            HttpServletRequest servletRequest = this.portalRequestUtils.getCurrentPortalRequest();
            IUserInstance userInstance = this.userInstanceManager.getUserInstance(servletRequest);
            IUserPreferencesManager preferencesManager = userInstance.getPreferencesManager();
            IUserLayoutManager layoutManager = preferencesManager.getUserLayoutManager();

            IUserLayoutNodeDescription nodeDescription = layoutManager.getNode(nodeId);

            String userFacingNodeName = nodeDescription.getName();
            response.setRenderParameter("nameOfFavoriteActedUpon", userFacingNodeName);

            if (nodeDescription.isDeleteAllowed()) {

                boolean nodeSuccessfullyDeleted = layoutManager.deleteNode(nodeId);

                if (nodeSuccessfullyDeleted) {
                    layoutManager.saveUserLayout();

                    response.setRenderParameter("successMessageCode", "favorites.unfavorite.success.parameterized");

                    IUserLayout updatedLayout = layoutManager.getUserLayout();

                    // if removed last favorite, return to VIEW mode
                    if (! FavoritesUtils.hasAnyFavorites(updatedLayout)) {
                        response.setPortletMode(PortletMode.VIEW);
                    }
View Full Code Here

     */
    @RenderMapping
    public String initializeView(Model model) {
        IUserInstance ui = userInstanceManager.getUserInstance(portalRequestUtils.getCurrentPortalRequest());
        UserPreferencesManager upm = (UserPreferencesManager) ui.getPreferencesManager();
        IUserLayoutManager ulm = upm.getUserLayoutManager();

        IUserLayout userLayout = ulm.getUserLayout();

        // TODO: the portlet could predicate including a non-null marketplace portlet fname
        // on the accessing user having permission to render the portlet referenced by that fname
        // so that portlet would gracefully degrade when configured with bad marketplace portlet fname
        // and also gracefully degrade when the accessing user doesn't have permission to access an otherwise
View Full Code Here

     * corresponding layout node id
     */
    protected String verifyPortletWindowId(HttpServletRequest request, IPortletWindowId portletWindowId) {
        final IUserInstance userInstance = this.userInstanceManager.getUserInstance(request);
        final IUserPreferencesManager preferencesManager = userInstance.getPreferencesManager();
        final IUserLayoutManager userLayoutManager = preferencesManager.getUserLayoutManager();
       
        final IPortletWindow portletWindow = this.portletWindowRegistry.getPortletWindow(request, portletWindowId);
        final IPortletWindowId delegationParentWindowId = portletWindow.getDelegationParentId();
        if (delegationParentWindowId != null) {
            return verifyPortletWindowId(request, delegationParentWindowId);
        }
       
        final IPortletEntity portletEntity = portletWindow.getPortletEntity();
        final String channelSubscribeId = portletEntity.getLayoutNodeId();
        final IUserLayoutNodeDescription node = userLayoutManager.getNode(channelSubscribeId);
        if (node == null) {
            throw new IllegalArgumentException("No layout node exists for id " + channelSubscribeId + " of window " + portletWindowId);
        }
       
        return node.getId();
View Full Code Here

     * portlet.
     */
    protected LayoutNodeType getLayoutNodeType(HttpServletRequest request, String folderNodeId) {
        final IUserInstance userInstance = this.userInstanceManager.getUserInstance(request);
        final IUserPreferencesManager preferencesManager = userInstance.getPreferencesManager();
        final IUserLayoutManager userLayoutManager = preferencesManager.getUserLayoutManager();
        final IUserLayoutNodeDescription node = userLayoutManager.getNode(folderNodeId);
       
        if (node == null) {
            return null;
        }
       
View Full Code Here

        this.userInstanceManager = userInstanceManager;
    }

    @Override
    public CacheKey getCacheKey(HttpServletRequest request, HttpServletResponse response) {
        final IUserLayoutManager userLayoutManager = this.getUserLayoutManager(request);
        final String cacheKey = userLayoutManager.getCacheKey();
        return CacheKey.build(this.getClass().getName(), cacheKey);
    }
View Full Code Here

TOP

Related Classes of org.jasig.portal.layout.IUserLayoutManager

Copyright © 2018 www.massapicom. 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.