Examples of IUserLayoutFolderDescription


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

    {
        IUserLayoutNodeDescription ndesc = getNode(nodeId);
        if (!(ndesc instanceof IUserLayoutFolderDescription))
            return null;
       
        IUserLayoutFolderDescription desc
            = (IUserLayoutFolderDescription) ndesc;
        boolean editAllowed = desc.isEditAllowed();
        String label = desc.getName();
        // assume user owned to begin with which means plfId equals nodeId
        String plfId = nodeId;

        if (nodeId.startsWith(
                org.jasig.portal.layout.dlm.Constants.FRAGMENT_ID_USER_PREFIX))
View Full Code Here

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

        assertEquals(7, this.countRowsInTable("STATS_FOLDER"));
        assertEquals(1, this.countRowsInTable("STATS_RENDER_TIME"));
       
       

        final IUserLayoutFolderDescription layoutFolderDescription = EasyMock.createMock(IUserLayoutFolderDescription.class);
        EasyMock.expect(layoutFolderDescription.getId()).andReturn("layoutFolder1").anyTimes();
        EasyMock.expect(layoutFolderDescription.getName()).andReturn("layoutFolder1").anyTimes();
       
        EasyMock.replay(layoutFolderDescription);
       
       
        portalEvent = new UserAddedFolderToLayoutPortalEvent(this, person, userProfile, layoutFolderDescription);
View Full Code Here

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

    ulStore.setStructureStylesheetUserPreferences(staticData.getPerson(), profileId, ssup);
  }

  private final void renameTab(String tabId, String tabName) throws PortalException
  {
      IUserLayoutFolderDescription tab=(IUserLayoutFolderDescription)ulm.getNode(tabId);
      if(ulm.canUpdateNode(ulm.getNode(tabId))) {
          if (tabName == null || tabName.trim().length() == 0) {
              tab.setName(BLANK_TAB_NAME);
          } else {
              tab.setName(tabName);
          }
          ulm.updateNode(tab);
      } else {
       
          throw new PortalException("attempt.to.rename.immutable.tab" +tabId);
View Full Code Here

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

  private final void addTab(String tabName,
                            String method,
                            String destinationTabId)
      throws PortalException
  {
    IUserLayoutFolderDescription newTab = createFolder(tabName);

    if (tabName == null || tabName.trim().length() == 0) {
        newTab.setName(BLANK_TAB_NAME);
    }
    String siblingId=null;
    if(method.equals("insertBefore"))
      siblingId=destinationTabId;
    ulm.addNode(newTab,ulm.getRootFolderId(),siblingId);
View Full Code Here

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

   * @param destinationElementId the column to insert the new column before or append after (may actually be a tab)
   * @throws Exception
   */
  private final void addColumn(String method, String destinationElementId) throws Exception
  {
      IUserLayoutFolderDescription newColumn = createFolder("Column");
    // Insert a column if the destination element is a tab
      if(isTab(destinationElementId)) {
          ulm.addNode(newColumn,destinationElementId,null);
      } else if(isColumn(destinationElementId)) {
          String siblingId=null;
View Full Code Here

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

   * @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.IUserLayoutFolderDescription

    ulStore.setStructureStylesheetUserPreferences(staticData.getPerson(), profileId, ssup);
  }

  private final void renameTab(String tabId, String tabName) throws PortalException
  {
      IUserLayoutFolderDescription tab=(IUserLayoutFolderDescription)ulm.getNode(tabId);
      if(ulm.canUpdateNode(ulm.getNode(tabId))) {
          if (tabName == null || tabName.trim().length() == 0) {
              tab.setName(BLANK_TAB_NAME);
          } else {
              tab.setName(tabName);
          }
          ulm.updateNode(tab);
      } else {
          throw new PortalException("Attempt to rename immutable tab " + tabId + "has failed");
      }
View Full Code Here

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

   * @throws PortalException
   */
  private final void addTab(String tabName, String method, String destinationTabId) throws PortalException
  {

    IUserLayoutFolderDescription newTab = createFolder(tabName);
    if (tabName == null || tabName.trim().length() == 0) {
        newTab.setName(BLANK_TAB_NAME);
    }
    String siblingId=null;
    if(method.equals("insertBefore"))
      siblingId=destinationTabId;
    ulm.addNode(newTab,ulm.getRootFolderId(),siblingId);

    // Add a new column to this tab
    IUserLayoutFolderDescription newColumn = createFolder("Column");
    ulm.addNode(newColumn, newTab.getId(), null);   
  }
View Full Code Here

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

   * @param destinationElementId the column to insert the new column before or append after (may actually be a tab)
   * @throws Exception
   */
  private final void addColumn(String method, String destinationElementId) throws Exception
  {
      IUserLayoutFolderDescription newColumn = createFolder("Column");
      // Insert a column if the destination element is a tab
      if(isTab(destinationElementId)) {
          ulm.addNode(newColumn,destinationElementId,null);
      } else if(isColumn(destinationElementId)) {
          String siblingId=null;
View Full Code Here

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

   * @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
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.