Examples of UserLayoutFolderDescription


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

   * @return the newly created tab or column
   */
  private final IUserLayoutFolderDescription createFolder (String name)
  {
    String id = "tbd";
    IUserLayoutFolderDescription folder=new UserLayoutFolderDescription();
    folder.setName(name);
    folder.setId(id);
    folder.setFolderType(IUserLayoutFolderDescription.REGULAR_TYPE);
    folder.setHidden(false);
    folder.setUnremovable(false);
    folder.setImmutable(false);
    return folder;
  }
View Full Code Here

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

        node.setDeleteAllowed( getRestriction( deleteAllowed ) );
        node.setMoveAllowed( getRestriction( moveAllowed ) );

        if( node instanceof UserLayoutFolderDescription )
        {
            UserLayoutFolderDescription fldr = null;
            fldr = (UserLayoutFolderDescription) node;
            fldr.setEditAllowed( getRestriction( editAllowed ) );
            fldr.setAddChildAllowed( getRestriction( addChildAllowed ) );
        }
        ulm.updateNode(node);
        saveLayout(false);
    }
View Full Code Here

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

   * @return the newly created tab or column
   */
  private final IUserLayoutFolderDescription createFolder (String name)
  {
    String id = "tbd";
    IUserLayoutFolderDescription folder=new UserLayoutFolderDescription();
    folder.setName(name);
    folder.setId(id);
    folder.setFolderType(IUserLayoutFolderDescription.REGULAR_TYPE);
    folder.setHidden(false);
    folder.setUnremovable(false);
    folder.setImmutable(false);
    return folder;
  }
View Full Code Here

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

     * @exception PortalException if the error occurs.
     */
    public IUserLayoutNodeDescription createNodeDescription( int nodeType ) throws PortalException {
            switch ( nodeType ) {
              case IUserLayoutNodeDescription.FOLDER:
                return new UserLayoutFolderDescription();
              case IUserLayoutNodeDescription.CHANNEL:
                return new UserLayoutChannelDescription();
              default:
                return null;
            }
View Full Code Here

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

      Enumeration columns = ulm.getChildIds(destinationId);
      if (columns.hasMoreElements()) {
        ulm.moveNode(sourceId, (String) columns.nextElement(), null);
      } else {

        IUserLayoutFolderDescription newColumn = new UserLayoutFolderDescription();
        newColumn.setName("Column");
        newColumn.setId("tbd");
        newColumn
            .setFolderType(IUserLayoutFolderDescription.REGULAR_TYPE);
        newColumn.setHidden(false);
        newColumn.setUnremovable(false);
        newColumn.setImmutable(false);

        // add the column to our layout
        IUserLayoutNodeDescription col = ulm.addNode(newColumn,
            destinationId, null);
View Full Code Here

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

    if (columnNumber > columnList.size()) {
      for (int i = columnList.size(); i < columnNumber; i++) {

        // create new column element
        IUserLayoutFolderDescription newColumn = new UserLayoutFolderDescription();
        newColumn.setName("Column");
        newColumn.setId("tbd");
        newColumn
            .setFolderType(IUserLayoutFolderDescription.REGULAR_TYPE);
        newColumn.setHidden(false);
        newColumn.setUnremovable(false);
        newColumn.setImmutable(false);

        // add the column to our layout
        IUserLayoutNodeDescription node = ulm.addNode(newColumn, tabId,
            null);
        newColumns.add(node.getId());
View Full Code Here

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

          if (node != null)
            break;
        }
      } else {

        IUserLayoutFolderDescription newColumn = new UserLayoutFolderDescription();
        newColumn.setName("Column");
        newColumn.setId("tbd");
        newColumn
            .setFolderType(IUserLayoutFolderDescription.REGULAR_TYPE);
        newColumn.setHidden(false);
        newColumn.setUnremovable(false);
        newColumn.setImmutable(false);

        // add the column to our layout
        IUserLayoutNodeDescription col = ulm.addNode(newColumn,
            destinationId, null);
View Full Code Here

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

      HttpServletResponse response) throws IOException, PortalException {

    // construct a brand new tab
    String id = "tbd";
    String tabName = BLANK_TAB_NAME;
    IUserLayoutFolderDescription newTab = new UserLayoutFolderDescription();
    newTab.setName(tabName);
    newTab.setId(id);
    newTab.setFolderType(IUserLayoutFolderDescription.REGULAR_TYPE);
    newTab.setHidden(false);
    newTab.setUnremovable(false);
    newTab.setImmutable(false);

    // add the tab to the layout
    ulm.addNode(newTab, ulm.getRootFolderId(), null);
    try {
      // save the user's layout
      saveUserLayoutPreservingTab(ulm, upm, per);
    } catch (Exception e) {
      log.warn("Error saving layout", e);
    }

    // get the id of the newly added tab
    String nodeId = newTab.getId();

    // pre-populate this new tab with one column
    IUserLayoutFolderDescription newColumn = new UserLayoutFolderDescription();
    newColumn.setName("Column");
    newColumn.setId("tbd");
    newColumn.setFolderType(IUserLayoutFolderDescription.REGULAR_TYPE);
    newColumn.setHidden(false);
    newColumn.setUnremovable(false);
    newColumn.setImmutable(false);
    ulm.addNode(newColumn, nodeId, null);

    try {
      // save the user's layout
      saveUserLayoutPreservingTab(ulm, upm, per);
View Full Code Here

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

     */
    public IUserLayoutNodeDescription createNodeDescription(int nodeType) throws PortalException
    {
        if (nodeType == IUserLayoutNodeDescription.FOLDER)
        {
            return new UserLayoutFolderDescription();
        }
        return new ChannelDescription();
    }
View Full Code Here

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

        {
            return new ChannelDescription(node);
        }
        else if (type.equals(Constants.ELM_FOLDER))
        {
            return new UserLayoutFolderDescription(node);
        }
        else
        {
            throw new PortalException("Given XML Element is not a channel!");
        }
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.