public interface IPortalComponentRequest
It provides access to the Portal Object Model, events, other components, the component context, and more.
| Modifier and Type | Method and Description |
|---|---|
IEvent |
createAboutRequestEvent()
Deprecated.
|
String |
createComponentURL(INode targetNode,
IPortalRequestEvent event)
Deprecated.
use createPortalComponentURI instead
|
String |
createComponentURL(IPortalRequestEvent event)
Deprecated.
use createPortalComponentURI instead
|
IEvent |
createEditRequestEvent()
Deprecated.
|
IEvent |
createHelpRequestEvent()
Deprecated.
|
String |
createPageURL(String urn)
Deprecated.
use createPortalComponentURI instead
|
String |
createPageURL(String urn,
IPortalRequestEvent event)
Deprecated.
use createPortalComponentURI instead
|
String |
createPageURL(String urn,
NodeMode mode)
Deprecated.
use createPortalComponentURI instead
|
IPortalComponentURI |
createPortalComponentURI()
Creates a new PortalComponentURI
|
IEvent |
createPreviewRequestEvent()
Deprecated.
|
IEvent |
createRefreshRequestEvent()
Deprecated.
|
IPortalRequestEvent |
createRequestEvent(String eventName)
Creates a request event.
|
IPortalRequestEvent |
createRequestEvent(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(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(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.
|
Cookie[] |
getCookies()
Deprecated.
Please use the corresponding method on the servlet request object obtained by calling
. |
Locale |
getLocale()
Retrieves the Locale associated with this request.
|
ILogger |
getLogger()
Returns the default Logger.
|
ILogger |
getLogger(String loggerName)
Returns a logger associated to the logger name.
|
INode |
getNode()
Gets the current node in the portal OM.
|
String |
getParameter(String name)
gets a parameter of this request
|
String |
getPrivateResourcePath()
Returns the full file system path to access private resources that belong to the current
component.
|
String |
getPrivateResourcePath(String componentName)
Returns the full file system path to access private component resources.
|
String |
getPublicResourcePath()
Returns the full file system path to access public resources that belong to the current
component.
|
String |
getPublicResourcePath(String componentName)
Returns the full file system path to access public component resources.
|
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.
|
InputStream |
getRequestInputStream()
Gets an
InputStream that provides access to the request's body
data. |
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(String resourceType,
String resourceName)
Returns an IResource object that belongs to the current component.
|
IResource |
getResource(String componentName,
String resourceType,
String resourceName)
Returns an IResource object that belongs to the component.
|
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(String serviceName)
Deprecated.
Use access to services via
instead. |
IService |
getService(String serviceName,
IServiceConfiguration aServiceConfiguration)
Deprecated.
Use access to services via
instead. |
IService |
getService(String serviceName,
IServiceId aServiceID)
Deprecated.
Use access to services via
instead. |
ServletConfig |
getServletConfig()
Gets the actual servlet config.
|
HttpServletRequest |
getServletRequest()
Gets the actual servlet request.
|
HttpServletResponse |
getServletResponse(boolean answering)
Gets the original servlet response.
|
IUserContext |
getUser()
gets the profile of the current user.
|
Object |
getValue(String name)
Retrieve a piece of data from the request.
|
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.
|
String |
getWebResourcePath(String componentName)
Returns a URL to access to web resources that belong to the component.
|
String |
getWebServicePath(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(String name,
Object value)
Put a piece of data into the request.
|
void |
redirect(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.
|
ServletConfig getServletConfig()
null if not applicableHttpServletRequest getServletRequest()
null if not applicableHttpServletResponse 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.boolean isResponseClean()
InputStream getRequestInputStream() throws 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 ComponentsIOExceptionCookie[] getCookies()
getServletRequest().IPortalRequestEvent getRequestEvent()
null if none
there.PortalComponentRequestType getRequestType()
String getRequestTheme()
null if not applicable.void setRequestType(PortalComponentRequestType requestType)
requestType - The type of this requestClientType getClientType()
IPortalComponentContext getComponentContext()
IPortalComponentContext getComponentContext(NodeMode nodeMode)
nodeMode - the node mode to retrieve the context for.INode getNode()
void setNode(INode node)
node - that needs to be attached to this request.IPortalComponentContext getComponentContext(String urn)
urn - a URN specifying a Component Context.void putValue(String name, Object value)
name - An identifier of the valuevalue - The object to be kept in the requestObject getValue(String name)
name - An identifier of the valueIUserContext getUser()
IPortalComponentSession getComponentSession()
IPortalComponentURI createPortalComponentURI()
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.String createComponentURL(IPortalRequestEvent event)
event - The event to be passed by this URL.String createPageURL(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.String createPageURL(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.String createPageURL(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.void redirect(String location)
location - A URL to redirect the request to.String getRedirectURL()
null if none was specified.String getParameter(String name)
name - The name of the parameter.IResource getResource(String componentName, String resourceType, 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)IResource getResource(String resourceType, 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)ILogger getLogger(String loggerName)
loggerName - The logger name.ILogger getLogger()
ILogger getClassLogger(Class aClass)
aClass's package.aClass - The class which is calling the logger.aClass's package.IService getService(String serviceName)
PortalRuntime instead.serviceName - name of the service to getnull otherwise.IServiceIService getService(String serviceName, IServiceId aServiceID)
PortalRuntime instead.serviceName - name of the Service to accessaServiceID - the ID of the service to getnull otherwise.IService,
IServiceIdIService getService(String serviceName, IServiceConfiguration aServiceConfiguration)
PortalRuntime instead.serviceName - the name of the Service.aServiceConfiguration - null otherwise.IService,
IServiceConfigurationIPortalRequestEvent createRequestEvent(String eventName)
eventName - the name of the eventIPortalRequestEventIPortalRequestEvent createRequestEvent(String eventName, IPortalRequestEventData eventData)
eventName - the name of the eventeventData - data to be passed on the eventIPortalRequestEventIPortalRequestEventData createRequestEventData()
IPortalRequestEventDataIEvent createEditRequestEvent()
INode.setNodeMode(com.sapportals.portal.prt.pom.NodeMode) insteadIEvent createPreviewRequestEvent()
INode.setNodeMode(com.sapportals.portal.prt.pom.NodeMode) insteadIEvent createRefreshRequestEvent()
INode.setNodeMode(com.sapportals.portal.prt.pom.NodeMode) insteadIEvent createAboutRequestEvent()
INode.setNodeMode(com.sapportals.portal.prt.pom.NodeMode) insteadIEvent createHelpRequestEvent()
INode.setNodeMode(com.sapportals.portal.prt.pom.NodeMode) insteadString getWebResourcePath(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.String getWebServicePath(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.String getWebResourcePath()
The generated path depends on some servlet settings (context name) provided by the request.
String getPrivateResourcePath(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()String getPrivateResourcePath()
getPublicResourcePath()String getPublicResourcePath(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()String getPublicResourcePath()
getWebResourcePath()ResourceBundle getResourceBundle()
IPortalComponentProfile.DEFAULT_RESOURCE_BUNDLE.null if none could be
determined.Locale getLocale()
Locale of this request or null
if none was determined.void dispatchRequest(INode aNode, IPortalComponentResponse aResponse)
aNode - the node on which to dispatch the requestaResponse - the current response in usevoid dispatchRequest(IResource aResource, IPortalComponentResponse aResponse)
aResource - the resource to dispatch the request toaResponse - the current response in useGuid getRequestGuid()
| Access Rights |
|---|
| SC | DC | Public Part | ACH |
|---|---|---|---|
[sap.com] EP-BASIS-API
|
[sap.com]
|
default
|
EP-PIN-PRT
|
[sap.com] EP-BASIS-API
|
[sap.com] tc/epbc/prt/api
|
api
|
EP-PIN
|
[sap.com] EP-BASIS-API
|
[sap.com] tc/epbc/prt/lib/api
|
api
|
EP-PIN
|
[sap.com] EP-RUNTIME
|
[sap.com] tc/ep/semantics/api
|
api
|
EP-PIN
|
[sap.com] KMC-WPC
|
[sap.com] tc/kmc/wpc/wpcfacade
|
api
|
EP-PIN-WPC-WCM
|
Copyright 2021 SAP SE Complete Copyright Notice