Class NavigationExtender

java.lang.Object
com.polarion.alm.ui.server.navigation.NavigationExtender

public abstract class NavigationExtender extends Object
NavigationExtender represents the main topic in the navigation panel. It has it's own id and label. If it has a non-null or not-empty pageUrl, it will also open it's own page in the main IFRAME. It also contains a list of root nodes of it's navigation tree.
Since:
3.8.0
  • Constructor Details

    • NavigationExtender

      public NavigationExtender()
  • Method Details

    • getId

      @NotNull public abstract String getId()
      Returns the id of the NavigationExtender.
      Returns:
      id of the extender.
    • getLabel

      @NotNull public abstract String getLabel()
      Returns the localized label of the NavigationExtender.
      Returns:
      label to be displayed in the navigation panel.
    • getIconUrl

      @Nullable public abstract String getIconUrl()
      Returns the URL of the topic's icon.
      Returns:
      URL of the icon associated with the topic
    • getPageUrl

      @Nullable public abstract String getPageUrl(IContextId contextId)
      Returns URL to be opened in the main IFRAME. If the URL is present, clicking the topic will open it. If the URL is not present, clicking the topic will open it and show it's children. If URL is from local site (the same hostname, subdomain, and port) the navigation will try to check for unsaved changes by calling 'areThereUnsavedChanges()' global JavaScript method on provided URL when user leaves it. If URL is from a different site, no check about unsaved changes will be performed. Polarion will append an attribute named "token" to the URL. In order to get the associated username from the token, use SecurityWebService.getUserFromToken(String) with the value of the attribute "token" as parameter.
      Parameters:
      contextId -
      Returns:
      associated URL to be opened in IFRAME in this context. null if there is no URL.
    • requiresToken

      public abstract boolean requiresToken()
      Returns true if page requires a token. If true, polarion will append an attribute named "token" to the URL. In order to get the associated username from the token, use SecurityWebService.getUserFromToken(String) with the value of the attribute "token" as parameter.
      Returns:
      true if token is required
    • getRootNodes

      @NotNull public abstract List<NavigationExtenderNode> getRootNodes(@NotNull IContextId contextId)
      NavigationExtender needs only to know it's root nodes, as the root nodes themselves keep track of their children. This method returns these root nodes based on the context.
      Returns:
      list of root nodes or an empty List.