|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
The IPortalComponentRequest is the portal component specific view on all request related matters.
It provides access to the Portal Object Model, events, other components, the component context, and more.
| Method Summary | |
IEvent |
createAboutRequestEvent()
Deprecated. use INode.setNodeMode(com.sapportals.portal.prt.pom.NodeMode) instead |
java.lang.String |
createComponentURL(INode targetNode,
IPortalRequestEvent event)
Deprecated. use createPortalComponentURI instead |
java.lang.String |
createComponentURL(IPortalRequestEvent event)
Deprecated. use createPortalComponentURI instead |
IEvent |
createEditRequestEvent()
Deprecated. use INode.setNodeMode(com.sapportals.portal.prt.pom.NodeMode) instead |
IEvent |
createHelpRequestEvent()
Deprecated. use INode.setNodeMode(com.sapportals.portal.prt.pom.NodeMode) instead |
java.lang.String |
createPageURL(java.lang.String urn)
Deprecated. use createPortalComponentURI instead |
java.lang.String |
createPageURL(java.lang.String urn,
IPortalRequestEvent event)
Deprecated. use createPortalComponentURI instead |
java.lang.String |
createPageURL(java.lang.String urn,
NodeMode mode)
Deprecated. use createPortalComponentURI instead |
IPortalComponentURI |
createPortalComponentURI()
Creates a new PortalComponentURI |
IEvent |
createPreviewRequestEvent()
Deprecated. use INode.setNodeMode(com.sapportals.portal.prt.pom.NodeMode) instead |
IEvent |
createRefreshRequestEvent()
Deprecated. use INode.setNodeMode(com.sapportals.portal.prt.pom.NodeMode) instead |
IPortalRequestEvent |
createRequestEvent(java.lang.String eventName)
Creates a request event. |
IPortalRequestEvent |
createRequestEvent(java.lang.String eventName,
IPortalRequestEventData eventData)
Creates a request event. |
IPortalRequestEventData |
createRequestEventData()
Creates an empty request event data object. |
void |
dispatchRequest(INode aNode,
IPortalComponentResponse aResponse)
Dispatches the request to another node |
void |
dispatchRequest(IResource aResource,
IPortalComponentResponse aResponse)
Dispatches the request to a Resource |
ILogger |
getClassLogger(java.lang.Class aClass)
Returns the logger associated to aClass's package. |
ClientType |
getClientType()
Deprecated. Please use XXXX for User Agent information. |
IPortalComponentContext |
getComponentContext()
Gets the current context of the component. |
IPortalComponentContext |
getComponentContext(NodeMode nodeMode)
Gets the current context of the component for a particular mode |
IPortalComponentContext |
getComponentContext(java.lang.String urn)
This object allows to act as a factory for context objects. |
IPortalComponentSession |
getComponentSession()
gets a reference on the PortalComponentSession, that defines the component's view on a (servlet) session that is subject to time outs. |
javax.servlet.http.Cookie[] |
getCookies()
Deprecated. Please use the corresponding method on the servlet request object obtained by calling . |
java.util.Locale |
getLocale()
Retrieves the Locale associated with this request. |
ILogger |
getLogger()
Returns the default Logger. |
ILogger |
getLogger(java.lang.String loggerName)
Returns a logger associated to the logger name. |
INode |
getNode()
Gets the current node in the portal OM. |
java.lang.String |
getParameter(java.lang.String name)
gets a parameter of this request |
java.lang.String |
getPrivateResourcePath()
Returns the full file system path to access private resources that belong to the current component. |
java.lang.String |
getPrivateResourcePath(java.lang.String componentName)
Returns the full file system path to access private component resources. |
java.lang.String |
getPublicResourcePath()
Returns the full file system path to access public resources that belong to the current component. |
java.lang.String |
getPublicResourcePath(java.lang.String componentName)
Returns the full file system path to access public component resources. |
java.lang.String |
getRedirectURL()
Gets a currently set redirect URL or null if none was specified. |
IPortalRequestEvent |
getRequestEvent()
If applicable, gets the request event defined by the incoming request. |
Guid |
getRequestGuid()
Deprecated. Please handle GUIDs locally. |
java.io.InputStream |
getRequestInputStream()
Gets an InputStream that provides access to the request's body
data.
|
java.lang.String |
getRequestTheme()
Gets the theme associated with this request. |
PortalComponentRequestType |
getRequestType()
Deprecated. Instead of referring to request types, please use the mode information provided by the current node. |
IResource |
getResource(java.lang.String resourceType,
java.lang.String resourceName)
Returns an IResource object that belongs to the current component. |
IResource |
getResource(java.lang.String componentName,
java.lang.String resourceType,
java.lang.String resourceName)
Returns an IResource object that belongs to the component. |
java.util.ResourceBundle |
getResourceBundle()
Retrieves the Portal Components default Resource Bundle, as specified in the Components profile or by using the default name defined by IPortalComponentProfile.DEFAULT_RESOURCE_BUNDLE. |
IService |
getService(java.lang.String serviceName)
Deprecated. Use access to services via instead. |
IService |
getService(java.lang.String serviceName,
IServiceConfiguration aServiceConfiguration)
Deprecated. Use access to services via instead. |
IService |
getService(java.lang.String serviceName,
IServiceId aServiceID)
Deprecated. Use access to services via instead. |
javax.servlet.ServletConfig |
getServletConfig()
Gets the actual servlet config. |
javax.servlet.http.HttpServletRequest |
getServletRequest()
Gets the actual servlet request. |
javax.servlet.http.HttpServletResponse |
getServletResponse(boolean answering)
Gets the original servlet response. |
IUserContext |
getUser()
gets the profile of the current user. |
java.lang.Object |
getValue(java.lang.String name)
Retrieve a piece of data from the request. |
java.lang.String |
getWebResourcePath()
Returns a path to access to web resources that belong to the current component The generated path depends on some servlet settings (context name) provided by the request. |
java.lang.String |
getWebResourcePath(java.lang.String componentName)
Returns a URL to access to web resources that belong to the component. |
java.lang.String |
getWebServicePath(java.lang.String serviceName)
Deprecated. Please use instead. |
boolean |
isResponseClean()
Returns whether the servlet's response is still available for content procession by the runtime. |
void |
putValue(java.lang.String name,
java.lang.Object value)
Put a piece of data into the request. |
void |
redirect(java.lang.String location)
Forces a redirect of the request to some other location. |
void |
setNode(INode node)
Sets the current node of this request. |
void |
setRequestType(PortalComponentRequestType requestType)
Deprecated. Instead of referring to request types, please use the mode information provided by the current node. |
| Method Detail |
public javax.servlet.ServletConfig getServletConfig()
null if not applicablepublic javax.servlet.http.HttpServletRequest getServletRequest()
null if not applicablepublic javax.servlet.http.HttpServletResponse getServletResponse(boolean answering)
true
all further content procession of the runtime will be skipped.
This is only available, if the request
was initiated from a servlet based connection.answering - specificying whether it is intended by the caller
to write into the response and thereby skip all further
content procession by the runtime.null if not applicable.public boolean isResponseClean()
public java.io.InputStream getRequestInputStream()
throws java.io.IOException
InputStream that provides access to the request's body
data.
Its content is buffered by the Runtime to provide access to any number of
Portal Componentsjava.io.IOException - public javax.servlet.http.Cookie[] getCookies()
getServletRequest().
public IPortalRequestEvent getRequestEvent()
null if none
there.public PortalComponentRequestType getRequestType()
public java.lang.String getRequestTheme()
null if not applicable.public void setRequestType(PortalComponentRequestType requestType)
requestType - The type of this requestpublic ClientType getClientType()
public IPortalComponentContext getComponentContext()
public IPortalComponentContext getComponentContext(NodeMode nodeMode)
nodeMode - the node mode to retrieve the context for.public INode getNode()
public void setNode(INode node)
node - that needs to be attached to this request.public IPortalComponentContext getComponentContext(java.lang.String urn)
urn - a URN specifying a Component Context.
public void putValue(java.lang.String name,
java.lang.Object value)
name - An identifier of the valuevalue - The object to be kept in the requestpublic java.lang.Object getValue(java.lang.String name)
name - An identifier of the valuepublic IUserContext getUser()
public IPortalComponentSession getComponentSession()
public IPortalComponentURI createPortalComponentURI()
public java.lang.String createComponentURL(INode targetNode,
IPortalRequestEvent event)
targetNode - The node that the URL is to point to.event - The event to be passed by this URL.public java.lang.String createComponentURL(IPortalRequestEvent event)
event - The event to be passed by this URL.public java.lang.String createPageURL(java.lang.String urn)
createComponentURL(com.sapportals.portal.prt.pom.INode, com.sapportals.portal.prt.event.IPortalRequestEvent) this method generates a URL that
replaces the root component of a subsequent request as specified by the context URN.
context name.urn - The URN of the context representing the new root component.
public java.lang.String createPageURL(java.lang.String urn,
IPortalRequestEvent event)
createComponentURL(com.sapportals.portal.prt.pom.INode, com.sapportals.portal.prt.event.IPortalRequestEvent) this method generates a URL that
replaces the root component of a subsequent request as specified by the context URN.
context name.
The passed on event will be fired on the new root component.urn - The URN of the context representing the new root component.event - The event to be fired on the top most Portal Component.
public java.lang.String createPageURL(java.lang.String urn,
NodeMode mode)
createComponentURL(com.sapportals.portal.prt.pom.INode, com.sapportals.portal.prt.event.IPortalRequestEvent) this method generates a URL that
replaces the root component of a subsequent request as specified by the context URN.
context name.
The passed on event will be fired on the new root component.
The passed on node mode will be set on the Portal Object Model node carrying the
specified context.urn - The URN of the context representing the new root component.mode - The mode to be set on the top most Portal Component.public void redirect(java.lang.String location)
location - A URL to redirect the request to.public java.lang.String getRedirectURL()
null if none was specified.public java.lang.String getParameter(java.lang.String name)
name - The name of the parameter.
public IResource getResource(java.lang.String componentName,
java.lang.String resourceType,
java.lang.String resourceName)
Example:
String componentName =
request.getComponentContext().getComponentName();
IResource script = getResource(componentName, IResource.SCRIPT,
"scripts/menu.js");
The component name specified must be the complete name including the profile
name (i.e.: <par-file name>.<profile name>).
componentName - the component nameresourceType - the type of the resourceresourceName - the file name for the resourcegetResource(String, String)
public IResource getResource(java.lang.String resourceType,
java.lang.String resourceName)
Example:
IResource script = getResource(IResource.SCRIPT, "scripts/menu.js");
The resourceName specified must be relative to the component resource path.
The IResource interface defines string constants for standard resource
types.
resourceType - the type of the resourceresourceName - the file name for the resourceIResource,
getPrivateResourcePath(),
getPublicResourcePath(),
getWebResourcePath(),
IPortalComponentResponse.addResource(IResource)public ILogger getLogger(java.lang.String loggerName)
loggerName - The logger name.public ILogger getLogger()
public ILogger getClassLogger(java.lang.Class aClass)
aClass's package.aClass - The class which is calling the logger.aClass's package.public IService getService(java.lang.String serviceName)
PortalRuntime instead.
serviceName - name of the service to getnull otherwise.IService
public IService getService(java.lang.String serviceName,
IServiceId aServiceID)
PortalRuntime instead.
serviceName - name of the Service to accessaServiceID - the ID of the service to getnull otherwise.IService,
IServiceId
public IService getService(java.lang.String serviceName,
IServiceConfiguration aServiceConfiguration)
PortalRuntime instead.
serviceName - the name of the Service.IServiceConfiguration - the configuration of the ServiveaServiceConfiguration - null otherwise.IService,
IServiceConfigurationpublic IPortalRequestEvent createRequestEvent(java.lang.String eventName)
eventName - the name of the eventIPortalRequestEvent
public IPortalRequestEvent createRequestEvent(java.lang.String eventName,
IPortalRequestEventData eventData)
eventName - the name of the eventeventData - data to be passed on the eventIPortalRequestEventpublic IPortalRequestEventData createRequestEventData()
IPortalRequestEventDatapublic IEvent createEditRequestEvent()
INode.setNodeMode(com.sapportals.portal.prt.pom.NodeMode) instead
public IEvent createPreviewRequestEvent()
INode.setNodeMode(com.sapportals.portal.prt.pom.NodeMode) instead
public IEvent createRefreshRequestEvent()
INode.setNodeMode(com.sapportals.portal.prt.pom.NodeMode) instead
public IEvent createAboutRequestEvent()
INode.setNodeMode(com.sapportals.portal.prt.pom.NodeMode) instead
public IEvent createHelpRequestEvent()
INode.setNodeMode(com.sapportals.portal.prt.pom.NodeMode) instead
public java.lang.String getWebResourcePath(java.lang.String componentName)
The generated path depends on some servlet settings (context name) provided by
the request.
The component name specified must be the complete name including the profile
name (i.e.: <par-file name>.<profile name>).
componentName - The name of the component.public java.lang.String getWebServicePath(java.lang.String serviceName)
getWebResourcePath(java.lang.String) instead.
The generated path depends on some servlet settings (context name) provided by the request.
serviceName - the name of the service.public java.lang.String getWebResourcePath()
The generated path depends on some servlet settings (context name) provided by the request.
public java.lang.String getPrivateResourcePath(java.lang.String componentName)
The component name specified must be the complete name including the profile name (i.e.: <par-file name>.<profile name>).
componentName - the name of the componentgetPublicResourcePath()public java.lang.String getPrivateResourcePath()
getPublicResourcePath()public java.lang.String getPublicResourcePath(java.lang.String componentName)
The component name specified must be the complete name including the profile name (i.e.: <par-file name>.<profile name>).
componentName - the name of the component.getWebResourcePath()public java.lang.String getPublicResourcePath()
getWebResourcePath()public java.util.ResourceBundle getResourceBundle()
IPortalComponentProfile.DEFAULT_RESOURCE_BUNDLE.null if none could be
determined.public java.util.Locale getLocale()
Locale of this request or null
if none was determined.
public void dispatchRequest(INode aNode,
IPortalComponentResponse aResponse)
aNode - the node on which to dispatch the requestaResponse - the current response in use
public void dispatchRequest(IResource aResource,
IPortalComponentResponse aResponse)
aResource - the resource to dispatch the request toaResponse - the current response in usepublic Guid getRequestGuid()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||