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 NavigationResource


public interface NavigationResource

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

Since:
11.1.1.4.0

Nested Class Summary
static class NavigationResource.ResourceType
          Enumeration of type of resource

 

Method Summary
 java.util.List<NavigationResource> getAncestors()
          Returns the hierarchy list of ancestors of this node (of type NavigationResource) starting with the root node.
EL: #{navigationContext.defaultNavigationModel.currentSelection.ancestors}
 java.util.Map<java.lang.String,java.lang.Object> getAttributes()
          Returns a mutable Map of all the resource attributes
EL: #{navigationContext.defaultNavigationModel.currentSelection.attributes['Description']}
 NavigationResource getChildByTitle(java.lang.String title)
          Gets the child by title
 int getChildCount()
          Returns the number of children of this node
EL: #{navigationContext.defaultNavigationModel.currentSelection.childCount
 java.util.List<NavigationResource> getChildren()
          Returns the List of children of this resource
EL: #{navigationContext.defaultNavigationModel.currentSelection.children}
EL: #{navigationContext.defaultNavigationModel.currentSelection.children[0]}
 int getDepth()
          Returns the depth of this node from the root node.
 java.lang.String getExternalURL()
          Returns the URL for the navigation resource of type External Link
 java.lang.String getGoLinkPrettyUrl()
          Returns the URL for goLink destination
EL: #{navigationContext.defaultNavigationModel.currentSelection.goLinkPrettyUrl}
 int getIndex()
          Returns the zero-relative index of this node relative to its siblings
EL: #{navigationContext.defaultNavigationModel.currentSelection.index
 NavigationModel getNavigationModel()
          Returns the NavigationModel of this resource
 NavigationResource getNextSibling()
          Returns the next sibling in the list (of type NavigationResource) of this node
EL: #{navigationContext.defaultNavigationModel.currentSelection.nextSibling
 java.util.Map<java.lang.String,java.lang.String> getParameters()
          Returns a mutable Map of all the resource parameters
EL: #{navigationContext.defaultNavigationModel.currentSelection.parameters['StockSymbol']}
 java.util.Map<java.lang.String,java.lang.String> getParametersRaw()
          Returns a mutable Map of all the resource parameters with raw value
EL: #{navigationContext.defaultNavigationModel.currentSelection.parametersRaw['StockSymbol']}
 NavigationResource getParent()
          Returns the parent of this this resource
EL: #{navigationContext.defaultNavigationModel.currentSelection.parent}
 java.lang.String getPath()
          Returns the path of the resource
EL: #{navigationContext.defaultNavigationModel.currentSelection.path}
 java.lang.String getPrettyUrl()
          Returns the PrettyURL of the resource
EL: #{navigationContext.defaultNavigationModel.currentSelection.prettyUrl}
 java.util.List<java.lang.String> getPrettyUrlPath()
          Returns a Collection of identifying paths by depth so it can be used as a starting path to drive another navigation view
EL: #{navigationContext.defaultNavigationModel.currentSelection.prettyUrlPath}
EL: #{navigationContext.defaultNavigationModel.currentSelection.prettyUrlPath[3]}
 NavigationResource getPreviousSibling()
          Returns the previous sibling in the list (of type NavigationResource) of this node
EL: #{navigationContext.defaultNavigationModel.currentSelection.previousSibling
 java.util.List<NavigationResource> getSiblings()
          Returns the List of siblings (of type NavigationResource) of this node (inclusive)
EL: #{navigationContext.defaultNavigationModel.currentSelection.siblings
 java.lang.String getTitle()
          Returns the title of the resource
EL: #{navigationContext.defaultNavigationModel.currentSelection.title}
 java.awt.datatransfer.Transferable getTransferable()
          Returns the Transferable for this resource
 java.lang.Object getTransferData(java.awt.datatransfer.DataFlavor dataFlavor)
          Returns the transfer data for the specified dataFlavor
 NavigationResource.ResourceType getType()
          Returns the type of the resource.
 boolean isCurrentlySelected()
          Returns whether the resource is the currently selected resource and the model is the currently selected model
