com.sapportals.portal.navigation
Interface INavigationConnectorNamingHandler

All Known Implementing Classes:
DefaultNavigationNamingHandler

public interface INavigationConnectorNamingHandler

 Copyright(c) 2003 SAP.  All Rights Reserved.

 Description:  INavigationConnectorNamingHandler interface determines how the name of the nodes will be
 constructed. The name should be built according to the syntax of the naming interface 
 that the nodes are stored in. (LDAP, JNDI, File System, etc.) 
 The naming handler implementation is declared for each connector in the registerConnector API.
 A default naming handler is implemented by the navigation. This implementation contains 
 handles name according to the UNIX syntax (consider "/" to be a seperator, "." as a pointer to the current directory, ".." as a pointer to 
 a parent directory, etc.
 Connector may use this default implementation, if it finds it sufficient to its needs,
 otherwise it should implement a naming handler of its own (for example - the default implementtion 
 does not support federations).
 
 Note that if no INavigationConnectorNamingHandler implementation is sent to the registerConnector
 API, the default naming handler will be taken.

Version:
2.0
See Also:
com.sapportals.portal.navigation.DefaultNavigationNamingHandler

Method Summary
 java.lang.String composeName(java.util.Hashtable environment, java.lang.String baseNodeURL, int numberOfLevelsUp, java.lang.String[] children)
          Creates the URL of the navigation target node by the active node and a relative path to it.
 

Method Detail

composeName

public java.lang.String composeName(java.util.Hashtable environment,
                                    java.lang.String baseNodeURL,
                                    int numberOfLevelsUp,
                                    java.lang.String[] children)
                             throws javax.naming.NamingException
Creates the URL of the navigation target node by the active node and a relative path to it. The caller to this API should not know anything about the naming scheme of the connector. It should only know where the target node is located in relative to the current node.
Parameters:
baseNodeURL - the URL of the active node for which relative URL is created
numberOfLevelsUp - the number of ancestors needed to be searched.
children - an array of the atomic names of the children existed in the way down, including the target node itself. For example: In order to go from pcd:role1/folder1/folder2/folder3/workset1/page1 to pcd:role1/folder1/folder2/folder4/workset2/page2 the API should be composeName ("pcd:role1/folder1/folder2/folder3/workset1/page1", 3, {"folder4", "workset2", "page2"});
Returns:
URL of the relative node.
Throws:
javax.naming.NamingException - if a validation check is done and the active node doesn't exist (child node cannot be retrieved).