Tree PREV CLASS NEXT CLASS SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD com.ibm.portal.outbound.service
Class ApplicationContextBeanjava.lang.Objectcom.ibm.portal.outbound.service.ApplicationContextBean
public class ApplicationContextBean- extends java.lang.Object
An application context. This bean holds the context information for the outbound connection service in a bean.
Code example: PortletRequest request; PortletResponse response; ... ApplicationContextBean applicationContext = new ApplicationContextBean(); applicationContext.setRequestResponse(request, response); ... javax.naming.Context ctx = new javax.naming.InitialContext(); OutboundConnectionServiceHome home = (OutboundConnectionServiceHome) ctx.lookup("portal:service/model/OutboundConnectionService"); OutboundConnectionService connectionService = home.getOutboundConnectionService (applicationContext); home. NOTE: This API may only be used in the scope of an HTTP request in WebSphere Portal, i.e. within a theme. The API can not be invoked directly by a custom servlet.
- Since:
- 8.5.0
- See Also:
- OutboundConnectionServiceHome
Constructor Summary ApplicationContextBean()
Method Summary java.lang.String getApplicationContext()
Return the application context.java.lang.String getMapping()
Return the mapping context, if a mapping context was defined.javax.portlet.PortletRequest getPortletRequest()
Return the portlet request objectjavax.portlet.PortletResponse getPortletResponse()
Return the portlet response objectjavax.servlet.http.HttpServletRequest getServletRequest()
Return the servlet request objectjavax.servlet.http.HttpServletResponse getServletResponse()
Return the servlet response objectjava.util.Map<java.lang.String,java.lang.String> getVariables()
Return a map that contains the dynamic variablesvoid setApplicationContext(java.lang.String context)
Set the application context from which the service is invoked.void setMapping(java.lang.String mapping)
Set the mapping context.void setRequestResponse(javax.servlet.http.HttpServletRequest sreq, javax.servlet.http.HttpServletResponse srsp)
Set the servlet request or response object.void setRequestResponse(javax.portlet.PortletRequest preq, javax.portlet.PortletResponse prsp)
Set the portlet request or response object.void setVariables(java.util.Map<java.lang.String,java.lang.String> vars)
Define runtime variables to the outbound connection service.
Methods inherited from class java.lang.Object clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail ApplicationContextBean
public ApplicationContextBean()
Method Detail getServletRequest
public javax.servlet.http.HttpServletRequest getServletRequest()
- return the servlet request object
- Returns:
- HttpServletRequest the servlet request, if defined
getServletResponse
public javax.servlet.http.HttpServletResponse getServletResponse()
- return the servlet response object
- Returns:
- HttpServletResponse the servlet response, if defined
getPortletRequest
public javax.portlet.PortletRequest getPortletRequest()
- return the portlet request object
- Returns:
- PortletRequest the portlet request, if defined
getPortletResponse
public javax.portlet.PortletResponse getPortletResponse()
- return the portlet response object
- Returns:
- HttpPortletResponse the portlet response, if defined
getVariables
public java.util.Map<java.lang.String,java.lang.String> getVariables()
- Return a map that contains the dynamic variables
- Returns:
- Map
The variables map. The key of the map contains the variable names, the value part holds the value of the variable. May be null. getMapping
public java.lang.String getMapping()
- Return the mapping context, if a mapping context was defined.
- Returns:
- String the mapping context. may be null.
getApplicationContext
public java.lang.String getApplicationContext()
- return the application context.
- Returns:
- String the application context:
- null (default) : let the Outbound connection service determine the application context, using the given servlet request or portlet request.
- empty: set the application context of the wps.ear application. This means, the global application context is selected
- Otherwise: The application context scope. Usually, the display name of the web module that contains the application (for example, PA_TestPortlet)
setVariables
public void setVariables(java.util.Map<java.lang.String,java.lang.String> vars)
- Define runtime variables to the outbound connection service. Variables
- Parameters:
- vars - a map that contains the set if variables to be used for this service. May be null or empty.
setMapping
public void setMapping(java.lang.String mapping)
- Set the mapping context.
- Parameters:
- mapping - the mapping context. may be null - in that case, the default mapping is used for the outbound connection.
setApplicationContext
public void setApplicationContext(java.lang.String context)
- Set the application context from which the service is invoked.
- Parameters:
- context - The application context. The following values are allowed:
The
- null (default) : let the Outbound connection service determine the application context, using the given servlet request or portlet request.
- empty: set the application context of the wps.ear application. This means, the global application context is selected
- Otherwise: The application context scope. Usually, the display name of the web module that contains the application (for example, PA_TestPortlet)
setRequestResponse
public void setRequestResponse(javax.servlet.http.HttpServletRequest sreq, javax.servlet.http.HttpServletResponse srsp)
- Set the servlet request or response object. This should be set if the Outbound Connection Service is invoked from code that executes in the context of a servlet. For a valid outbound connection service, either a pair of PortletRequest/PortletResponse objects, or a pair of ServletRequest/ServletResponse objects must be presented.
- Parameters:
- sreq - the Servlet request. must not be null.
- srsp - the Servlet response. must not be null.
setRequestResponse
public void setRequestResponse(javax.portlet.PortletRequest preq, javax.portlet.PortletResponse prsp)
- Set the portlet request or response object. This should be set if the Outbound Connection Service is invoked from code that executes in the context of a portlet. For a valid outbound connection service, either a pair of PortletRequest/PortletResponse objects, or a pair of ServletRequest/ServletResponse objects must be presented.
- Parameters:
- preq - the Portlet request. must not be null.
- prsp - the Portlet response. must not be null.
Tree PREV CLASS NEXT CLASS SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD