Class NavigationPoint

java.lang.Object
com.jbstrap.core.NavigationPoint

public class NavigationPoint extends Object
Since:
4.0
Author:
JBStrap
  • Constructor Details

    • NavigationPoint

      public NavigationPoint(String pageId, Class<? extends UI> uiClass, Class<? extends BasePage> pageClass)
      Parameters:
      pageId - The page ID
      uiClass - The UI class, where the page will be displayed
      pageClass - The page class
      Throws:
      NullPointerException - If any of the parameters was specified as null
  • Method Details

    • addParameter

      public NavigationPoint addParameter(String name, Object value)
      Parameters:
      name - The parameter name. If the name is already used, it will be overwritten
      value - The parameter value
      Returns:
      The navigation point
      Throws:
      NullPointerException - If the parameter name is specified as null
    • addParameters

      public NavigationPoint addParameters(Parameters parameters)
      Parameters:
      parameters - The object containing the parameters. If one of the parameters already exits on the navigation point, it will be overwritten. The other parameters won't be modified, they will remain accessible.
      Returns:
      The navigation point
    • getParameters

      public Parameters getParameters()
      Returns:
      The object containing the parameters. If the navigation point has no parameters, the Parameters object will be empty.
    • getUIClass

      public Class<? extends UI> getUIClass()
      Returns:
      The UI class
    • getPageClass

      public Class<? extends BasePage> getPageClass()
      Returns:
      The page class
    • getPageId

      public String getPageId()
      Returns:
      The page ID
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • getUIInstance

      public UI getUIInstance(String clientId)
      Parameters:
      clientId - The client, where the UI has to be displayed
      Returns:
      The UI instance or null, if the UI instance couldn't be created.
    • isPublicUI

      public boolean isPublicUI()
      Returns:
      true, if the UI is public, otherwise false
    • getPageInstance

      public BasePage getPageInstance(UI ui, Parameters userParam)
      Parameters:
      ui - The UI instance, where the page will be displayed
      userParam - The dynamic parameters, that are specified when the page is opened. These parameters will be merged with the navigation point's parameters. If the specified parameters contain parameters, that have the same name as a navigation point parameter, then the specified parameter value will overwrite the navigation point one.
      Returns:
      The page instance or null, if it couldn't be created.
    • copy

      public NavigationPoint copy()
      Returns:
      The new instance, that is a complete copy of the current navigation point