EL: #{navigationContext.defaultNavigationModel.currentSelection.currentlySelected}
 boolean isLeaf()
          Returns whether this resource is a leaf node
EL: #{navigationContext.defaultNavigationModel.currentSelection.leaf}
 boolean isNavigable()
          Returns whether the resource can be navigated to
EL: #{navigationContext.defaultNavigationModel.currentSelection.navigable}
 boolean isOnSelectedPath()
          Returns whether this node lies on the selected path
EL: #{navigationContext.defaultNavigationModel.currentSelection.onSelectedPath}
 boolean isSelected()
          Returns whether the resource is the currently selected resource
EL: #{navigationContext.defaultNavigationModel.currentSelection.selected}
 boolean isSeparator()
          Returns whether the resource is a separator
EL: #{navigationContext.defaultNavigationModel.currentSelection.separator}
 void setChildren(java.util.List<NavigationResource> children)
          Sets the children of this resource

 

Method Detail

getType

NavigationResource.ResourceType getType()
Returns the type of the resource.
Returns:
See Also:
NavigationResource.ResourceType

isSeparator

boolean isSeparator()
Returns whether the resource is a separator
EL: #{navigationContext.defaultNavigationModel.currentSelection.separator}
Returns:
true if the resource is separator; false otherwise.

getTitle

java.lang.String getTitle()
Returns the title of the resource
EL: #{navigationContext.defaultNavigationModel.currentSelection.title}
Returns:
the title of the resource

getPath

java.lang.String getPath()
Returns the path of the resource
EL: #{navigationContext.defaultNavigationModel.currentSelection.path}
Returns:
the path of the resource

getPrettyUrl

java.lang.String getPrettyUrl()
Returns the PrettyURL of the resource
EL: #{navigationContext.defaultNavigationModel.currentSelection.prettyUrl}
Returns:
the prettyURL

getPrettyUrlPath

java.util.List<java.lang.String> getPrettyUrlPath()
Returns a Collection of identifying paths by depth so it can be used as a starting path to drive another navigation view
EL: #{navigationContext.defaultNavigationModel.currentSelection.prettyUrlPath}
EL: #{navigationContext.defaultNavigationModel.currentSelection.prettyUrlPath[3]}

For example, assuming the currentSelection is "home/company/products/applications", the following EL: #{..currentSelection.prettyUrlPath[3]} would return "home/company/products"

Returns:
a Collection of paths by depth

getAttributes

java.util.Map<java.lang.String,java.lang.Object> getAttributes()
Returns a mutable Map of all the resource attributes
EL: #{navigationContext.defaultNavigationModel.currentSelection.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

getParameters

java.util.Map<java.lang.String,java.lang.String> getParameters()
Returns a mutable Map of all the resource parameters
EL: #{navigationContext.defaultNavigationModel.currentSelection.parameters['StockSymbol']}

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 parameters

getParametersRaw

java.util.Map<java.lang.String,java.lang.String> getParametersRaw()
Returns a mutable Map of all the resource parameters with raw value
EL: #{navigationContext.defaultNavigationModel.currentSelection.parametersRaw['StockSymbol']}

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 parameters

getChildByTitle

NavigationResource getChildByTitle(java.lang.String title)
Gets the child by title
Parameters:
title -
Returns:
child of the given title

getChildren

java.util.List<NavigationResource> getChildren()
Returns the List of children of this resource
EL: #{navigationContext.defaultNavigationModel.currentSelection.children}
EL: #{navigationContext.defaultNavigationModel.currentSelection.children[0]}
Returns:
the List of children

setChildren

void setChildren(java.util.List<NavigationResource> children)
Sets the children of this resource
Parameters:
children - the List of children to set

getParent

NavigationResource getParent()
Returns the parent of this this resource
EL: #{navigationContext.defaultNavigationModel.currentSelection.parent}
Returns:
the parent of this resource or null for root node

