com.sapportals.portal.navigation
Interface INavigationRedirector


public interface INavigationRedirector

 Copyright(c) 2003 SAP.  All Rights Reserved.

 Description:  INavigationRedirector interface defines an API that is responsible  
 to redirect the original URL that has initiated the navigation to another URL that can be  
 enquired by a register connector.
 
 This concept of redirectors adds a new meaning to the URL prefix except from a connector recognition.
 Thus, a prefix is now either an indication for a connector or a definition of a new redirector.
 
 Each INavigationRedirector implementation is responsible for translating the URL from
 the original URL that is sent to the redirect method, to another URL format, wither a format that is known
 by a connector, or not. In both cases the return object should contain both the URL and the new prefix.
 The new prefix can be a connector prefix, therefor no additional redirection is needed. From the 
 other hand, the prefix can be another redirector prefix, then cascading redirection is needed.
 Note that a redirector is bond to a specifix prefix, and is registered together with the connector registration. 
 
 For Example:
 Calling the DoNavigate using navigationTarget pcd:portal_content/portal/firstPage
 is not recognize by any registered connector. Thus this URL should first be redirected using the "pcd"
 redirector implementation. we may assume that in this case the returned value contained the "ROLES"
 prefix, so the URL can now be processed.
  
 Example of Redirectors can be:
 - ROLESH (represents pcd hash code URLs) to pcd.
 - pcd to ROLES
 - ROLESH to ROLES.

Version:
2.0
See Also:
com.sapportals.portal.navigation.INavigationRedirectorResult, com.sapportals.portal.navigation.NavigationService

Method Summary
 INavigationRedirectorResult redirect(java.lang.String oldURL, java.util.Hashtable environment)
          Redirects the given URL to a readable format of it that is familiar by wither one of the connectors or by another Redirector implementation.
 

Method Detail

redirect

public INavigationRedirectorResult redirect(java.lang.String oldURL,
                                            java.util.Hashtable environment)
                                     throws javax.naming.NamingException
Redirects the given URL to a readable format of it that is familiar by wither one of the connectors or by another Redirector implementation. It should return INavigationRedirectorResult implementation, that contains both the translated URL and its new prefix. Note that a redirector must return a new prefix for the returned URL, in order to progress in the navigation process.
Parameters:
oldURL - the original URL, without its prefix.
environment - containing details about the user.
Returns:
INavigationRedirectorResult contains both the translated URL and its new prefix.
Throws:
javax.naming.NamingException -