com.sapportals.portal.navigation

Interface INavigationHelperService


public interface INavigationHelperService

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
 INavigationNode getCurrentContextNavNode(IPortalComponentRequest request)
          Returns the context node from the request or session.
 INavigationNode getCurrentLaunchNavNode(IPortalComponentRequest request)
          Returns the launchable navigation target.
 INavigationNode getCurrentNavNode(IPortalComponentRequest request)
          Returns the navigation target.
 INavigationNode getDefaultPageForFolder(INavigationNode folderNode, Hashtable env)
          Returns the default page for this folder.
 INavigationNode getFirstNode(IPortalComponentRequest request)
          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(IPortalComponentRequest request, INavigationNode targetNode)
          Returns the navigation nodes from the specified node to the entry point for this node.
 NavigationNodes getNavNodesListForTarget(IPortalComponentRequest request, INavigationNode targetNode, int pathLength)
           
 ArrayList getNavNodesPathIndexesList(IPortalComponentRequest request)
          Returns the integers that correspond to the current context node path.
 INavigationNode getParentNode(INavigationNode node, IPortalComponentRequest request)
          Returns the parent node of a specified node.
 INavigationNode getPersonalizePortalNode(IPortalComponentRequest request)
          Returns the initial node for portal personalization.
 String getPrefix(String nodeURL)
          Returns the prefix of the node URL.
 NavigationNodes getRealInitialNodes(IPortalComponentRequest request)
          Returns the initial nodes that are to be the entry points for the navigation iViews (TLN/DTN).
 boolean updateDesktopFilterViewMap(String desktopURL, String value)
          Update the desktop map in the helper service, this method will be call by the desktop editor after the save
 

Field Detail

KEY

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

getCurrentContextNavNode

INavigationNode getCurrentContextNavNode(IPortalComponentRequest request)
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.

Parameters:
request - the request in which the navigation node is launched
Returns:
context node for this navigation

getCurrentNavNode

INavigationNode getCurrentNavNode(IPortalComponentRequest request)
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.

Parameters:
request - the request in which the navigation node is launched
Returns:
node for this navigation

getCurrentLaunchNavNode

INavigationNode getCurrentLaunchNavNode(IPortalComponentRequest request)
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.

Parameters:
request - the request in which the navigation node is launched
Returns:
current launchable navigation target

getNavNodesListForTarget

NavigationNodes getNavNodesListForTarget(IPortalComponentRequest request,
                                         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:
request - the request in which the navigation node is launched
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(IPortalComponentRequest request,
                                         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(IPortalComponentRequest request)
Returns the initial node for portal personalization.

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

Parameters:
request - the request in which the navigation node is launched
Returns:
the portal personalization node, or null if none exists

getRealInitialNodes

NavigationNodes getRealInitialNodes(IPortalComponentRequest request)
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.

Parameters:
request - the request in which the navigation node is launched
Returns:
a list of the entry points for the navigation iViews

getFirstNode

INavigationNode getFirstNode(IPortalComponentRequest request)
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.

Parameters:
request - the request in which the navigation node is launched
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,
                              IPortalComponentRequest request)
Returns the parent node of a specified node.

Parameters:
node - a navigation node
request - the request in which the navigation node is launched
Returns:
the parent node of the specified node

getNavNodesPathIndexesList

ArrayList getNavNodesPathIndexesList(IPortalComponentRequest request)
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.

Parameters:
request - the request in which the navigation node is launched
Returns:
a list of integers that correspond to the current context node path

updateDesktopFilterViewMap

boolean updateDesktopFilterViewMap(String desktopURL,
                                   String value)
Update the desktop map in the helper service, this method will be call by the desktop editor after the save


getDefaultPageForFolder

INavigationNode getDefaultPageForFolder(INavigationNode folderNode,
                                        Hashtable env)
Returns the default page for this folder. If the folder doesn't have one, the folderNode itself is returned.

Parameters:
folderNode - the folder node to get the default page for
Returns:
the default page node
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