Examples of IUserLayoutFolderDescription


Examples of org.jasig.portal.layout.node.IUserLayoutFolderDescription

        UserPreferencesManager upm = (UserPreferencesManager) ui.getPreferencesManager();
        IUserLayoutManager ulm = upm.getUserLayoutManager();

    // element ID of the tab to be renamed
    String tabId = request.getParameter("tabId");
        IUserLayoutFolderDescription tab = (IUserLayoutFolderDescription) ulm
            .getNode(tabId);

    // desired new name
    String tabName = request.getParameter("tabName");

    if (!ulm.canUpdateNode(tab)) {
        log.warn("Attempting to rename an immutable tab");
        response.sendError(HttpServletResponse.SC_BAD_REQUEST);
        return null;
    }

    /*
     * Update the tab and save the layout
     */
      tab.setName(StringUtils.isBlank(tabName) ? DEFAULT_TAB_NAME : tabName);
    final boolean updated = ulm.updateNode(tab);

    if (updated) {
        try {
          // save the user's layout
View Full Code Here

Examples of org.jasig.portal.layout.node.IUserLayoutFolderDescription

                IUserLayoutNodeDescription.LayoutNodeType nodeType = nodeDescription.getType();

                if (FOLDER.equals(nodeType)
                        && nodeDescription instanceof IUserLayoutFolderDescription) {

                    IUserLayoutFolderDescription folderDescription = (IUserLayoutFolderDescription) nodeDescription;

                    String folderType = folderDescription.getFolderType();

                    if (FAVORITE_COLLECTION_TYPE.equals(folderType)) {

                        results.add(nodeDescription);
View Full Code Here

Examples of org.jasig.portal.layout.node.IUserLayoutFolderDescription

                IUserLayoutNodeDescription nodeDescription = userLayout.getNodeDescription(nodeId);
                IUserLayoutNodeDescription.LayoutNodeType nodeType = nodeDescription.getType();

                if (FOLDER.equals(nodeType)
                        && nodeDescription instanceof IUserLayoutFolderDescription) {
                    IUserLayoutFolderDescription folderDescription = (IUserLayoutFolderDescription) nodeDescription;

                    if (FAVORITES_TYPE.equalsIgnoreCase(folderDescription.getFolderType())) {
                        return folderDescription.getId();
                    }
                }
            } catch (Exception e) {
                logger.error("Ignoring on error a node while examining for favorites: node ID is [{}]", nodeId, e);
            }
View Full Code Here

Examples of org.jasig.portal.layout.node.IUserLayoutFolderDescription

                IUserLayoutNodeDescription.LayoutNodeType nodeType = nodeDescription.getType();

                if (FOLDER.equals(nodeDescription.getType())
                        && nodeDescription instanceof IUserLayoutFolderDescription) {

                    IUserLayoutFolderDescription folderDescription = (IUserLayoutFolderDescription) nodeDescription;

                    if (FAVORITES_TYPE.equalsIgnoreCase(folderDescription.getFolderType())) {
                        // TODO: assumes columns structure, but should traverse tree to collect all portlets regardless
                        Enumeration<String> columns = userLayout.getChildIds(nodeId);

                        //loop through columns to gather beloved portlets
                        while (columns.hasMoreElements()) {
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.