com.sapportals.portal.navigation

Class AbstractNavigationConnector

java.lang.Object
  extended by com.sapportals.portal.navigation.AbstractNavigationConnector
All Implemented Interfaces:
INavigationConnector, INavigationConnectorExt

public abstract class AbstractNavigationConnector
extends Object
implements INavigationConnectorExt

The base class that represents a navigation connector.

Navigation connectors generate the navigation nodes for a user's navigation hierarchy. The portal comes with a roles connector, and you can create additional connectors in order to create additional navigation nodes and hierarchies.


Constructor Summary
AbstractNavigationConnector()
           
 
Method Summary
 void closeConnector()
          The method is called upon unregister connector, meant for closing any connector resources before it is destroyed.
 String getConnectorCacheDiscriminator(Hashtable environment)
          Gets a key for the set of navigation nodes for the current user.
 List getConnectorCacheDiscriminators(Hashtable environment)
          This method should retrieve the cache discriminators splited in array and not as combination as provided in the method getConnectorCacheDiscriminator.
 NavigationConnectorProfile getConnectorProfile()
           
abstract  NamingEnumeration getInitialNodes(Hashtable environment)
          Gets the initial nodes of the connector.
abstract  INavigationConnectorNode getNode(Hashtable environment, String connectorNodeName)
          Gets a navigation node specified by a connector node name.
 NamingEnumeration getNodeByQuickLink(Hashtable environment, String quickLink)
          Gets a node assigned to the specified quick link.
 String getNodeDiscriminator(Hashtable environment, String connectorNodeName)
          This method should provide the disciriminator on which to save the connector node in cache.
abstract  NamingEnumeration getNodes(Hashtable environment, Vector connectorNodeNames)
          Gets an enumeration of navigation nodes specified by a list of connector node names.
 boolean isCachable()
          Indicates whether the node can be cached.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractNavigationConnector

public AbstractNavigationConnector()
Method Detail

getConnectorCacheDiscriminator

public String getConnectorCacheDiscriminator(Hashtable environment)
Description copied from interface: INavigationConnectorExt
Gets a key for the set of navigation nodes for the current user.

Specified by:
getConnectorCacheDiscriminator in interface INavigationConnectorExt
Parameters:
environment - the user context
Returns:
a key

getConnectorCacheDiscriminators

public List getConnectorCacheDiscriminators(Hashtable environment)
This method should retrieve the cache discriminators splited in array and not as combination as provided in the method getConnectorCacheDiscriminator. It refer to the lists of disciriminators for which to save the initial nodes result in the cache, therefore the cache discriminators should be with correlation to the result of the getInitialNodes method. The getInitialNodes method should relate to the INavigationConstants.CACHE_DISCRIMINATOR_PARAM_NAME provided on the environment, it the parameter is existed then the initial nodes result should be only for this disciriminator and the total result. Notice that a default implementaion of this method is to call the getConnectorCacheDiscriminator method for backward compatibility

Parameters:
environment -
Returns:
list of discriminators.

getNodeDiscriminator

public String getNodeDiscriminator(Hashtable environment,
                                   String connectorNodeName)
This method should provide the disciriminator on which to save the connector node in cache. The disciriminator is used for the result of the getNode and getNodeByQuickLink method. By default the discriminator is the given connector node name, in case there is external connector key on the enviroment the disciriminator is the combination of the exterenal connector key and the node name.

Parameters:
environment -
connectorNodeName -
Returns:
disciriminator to save the connector node that matches the given connectorNodeName

getNodeByQuickLink

public NamingEnumeration getNodeByQuickLink(Hashtable environment,
                                            String quickLink)
Description copied from interface: INavigationConnectorExt
Gets a node assigned to the specified quick link.

Specified by:
getNodeByQuickLink in interface INavigationConnectorExt
Parameters:
environment - the user context
quickLink - a quick link
Returns:
an enumeration containing the nodes

isCachable

public boolean isCachable()
Indicates whether the node can be cached.

Returns:
true if the node can be cached, false if the node cannot be cached

getInitialNodes

public abstract NamingEnumeration getInitialNodes(Hashtable environment)
Description copied from interface: INavigationConnector
Gets the initial nodes of the connector.

Specified by:
getInitialNodes in interface INavigationConnector
Parameters:
environment - the user context
Returns:
an enumeration of initial nodes

getNode

public abstract INavigationConnectorNode getNode(Hashtable environment,
                                                 String connectorNodeName)
Description copied from interface: INavigationConnector
Gets a navigation node specified by a connector node name. The connector node name contains information about the node location in the connector hierarchy.

Specified by:
getNode in interface INavigationConnector
Parameters:
environment - the user context
connectorNodeName - the connector node name
Returns:
the requested node, null if it was not found

getNodes

public abstract NamingEnumeration getNodes(Hashtable environment,
                                           Vector connectorNodeNames)
Description copied from interface: INavigationConnector
Gets an enumeration of navigation nodes specified by a list of connector node names. The connector node name contains information about the node location in the connector hierarchy.

Specified by:
getNodes in interface INavigationConnector
Parameters:
environment - the user context
connectorNodeNames - a list of connector node names
Returns:
an ennumeration of node, null if the nodes are not found

getConnectorProfile

public NavigationConnectorProfile getConnectorProfile()

closeConnector

public void closeConnector()
The method is called upon unregister connector, meant for closing any connector resources before it is destroyed.

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