Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle WebCenter
11g Release 1 (11.1.1.4.0)
E15995-03


oracle.webcenter.navigationframework
Interface NavigationModel


public interface NavigationModel

Used to access the navigation model metadata. The object implementing this interface is EL accessible as:
#{navigationContext.defaultNavigationModel}
#{navigationContext.currentNavigationModel}
#{navigationContext.navigationModel['/oracle/webcenter/portalapp/navigations/default-navigation-model']}

Since:
11.1.1.4.0

Field Summary
static java.lang.String MODEL_TYPE_LIST
          Parameter value to use to return a List of NavigationResource object
static java.lang.String MODEL_TYPE_MENU
          Parameter value to use to return a ChildPropertyMenuModel object
static java.lang.String MODEL_TYPE_TREE
          Parameter value to use to return a ChildPropertyTreeModel object
static java.lang.String PARAM_EL_DEPTH
          Parameter that defines the initial depth of fetching
EL: #{navigationContext.defaultNavigationModel.treeModel['depth=1']}
static java.lang.String PARAM_EL_INCLUDE_START_NODE
          Parameter that defines whether to include the starting node
EL: #{navigationContext.defaultNavigationModel.treeModel['includeStartNode=true']}
static java.lang.String PARAM_EL_MODEL_TYPE
          Parameter that defines the type of collection you want back as defined by MODEL_TYPE_* constants.
static java.lang.String PARAM_EL_PREFETCH_ONLY
          Parameter that defines whether to return nodes up to the depth level requested initially
EL: #{navigationContext.defaultNavigationModel.treeModel['prefetchOnly=false']}
static java.lang.String PARAM_EL_START_NODE
          Parameter that defines the path of the starting node
EL: #{navigationContext.defaultNavigationModel.treeModel['startNode=home']}

 

Method Summary
 java.lang.Object evalParamExpr(java.util.Map params)
           
 java.util.Map<java.lang.String,java.lang.String> getAttributes()
          Returns a mutable Map of all the NavigationModel attributes
EL: #{navigationContext.defaultNavigationModel.attributes['Description']}
 NavigationResource getCurrentSelection()
          Returns the currently selected NavigationResource
EL: #{navigationContext.defaultNavigationModel.currentSelection}
 java.lang.Object getDataModel(java.util.Map params)
          Returns a collection object representing the navigation based on the Map of parameters passed in.
 java.util.List<NavigationResource> getDefaultListModel()
          Returns a List with default settings for the navigation model
EL: #{navigationContext.defaultNavigationModel.defaultListModel}
 org.apache.myfaces.trinidad.model.MenuModel getDefaultMenuModel()
          Returns a MenuModel with default settings for the navigation model
EL: #{navigationContext.defaultNavigationModel.defaultMenuModel}
 java.lang.String getDefaultSiteMap()
          Returns SiteMap XML based on the default settings.
 org.apache.myfaces.trinidad.model.TreeModel getDefaultTreeModel()
          Returns a TreeModel with default settings for the navigation model
EL: #{navigationContext.defaultNavigationModel.defaultTreeModel}
 java.lang.String getMetadataId()
          Returns the id of the NavigationModel object
 java.lang.String getMetadataScope()
          Returns the scope of the NavigationModel object
 NavigationResource getResource(java.lang.String resourceId)
          Returns the NavigationResource identified by the resource id.
 NavigationResource getRootNode()
          Returns the root node of the NavigationModel
EL: #{navigationContext.defaultNavigationModel.rootNode}
 void invalidateCache()
          Invalidates the cache maintains by the NavigationModel object
 void setCurrentSelection(NavigationResource navResource)
          Set the NavigationResource as the current selection
 void setNewCurrentSelection(java.lang.String nodePath)
          Update the current selection given the node path

 

Field Detail

PARAM_EL_START_NODE

static final java.lang.String PARAM_EL_START_NODE
Parameter that defines the path of the starting node
EL: #{navigationContext.defaultNavigationModel.treeModel['startNode=home']}

This parameter can be used in combination with other parameters. When used in an EL, comma-separate each parameter. For example, #{navigationContext.defaultNavigationModel.treeModel['startNode=home,includeStartNode=true']}

See Also:
Constant Field Values

PARAM_EL_INCLUDE_START_NODE

static final java.lang.String PARAM_EL_INCLUDE_START_NODE
Parameter that defines whether to include the starting node
EL: #{navigationContext.defaultNavigationModel.treeModel['includeStartNode=true']}

If true, include the starting node, otherwise start from its children. This parameter can be used in combination with other parameters. When used in an EL, comma-separate each parameter. For example, #{navigationContext.defaultNavigationModel.treeModel['startNode=home,includeStartNode=true']}

See Also:
Constant Field Values

PARAM_EL_DEPTH

static final java.lang.String PARAM_EL_DEPTH
Parameter that defines the initial depth of fetching
EL: #{navigationContext.defaultNavigationModel.treeModel['depth=1']}

depth=0 means to fetch the entire tree. This parameter can be used in combination with other parameters. When used in an EL, comma-separate each parameter. For example, #{navigationContext.defaultNavigationModel.treeModel['startNode=home,includeStartNode=true']}

See Also:
Constant Field Values

PARAM_EL_PREFETCH_ONLY

