Examples of IUserLayoutFolderDescription


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

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

    int profileId = editedUserProfile.getProfileId();
    ulStore.setStructureStylesheetUserPreferences(staticData.getPerson(), profileId, ssup);
  }

  private final void renameTab(String tabId, String tabName, String tabExternalId) 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);

          // Update the externalId...
          StructureStylesheetUserPreferences ssup = userPrefs.getStructureStylesheetUserPreferences();
          if (tabExternalId != null && tabExternalId.trim().length() != 0) {
              try {
                  ssup.setFolderAttributeValue(tab.getId(), "externalId", tabExternalId);
                  ulStore.setStructureStylesheetUserPreferences(staticData.getPerson(),
                                editedUserProfile.getProfileId(), ssup);
              } catch (Exception e) {
                throw new PortalException("Failed to set the 'externalId' attribute of tab '" +
                            tabId + "' in StructureStylesheetUserPreferences", e);
              }
          } else {
            // tabExternalId is not specified... need to remove it if present...
            if (ssup.getDefinedFolderAttributeValue(tab.getId(), "externalId") != null) {
              // It *is* previously specified, and being removed...
                  try {
                    // Setting to null and saving will remove it from DB.
                      ssup.setFolderAttributeValue(tab.getId(), "externalId", null);
                      ulStore.setStructureStylesheetUserPreferences(staticData.getPerson(),
                                  editedUserProfile.getProfileId(), ssup);
                  } catch (Exception e) {
                    throw new PortalException("Failed to remove the 'externalId' attribute of tab '" +
                                tabId + "' in StructureStylesheetUserPreferences", e);
View Full Code Here

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

                String tabExternalId,
                            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);

    // Update the externalId...
    if (tabExternalId != null) {
        try {
            StructureStylesheetUserPreferences ssup = userPrefs.getStructureStylesheetUserPreferences();
            ssup.setFolderAttributeValue(newTab.getId(), "externalId", tabExternalId);
            int profileId = editedUserProfile.getProfileId();
            ulStore.setStructureStylesheetUserPreferences(staticData.getPerson(), profileId, ssup);
        } catch (Exception e) {
          throw new PortalException("Failed to set the 'externalId' attribute of tab '" +
                newTab.getId() + "' in StructureStylesheetUserPreferences", e);
        }
    }

    saveLayout(false);
  }
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

    EventPublisherLocator.getApplicationEventPublisher().publishEvent(new ChannelRemovedFromLayoutPortalEvent(this, person, profile, channelDesc, ev.getOldParentNode()));
  }

  // Folders...
  public void folderAdded(LayoutEvent ev) {
    IUserLayoutFolderDescription folderDesc = (IUserLayoutFolderDescription)ev.getNodeDescription();
    EventPublisherLocator.getApplicationEventPublisher().publishEvent(new UserAddedFolderToLayoutPortalEvent(this, person, profile, folderDesc));
  }
View Full Code Here

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

    IUserLayoutFolderDescription folderDesc = (IUserLayoutFolderDescription)ev.getNodeDescription();
    EventPublisherLocator.getApplicationEventPublisher().publishEvent(new UserAddedFolderToLayoutPortalEvent(this, person, profile, folderDesc));
  }
 
  public void folderUpdated(LayoutEvent ev) {
    IUserLayoutFolderDescription folderDesc = (IUserLayoutFolderDescription)ev.getNodeDescription();
    EventPublisherLocator.getApplicationEventPublisher().publishEvent(new UserUpdatedFolderInLayoutPortalEvent(this, person, profile, folderDesc));  
  }
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.