com.sapportals.portal.navigation

Interface IWDNavigationHelperService


public interface IWDNavigationHelperService

The interface for a helper class for querying the navigation service about the navigation hierarchy of the current user.

Most of the methods in this class wrap navigation service methods for accessing commonly needed navigation nodes. The two main advantages of the helper class are:

There are three special types of navigation nodes:

See Also:
com.sapportals.portal.navigation.NavigationService

Field Summary
static String KEY
           
 
Method Summary
 void addHisotryNode(String url, String params, String target, String context, String Title)
          add to the history in server side the navigation node
 INavigationNode getCurrentContextNavNode()
          Returns the context node from the request or session.
 INavigationNode getCurrentLaunchNavNode()
          Returns the launchable navigation target.
 INavigationNode getCurrentNavNode()
          Returns the navigation target.
 Hashtable getEnvironment()
          Retrieves the default envronment with the user encoded in the request.
 Set getFeasibleRequestParameters()
          This method returns a set of parameters that are relevant for navigation.
 INavigationNode getFirstNode()
          Returns the first navigation node in the tree in the highest level of hierarchy.
 String getInternalURL(String nodeURL)
          Returns the node URL without its prefix.
 NavigationNodes getNavNodesListForTarget(INavigationNode targetNode)
          Returns the navigation nodes from the specified node to the entry point for this node.
 NavigationNodes getNavNodesListForTarget(INavigationNode targetNode, int pathLength)
           
 List getNavNodesPathIndexesList()
          Returns the integers that correspond to the current context node path.
 INavigationNode getParentNode(INavigationNode node)
          Returns the parent node of a specified node.
 INavigationNode getPersonalizePortalNode()
          Returns the initial node for portal personalization.
 String getPrefix(String nodeURL)
          Returns the prefix of the node URL.
 NavigationNodes getRealInitialNodes()
          Returns the initial nodes that are to be the entry points for the navigation iViews (TLN/DTN).
 

Field Detail

KEY

static final String KEY
See Also:
Constant Field Values
Method Detail

getCurrentContextNavNode

INavigationNode getCurrentContextNavNode()
Returns the context node from the request or session. The context node is the node that is highlighted in the navigation iViews (TLN/DTN).

A node is considered invisible if one of the following is true: Otherwise the node is visible and the navigation target (current node) is returned.

Returns:
context node for this navigation

getCurrentNavNode

INavigationNode getCurrentNavNode()
Returns the navigation target.

The navigation target determines what content should be presented.

The navigation target is either sent in the request or is the last navigation target from the session, in case no new target has been specified.

Returns:
node for this navigation

getCurrentLaunchNavNode

INavigationNode getCurrentLaunchNavNode()
Returns the launchable navigation target.

If the navigation target is launchable (has a valid launch URL, that is, it is not a folder), it is returned. Otherwise, the first node of the level under the navigation target is returned.

Returns:
current launchable navigation target

getNavNodesListForTarget

NavigationNodes getNavNodesListForTarget(INavigationNode targetNode)
Returns the navigation nodes from the specified node to the entry point for this node. In other words, the method returns the nodes along the navigation path from the initial nodes to the specified node.

This method is used for two purposes: NOTE: This method should be treated with care, as it uses a lot of resources, and may slow performance.

Parameters:
targetNode - the target node for path calculation
Returns:
list of the nodes building the hierarchy path leading to the navigation target, or null if the node is not under an entry point

getNavNodesListForTarget

NavigationNodes getNavNodesListForTarget(INavigationNode targetNode,
                                         int pathLength)

getInternalURL

String getInternalURL(String nodeURL)
Returns the node URL without its prefix.

The process is as follows:
  1. Checks for the standard separator -- ://. If found, returns the text after the separator.
  2. Checks for the separator -- :. If found, returns the text after the separator.
  3. If neither separator is found, returns the entire node URL.

Parameters:
nodeURL - the node URL
Returns:
the node URL without its prefix

getPrefix

String getPrefix(String nodeURL)
Returns the prefix of the node URL.

The process is as follows:
  1. Checks for the standard separator -- ://. If found, returns the text before the separator.
  2. Checks for the separator -- :. If found, returns the text before the separator.
  3. If neither separator is found, null is returned.

Parameters:
nodeURL - the node URL
Returns:
the node URL prefix; null if no prefix is found

getPersonalizePortalNode

INavigationNode getPersonalizePortalNode()
Returns the initial node for portal personalization.

The portal personalization node is defined as the one where Merge ID = 'PORTAL_PERSONALIZATION'.

Returns:
the portal personalization node, or null if none exists

getRealInitialNodes

NavigationNodes getRealInitialNodes()
Returns the initial nodes that are to be the entry points for the navigation iViews (TLN/DTN).

The portal personalization node (Merge ID = 'PORTAL_PERSONALIZATION') is excluded.

Returns:
a list of the entry points for the navigation iViews

getFirstNode

INavigationNode getFirstNode()
Returns the first navigation node in the tree in the highest level of hierarchy. If the first node of the highest level is not launchable, the first node in the second level is retrieved.

Returns:
the first node of the highest level. If the node is not launchable, the first node in the second level is returned.

getParentNode

INavigationNode getParentNode(INavigationNode node)
Returns the parent node of a specified node.

Parameters:
node - a navigation node
Returns:
the parent node of the specified node

getNavNodesPathIndexesList

List getNavNodesPathIndexesList()
Returns the integers that correspond to the current context node path.

For example, if the current context node is 'System Administration' > 'Support' > 'Support Desk', the result might be 3, 5, 0 -- where 3 is the index of 'System Administration' in the initial nodes, 5 is the index of 'Support' node in the children of 'System Administration' and so on. This method is useful in navigation iViews that should mark the path of the current (context) launch node.

Returns:
a list of integers that correspond to the current context node path

getFeasibleRequestParameters

Set getFeasibleRequestParameters()
This method returns a set of parameters that are relevant for navigation.

Returns:
Set parameters that are relevant for navigation.

getEnvironment

Hashtable getEnvironment()
Retrieves the default envronment with the user encoded in the request.

Returns:
Hashtable currently contains two entries. Key: "NavigationPrincipal" Value: the user context object from the request. Key: "NavigationTarget" Value: the navigation node url of this request. Key: "com.sap.portal.navigation.previousNavTarget" Value: The previous navigation target url. Key: "ExecuteLocally" Value: for FPN scenario, if the navigation request if for the consumer.

addHisotryNode

void addHisotryNode(String url,
                    String params,
                    String target,
                    String context,
                    String Title)
add to the history in server side the navigation node

Parameters:
url -
params -
target -
context -
Title -
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 2011 SAP AG Complete Copyright Notice