static final java.lang.String PARAM_EL_PREFETCH_ONLY
Parameter that defines whether to return nodes up to the depth level requested initially
EL: #{navigationContext.defaultNavigationModel.treeModel['prefetchOnly=false']}

If true, deeper level nodes can be returned on demand. Use false if you only want the initial sets of nodes. In which case, it doesn't return deeper nodes later on when requested even when there are deeper nodes This parameter can be used in combination with other parameters. When used in an EL, comma-separate each parameter. For example, #{navigationContext.defaultNavigationModel.treeModel['startNode=home,includeStartNode=true']}

See Also:
Constant Field Values

PARAM_EL_MODEL_TYPE

static final java.lang.String PARAM_EL_MODEL_TYPE
Parameter that defines the type of collection you want back as defined by MODEL_TYPE_* constants. This parameter can be used in combination with other parameters. When used in an EL, comma-separate each parameter. For example, #{navigationContext.defaultNavigationModel.treeModel['startNode=home,includeStartNode=true']}
See Also:
Constant Field Values

MODEL_TYPE_LIST

static final java.lang.String MODEL_TYPE_LIST
Parameter value to use to return a List of NavigationResource object
See Also:
PARAM_EL_MODEL_TYPE, Constant Field Values

MODEL_TYPE_TREE

static final java.lang.String MODEL_TYPE_TREE
Parameter value to use to return a ChildPropertyTreeModel object
See Also:
PARAM_EL_MODEL_TYPE, Constant Field Values

MODEL_TYPE_MENU

static final java.lang.String MODEL_TYPE_MENU
Parameter value to use to return a ChildPropertyMenuModel object
See Also:
PARAM_EL_MODEL_TYPE, Constant Field Values

Method Detail

getMetadataScope

java.lang.String getMetadataScope()
Returns the scope of the NavigationModel object
Returns:

getMetadataId

java.lang.String getMetadataId()
Returns the id of the NavigationModel object
Returns:

invalidateCache

void invalidateCache()
Invalidates the cache maintains by the NavigationModel object

getResource

NavigationResource getResource(java.lang.String resourceId)
                               throws ResourceNotFoundException
Returns the NavigationResource identified by the resource id.
Parameters:
resourceId - the resource id can be id-driven path or title-driven path
Returns:
Throws:
ResourceNotFoundException - if no resource matches the resourceId

getRootNode

NavigationResource getRootNode()
Returns the root node of the NavigationModel
EL: #{navigationContext.defaultNavigationModel.rootNode}
Returns:
root node

getAttributes

java.util.Map<java.lang.String,java.lang.String> getAttributes()
Returns a mutable Map of all the NavigationModel attributes
EL: #{navigationContext.defaultNavigationModel.attributes['Description']}

The returned Map implements the entire contract for a modifiable map as described in java.util.Map. These includes put() (to create/update), get() (to read) and, remove() (to delete).

Returns:
a mutable Map of all the attributes

setCurrentSelection

void setCurrentSelection(NavigationResource navResource)
Set the NavigationResource as the current selection
Parameters:
navResource -

getCurrentSelection

NavigationResource getCurrentSelection()
Returns the currently selected NavigationResource
EL: #{navigationContext.defaultNavigationModel.currentSelection}
Returns:
the currently selected NavigationResource

evalParamExpr

java.lang.Object evalParamExpr(java.util.Map params)

getDataModel

java.lang.Object getDataModel(java.util.Map params)
Returns a collection object representing the navigation based on the Map of parameters passed in. The parameters are defined by the PARAM_EL_* constants
Returns:
a collection object type depending on the PARAM_EL_MODEL_TYPE parameter

getDefaultTreeModel

org.apache.myfaces.trinidad.model.TreeModel getDefaultTreeModel()
Returns a TreeModel with default settings for the navigation model
EL: #{navigationContext.defaultNavigationModel.defaultTreeModel}

The default settings are: startPath = / includeStartNode = true depth = 0 (return whole depth)

Returns:

getDefaultMenuModel

org.apache.myfaces.trinidad.model.MenuModel getDefaultMenuModel()
Returns a MenuModel with default settings for the navigation model
EL: #{navigationContext.defaultNavigationModel.defaultMenuModel}

The default settings are: startPath = / includeStartNode = true depth = 0 (return whole depth)

Returns:

getDefaultListModel

java.util.List<NavigationResource> getDefaultListModel()
Returns a List with default settings for the navigation model
EL: #{navigationContext.defaultNavigationModel.defaultListModel}

The default settings are: startPath = / includeStartNode = true depth = 0 (return whole depth)

Returns:

getDefaultSiteMap

java.lang.String getDefaultSiteMap()
Returns SiteMap XML based on the default settings. The SiteMap will return a flat list of "navigable" nodes within the navigation model. It won't return entries for items for non-navigable items such as "separators" and "folders".

The default settings are: startPath = / includeStartNode = true EL: #{navigationContext.defaultNavigationModel.defaultSiteMap}

Returns:
site map XML

setNewCurrentSelection

void setNewCurrentSelection(java.lang.String nodePath)
Update the current selection given the node path
Parameters:
nodePath - node path to the selected resource

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle WebCenter
11g Release 1 (11.1.1.4.0)
E15995-03


Copyright © 2009, 2011, Oracle and/or its affiliates. All rights reserved.