Package com.jbstrap.core
Class NavigationPoint
java.lang.Object
com.jbstrap.core.NavigationPoint
- Since:
- 4.0
- Author:
- JBStrap
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddParameter
(String name, Object value) addParameters
(Parameters parameters) copy()
boolean
getPageInstance
(UI ui, Parameters userParam) getUIInstance
(String clientId) boolean
-
Constructor Details
-
NavigationPoint
public NavigationPoint(String pageId, Class<? extends UI> uiClass, Class<? extends BasePage> pageClass) - Parameters:
pageId
- The page IDuiClass
- The UI class, where the page will be displayedpageClass
- The page class- Throws:
NullPointerException
- If any of the parameters was specified asnull
-
-
Method Details
-
addParameter
- Parameters:
name
- The parameter name. If the name is already used, it will be overwrittenvalue
- The parameter value- Returns:
- The navigation point
- Throws:
NullPointerException
- If the parameter name is specified asnull
-
addParameters
- 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
- Returns:
- The object containing the parameters. If the navigation point has no parameters, the Parameters object will be empty.
-
getUIClass
- Returns:
- The UI class
-
getPageClass
- Returns:
- The page class
-
getPageId
- Returns:
- The page ID
-
equals
-
getUIInstance
- 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, otherwisefalse
-
getPageInstance
- Parameters:
ui
- The UI instance, where the page will be displayeduserParam
- 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
- Returns:
- The new instance, that is a complete copy of the current navigation point
-