Oracle Fusion Middleware extensions for Applications Core API Reference
11g Release 1 (11.1.1.6)

E22562-03

oracle.apps.fnd.applcore.patterns.uishell.model
Class DistributedMenuModel

java.lang.Object
  extended by javax.faces.model.DataModel
      extended by org.apache.myfaces.trinidad.model.CollectionModel
          extended by org.apache.myfaces.trinidad.model.TreeModel
              extended by org.apache.myfaces.trinidad.model.MenuModel
                  extended by org.apache.myfaces.trinidad.model.BaseMenuModel
                      extended by oracle.apps.fnd.applcore.patterns.uishell.model.DistributedMenuModel
All Implemented Interfaces:
java.io.Serializable, org.apache.myfaces.trinidad.model.LocalRowKeyIndex, org.apache.myfaces.trinidad.model.RowKeyIndex, org.apache.myfaces.trinidad.model.TreeLocalRowKeyIndex

public class DistributedMenuModel
extends org.apache.myfaces.trinidad.model.BaseMenuModel
implements java.io.Serializable

Distributed Menu Model that's used for rendering Navigator Menu, and/or Home Page Tabs, and/or Preferences Menu.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.myfaces.trinidad.model.LocalRowKeyIndex
org.apache.myfaces.trinidad.model.LocalRowKeyIndex.Confidence, org.apache.myfaces.trinidad.model.LocalRowKeyIndex.LocalCachingStrategy
 
Constructor Summary
DistributedMenuModel(java.util.List<SimpleMenuNode> simpleNodes)
          Constructs a DistributedMenuModel.
DistributedMenuModel(java.util.List<SimpleMenuNode> simpleNodes, boolean secured)
          Constructs a DistributedMenuModel.
 
Method Summary
 java.lang.Object getCustomProperty(java.lang.Object node, java.lang.String propName)
          Gets the list of custom properties from the node and returns the value of propName.
 java.lang.Object getFocusRowKey()
          Returns the rowKey to the current viewId, or in the case of where the model has nodes with duplicate viewId's and one is encountered, we return the rowKey of the currently selected node.
 java.lang.Object getNode(java.lang.String id)
          Get a the MenuNode corresponding to the key "id" from the node id hashmap.
 java.util.Map<java.lang.String,java.util.List<java.lang.Object>> getViewIdFocusPathMap()
          Get the Model's viewIdFocusPathMap
 void setWrappedData(java.lang.Object data)
          Makes the TreeModel part of the menu model.
 
Methods inherited from class org.apache.myfaces.trinidad.model.BaseMenuModel
enterContainer, exitContainer, getContainerRowKey, getRowCount, getRowData, getRowIndex, getRowKey, getWrappedData, isContainer, isRowAvailable, setRowIndex, setRowKey
 
Methods inherited from class org.apache.myfaces.trinidad.model.TreeModel
areRowsLocallyAvailable, areRowsLocallyAvailable, areRowsLocallyAvailable, getAllAncestorContainerRowKeys, getContainerRowKey, getDepth, getDepth, isChildCollectionLocallyAvailable, isChildCollectionLocallyAvailable, isChildCollectionLocallyAvailable, isContainerEmpty
 
Methods inherited from class org.apache.myfaces.trinidad.model.CollectionModel
areRowsLocallyAvailable, areRowsLocallyAvailable, areRowsLocallyAvailable, clearCachedRow, clearCachedRow, clearCachedRows, clearCachedRows, clearLocalCache, getCachingStrategy, getEstimatedRowCount, getEstimatedRowCountConfidence, getRowData, getSortCriteria, isRowAvailable, isRowLocallyAvailable, isRowLocallyAvailable, isSortable, setSortCriteria
 
Methods inherited from class javax.faces.model.DataModel
addDataModelListener, getDataModelListeners, removeDataModelListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DistributedMenuModel

public DistributedMenuModel(java.util.List<SimpleMenuNode> simpleNodes)
Constructs a DistributedMenuModel.

Parameters:
simpleNodes - The client side will need to call MenuModelService.getSimpleNodeList() to get the List of SimpleMenuNode. Then, use the list for creating an instance of DistributedMenuModel.

DistributedMenuModel

public DistributedMenuModel(java.util.List<SimpleMenuNode> simpleNodes,
                            boolean secured)
Constructs a DistributedMenuModel.

Parameters:
simpleNodes - The client side will need to call MenuModelService.getSimpleNodeList() to get the List of SimpleMenuNode. Then, use the list for creating an instance of DistributedMenuModel.
secured - a boolean to indicate if this is called by constructing a secured DistributedMenuModel, or non-secured. When it's non-secured, we do not remove nodes that do not have matching webApp entries in FND_DEPLOYMENTS.
Method Detail

setWrappedData

public void setWrappedData(java.lang.Object data)
Makes the TreeModel part of the menu model. Also creates the _viewIdFocusPathMap, _nodeFocusPathMap, and idNodeMaps.

Overrides:
setWrappedData in class org.apache.myfaces.trinidad.model.BaseMenuModel
Parameters:
data - The Tree Model instance

getFocusRowKey

public java.lang.Object getFocusRowKey()
Returns the rowKey to the current viewId, or in the case of where the model has nodes with duplicate viewId's and one is encountered, we return the rowKey of the currently selected node.

The getFocusRowKey method

tmak: need to override this method because _viewIdFocusPathMap and _nodeFocusPathMap are private and are set in this class in setWrappedData() method.

Specified by:
getFocusRowKey in class org.apache.myfaces.trinidad.model.MenuModel
Returns:
the rowKey to the node with the current viewId or null if the current viewId can't be found.

getNode

public java.lang.Object getNode(java.lang.String id)
Get a the MenuNode corresponding to the key "id" from the node id hashmap. tmak: need to override this method because _idNodeMap is private and is set in this class in setWrappedData() method.

Parameters:
id - - String node id key for the hashmap entry.
Returns:
The MenuNode that corresponds to id.

getCustomProperty

public java.lang.Object getCustomProperty(java.lang.Object node,
                                          java.lang.String propName)
Gets the list of custom properties from the node and returns the value of propName. Node must be an itemNode. If it is not an itemNode, the node will not have any custom properties and null will be returned.

Parameters:
node - Object used to get its list of custom properties
propName - String name of the property whose value is desired
Returns:
Object value of propName for Object node.

getViewIdFocusPathMap

public java.util.Map<java.lang.String,java.util.List<java.lang.Object>> getViewIdFocusPathMap()
Get the Model's viewIdFocusPathMap

Returns:
the Model's viewIdFocusPathMap

Oracle Fusion Middleware extensions for Applications Core API Reference
11g Release 1 (11.1.1.6)

E22562-03

Copyright © 2012 Oracle. All Rights Reserved.