com.sapportals.portal.prt.connection

Interface IPortalRequest


public interface IPortalRequest

An implementation of IPortalRequest must be provided by a Portal Connection. It abstracts the request data needed by the PRT core.
Furthermore, a connection can intercept in the output provision of the runtime by specifying an implementation of an IDocumentHook.
Copyright (c) SAP Portals Europe GmbH 2001


Field Summary
static char NODE_SEPARATOR
          The NODE_SEPARATOR character is used as a separator between node names in node path information.
 
Method Summary
 String createResourceURL(IResourceInformation ri)
          Creates a resource url based on a Resource information
 String createURL(INode currentNode, String rootContext, INode targetNode, IPortalRequestEvent event, String extraData, boolean encodeExtraData)
          This method is called to create an URL for the portal.
 String createURL(INode currentNode, String rootContext, INode targetNode, IPortalRequestEvent event, String mode, String extraData, boolean encodeExtraData)
          This method is called to create a URL for the portal.
 void destroy()
          Destroy the request
 String encodeExtraData(String extraData)
          Encodes the extra data parameter
 void end(IPortalComponentRequest request)
          The end method is called when the runtime has done all request procession
 ClientType getClientType()
          Deprecated.  
 IContentExceptionHandler getContentExceptionHandler()
          Gets the content exception handler.
 String getExtraURLData()
          A call to this method expects extra data specified by a previous call to createURL.
 IHook getHook(HookType hookType)
          Gets the portal hook
 Locale getLocale()
           
 NodeMode getRenderMode()
          Gets the mode to be assigned to the target node of the url or the node given implicitly by the root context.
 IPortalRequestEvent getRequestEvent(IPortalComponentRequest request)
          A call to this method is supposed to return a Portal Request event if there was any information about this on the request.
 INode getRequestEventTarget(IPortalComponentRequest request)
          Computes the target node of a request event associated with this request, if applicable.
 String getRequestTheme()
          Deprecated.  
 String getRequestTheme(IPortalComponentRequest request)
          Theme information can generally be used to influence the rendering.
 IPortalComponentContext getRootContext(IPortalComponentRequest request)
          Gets the root context for this request.
 String getRootContextName()
          Gets the root context name
 ServletConfig getServletConfig()
          A portal connection is asked to pass on a ServletConfig implementation, carrying information on the servlet running a servlet based connection.
 HttpServletRequest getServletRequest()
          A Portal Connection is asked to pass on an implementation of HttpServletRequest.
 HttpServletResponse getServletResponse()
          A Portal Connection is asked to pass on an implementation of HttpServletResponse if availabe.
 IUserContext getUserContext()
           
 void setRootContextName(String rootContextName)
          Sets the root context name
 

Field Detail

NODE_SEPARATOR

static final char NODE_SEPARATOR
The NODE_SEPARATOR character is used as a separator between node names in node path information.

See Also:
Constant Field Values
Method Detail

getContentExceptionHandler

IContentExceptionHandler getContentExceptionHandler()
Gets the content exception handler. This is the class that will handle PortalRuntime exceptions and PortalComponent exceptions

Returns:
an implementation of IContentExceptionHandler

getHook

IHook getHook(HookType hookType)
Gets the portal hook


createURL

String createURL(INode currentNode,
                 String rootContext,
                 INode targetNode,
                 IPortalRequestEvent event,
                 String mode,
                 String extraData,
                 boolean encodeExtraData)
This method is called to create a URL for the portal.

Parameters:
currentNode - The current node taken from the request
rootContext - This parameter specifies the root context for the request triggered by sending the URL. If set to null it should be the current one.
targetNode - The target node is the node that a specified request event should be sent to. If set to null, the node given by the root context should receive the event.
event - The event to be passed by this URL. If set to null, no event will be passed on.
mode - The mode, that the target node should be set to. If set to null, the default mode will be effective.
extraData - The specification of core data is done by the PRT core and its content should be carried between requests.
encodeExtraData - whether the extraData needs to be encoded or not
Returns:
The generated URL.

createURL

String createURL(INode currentNode,
                 String rootContext,
                 INode targetNode,
                 IPortalRequestEvent event,
                 String extraData,
                 boolean encodeExtraData)