getAncestors

java.util.List<NavigationResource> getAncestors()
Returns the hierarchy list of ancestors of this node (of type NavigationResource) starting with the root node.
EL: #{navigationContext.defaultNavigationModel.currentSelection.ancestors}

Eg: assuming the current node is "home/company/products/applications", the following EL: #{node.ancestors[1]} would return the node for "home" #{node.ancestors[3]} would return the node for "home/company/products"

Returns:
a List of ancestor nodes

getDepth

int getDepth()
Returns the depth of this node from the root node. Root node has a depth of zero.
EL: #{navigationContext.defaultNavigationModel.currentSelection.depth}
Returns:
the depth from root node

getSiblings

java.util.List<NavigationResource> getSiblings()
Returns the List of siblings (of type NavigationResource) of this node (inclusive)
EL: #{navigationContext.defaultNavigationModel.currentSelection.siblings
Returns:
a List of sibling nodes

getNextSibling

NavigationResource getNextSibling()
Returns the next sibling in the list (of type NavigationResource) of this node
EL: #{navigationContext.defaultNavigationModel.currentSelection.nextSibling
Returns:
the next sibling in the list

getPreviousSibling

NavigationResource getPreviousSibling()
Returns the previous sibling in the list (of type NavigationResource) of this node
EL: #{navigationContext.defaultNavigationModel.currentSelection.previousSibling
Returns:
the previous sibling in the list

getIndex

int getIndex()
Returns the zero-relative index of this node relative to its siblings
EL: #{navigationContext.defaultNavigationModel.currentSelection.index
Returns:
the zero-relative index relative to its siblings

isLeaf

boolean isLeaf()
Returns whether this resource is a leaf node
EL: #{navigationContext.defaultNavigationModel.currentSelection.leaf}
Returns:
true if the resource is a leaf node; false otherwise.

isOnSelectedPath

boolean isOnSelectedPath()
Returns whether this node lies on the selected path
EL: #{navigationContext.defaultNavigationModel.currentSelection.onSelectedPath}
Returns:
true if the resource lies on the selected path; false otherwise.

getChildCount

int getChildCount()
Returns the number of children of this node
EL: #{navigationContext.defaultNavigationModel.currentSelection.childCount
Returns:
the zero-relative index relative to its siblings

isNavigable

boolean isNavigable()
Returns whether the resource can be navigated to
EL: #{navigationContext.defaultNavigationModel.currentSelection.navigable}
Returns:
true if the resource can be navigated to; false otherwise.

isSelected

boolean isSelected()
Returns whether the resource is the currently selected resource
EL: #{navigationContext.defaultNavigationModel.currentSelection.selected}
Returns:
true if the resource is currently selected; false otherwise.

isCurrentlySelected

boolean isCurrentlySelected()
Returns whether the resource is the currently selected resource and the model is the currently selected model
EL: #{navigationContext.defaultNavigationModel.currentSelection.currentlySelected}
Returns:
true if the resource and model are currently selected; false otherwise.

getTransferable

java.awt.datatransfer.Transferable getTransferable()
Returns the Transferable for this resource
Returns:
the Transferable

getTransferData

java.lang.Object getTransferData(java.awt.datatransfer.DataFlavor dataFlavor)
Returns the transfer data for the specified dataFlavor
Parameters:
dataFlavor -
Returns:
the transfer data

getExternalURL

java.lang.String getExternalURL()
Returns the URL for the navigation resource of type External Link
Returns:
the URL for External link resource

getNavigationModel

NavigationModel getNavigationModel()
Returns the NavigationModel of this resource
Returns:
the NavigationModel object

getGoLinkPrettyUrl

java.lang.String getGoLinkPrettyUrl()
Returns the URL for goLink destination
EL: #{navigationContext.defaultNavigationModel.currentSelection.goLinkPrettyUrl}
Returns:
the URL for goLink destination

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.