com.sapportals.portal.navigation

Interface INavigationNamingHandler


public interface INavigationNamingHandler

The helper interface to INavigationConnectorNamingHandler that provides additional methods for getting a parent or child navigation node.

See Also:
DefaultNavigationNamingHandler, INavigationConnectorNamingHandler

Method Summary
 String composeName(Hashtable environment, String baseNodeURL, int numberOfLevelsUp, String[] children)
          Creates the name of the navigation target node specified by the active node and a relative path to it.
 String composeName(Hashtable environment, String connectorPrefix, String baseNodeURL, int numberOfLevelsUp, String[] children)
          Creates the name of the navigation target node by the active node and a relative path to it.
 INavigationNode createNavigationNode(INavigationConnectorNode connNode, String connectorPrefix, String nodeName, Hashtable environment)
          Creates a navigation node object.
 String getNavNodeChildName(Hashtable environment, String activeNodeName, String childNodeName)
          Gets the navigation node name of the child of the specified node.
 String getNavNodeParentName(Hashtable environment, String childNodeName)
          Gets the navigation node name of the parent of the specified node.
 

Method Detail

getNavNodeParentName

String getNavNodeParentName(Hashtable environment,
                            String childNodeName)
                            throws NamingException
Gets the navigation node name of the parent of the specified node.

Parameters:
environment - the user context
childNodeName - a child node name
Returns:
the name of the parent node, null if does not exist
Throws:
NamingException - if the node name is not valid

getNavNodeChildName

String getNavNodeChildName(Hashtable environment,
                           String activeNodeName,
                           String childNodeName)
                           throws NamingException
Gets the navigation node name of the child of the specified node.

Parameters:
environment - the user context
activeNodeName - a parent node name
childNodeName - the atomic child node name
Returns:
the name of the child node
Throws:
NamingException - if the node name is not valid

composeName

String composeName(Hashtable environment,
                   String baseNodeURL,
                   int numberOfLevelsUp,
                   String[] children)
                   throws NamingException
Creates the name of the navigation target node specified by the active node and a relative path to it. The caller to this method only needs to know where the target node is located relative to the current node.

For example: In order to navigate from

   pcd:role1/folder1/folder2/folder3/workset1/page1

to

   pcd:role1/folder1/folder2/folder4/workset2/page2

use the following:

composeName ("pcd:role1/folder1/folder2/folder3/workset1/page1", 3, {"folder4", "workset2", "page2"});

Parameters:
environment - the user context
baseNodeURL - a fully qualified URL of the active node
numberOfLevelsUp - the number of levels of parents to search
children - an array of the atomic names of the children (including the target node)
Returns:
the name of the relative node
Throws:
NamingException - if a validation check is performed and the active node does not exist

composeName

String composeName(Hashtable environment,
                   String connectorPrefix,
                   String baseNodeURL,
                   int numberOfLevelsUp,
                   String[] children)
                   throws NamingException
Creates the name of the navigation target node by the active node and a relative path to it. The caller to this method does not need to know about the naming scheme of the connector. It does need to know where the target node is located relative to the current node.

The method expects to get only the internal name of the node for the baseNodeURL.

Parameters:
environment - the user context
connectorPrefix - the connector prefix for this node.
baseNodeURL - a fully qualified URL of the active node
numberOfLevelsUp - the number of levels of parents to search
children - an array of the atomic names of the children (including the target node)
Returns:
the name of the relative node
Throws:
NamingException - if a validation check is performed and the active node does not exist

createNavigationNode

INavigationNode createNavigationNode(INavigationConnectorNode connNode,
                                     String connectorPrefix,
                                     String nodeName,
                                     Hashtable environment)
Creates a navigation node object.

Parameters:
connNode - a navigation connector node
connectorPrefix - a prefix for the navigation connector
nodeName - the name of the node to be created
environment - the user context
Returns:
a navigation node object
Access Rights

This class can be accessed from:


SC DC Public Part ACH
[sap.com] EP-RUNTIME [sap.com] tc/ep/navigation/api api EP-PIN


Copyright 2015 SAP AG Complete Copyright Notice