This method is called to create an URL for the portal.

Parameters:
currentNode - request The current node taken from the request
rootContext - This parameter specifies the root context for the request triggered by sending the URL. If set to null it should be the current one.
targetNode - The target node is the node that a specified request event should be sent to. If set to null, the node given by the root context should receive the event.
event - The event to be passed by this URL. If set to null, no event will be passed on.
extraData - The specification of core data is done by the PRT core and its content should be carried between requests.
encodeExtraData - whether the extraData needs to be encoded or not
Returns:
The generated URL.

getRootContext

IPortalComponentContext getRootContext(IPortalComponentRequest request)
Gets the root context for this request. A root context of a request defines the topmost component node in the POM. It is represented by a name that needs to be resolvable by the content abstraction layer of the runtime.

Parameters:
request - an implementation of IPortalComponentRequest for the portal node.
Returns:
the name of the root context of this request

getRequestEvent

IPortalRequestEvent getRequestEvent(IPortalComponentRequest request)
A call to this method is supposed to return a Portal Request event if there was any information about this on the request. If this is not the case, it should return null

Parameters:
request - an implementation of IPortalComponentRequest for the portal node.
Returns:
the request event associated with this request or null if there was none specified

getRequestEventTarget

INode getRequestEventTarget(IPortalComponentRequest request)
Computes the target node of a request event associated with this request, if applicable. Note: This method might be called several times even though the potential target node is not present in the POM yet. An implementation is supposed to return null if no target node can be found and a valid node on the first succesful call.

Parameters:
request - an implementation of IPortalComponentRequest for the portal node.
Returns:
The node given by target information on the request or null if it could not be determined (yet).

getRenderMode

NodeMode getRenderMode()
Gets the mode to be assigned to the target node of the url or the node given implicitly by the root context.

Returns:
The mode to be assigned to the target node of the request

getExtraURLData

String getExtraURLData()
A call to this method expects extra data specified by a previous call to createURL. It should be used exclusively by the runtime.

Returns:
Extra data passed on during URL generation

getUserContext

IUserContext getUserContext()
Returns:
User Data associated with the request

getLocale

Locale getLocale()
Returns:
the Locale instance to be associated with this request

getClientType

ClientType getClientType()
Deprecated. 

A implementation of this interface should return the type of client that initiated the request


getRequestTheme

String getRequestTheme()
Deprecated. 

Theme information can generally be used to influence the rendering.

Returns:
theme information for this request or null if it is not applicable.

getRequestTheme

String getRequestTheme(IPortalComponentRequest request)
Theme information can generally be used to influence the rendering.

Returns:
theme information for this request or null if it is not applicable.

getServletRequest

HttpServletRequest getServletRequest()
A Portal Connection is asked to pass on an implementation of HttpServletRequest. This is needed to provide low-level access to Portal Components if available.

Returns:
an implementation of HttpServletRequest

getServletResponse

HttpServletResponse getServletResponse()
A Portal Connection is asked to pass on an implementation of HttpServletResponse if availabe. This is needed to provide low-level access to Portal Components if available.

Returns:
an implementation of HttpServletResponse

getServletConfig

ServletConfig getServletConfig()
A portal connection is asked to pass on a ServletConfig implementation, carrying information on the servlet running a servlet based connection.

Returns:
an implementation of ServletConfig

end

void end(IPortalComponentRequest request)
The end method is called when the runtime has done all request procession


destroy

void destroy()
Destroy the request


getRootContextName

String getRootContextName()
Gets the root context name


setRootContextName

void setRootContextName(String rootContextName)
Sets the root context name


encodeExtraData

String encodeExtraData(String extraData)
Encodes the extra data parameter


createResourceURL

String createResourceURL(IResourceInformation ri)
Creates a resource url based on a Resource information

Access Rights

This class can be accessed from:


SC DC Public Part ACH
[sap.com] EP-BASIS-API [sap.com] tc/epbc/prt/lib/api api EP-PIN
[sap.com] EP-BASIS-API [sap.com] tc/epbc/prt/api api EP-PIN


Copyright 2011 SAP AG Complete Copyright Notice