com.ibm.portal.resolver.service
Interface PortletPocServiceHome
- All Superinterfaces:
- CacheFactory, ContentHandlerURIParserFactory, PocServiceHome, PocURIFactory, PooledTransformerFactory, PortletService
-
public interface PortletPocServiceHome
- extends PocServiceHome, PortletService
Portlet service which allows for creating POC URLs that cannot be created via
the JSR 168 API.
The portlet service is accessed by a JNDI lookup; the lookup returns an
implementation of this interface, which allows to get the actual portlet
service under the JNDI name JNDI_NAME.
Coding example for accessing the POC service from within a JSR168 portlet:
PortletServiceHome psh;
javax.naming.Context ctx = new javax.naming.InitialContext();
try { psh = (PortletServiceHome)
ctx.lookup("portletservice/com.ibm.portal.resolver.service.PortletPocServiceHome");
} catch(javax.naming.NameNotFoundException ex) { ... error handling ...
}
...
// use the service
PortletPocServiceHome service = (PortletPocServiceHome) psh.getPortletService(PortletPocServiceHome.class);
// get the POC service for the current request
PocService pocSvc = service.getPortletPocService(request, response);
// create URLs etc.
...
// dispose the poc service as we do not need it any longer
pocSvc.dispose();
The returned PortletServiceHome object is valid for the lifetime of
the portal. It is recommended to perform the JNDI lookup in the
Portlet.init(PortletConfig) method of the portlet and
store the PortletServiceHome object
home in an instance variable. That also applies to the actual
PortletPocServiceHome.
Note that it is not permitted to access references to the PocService
longer than one request. These objects must be retrieved from the
PortletServiceHome object whenever they are used in another request.
Also note that the PortletServiceHome is derived fron the
Disposable interface, i.e. whenever these objects are
not needed any longer (at the end of a request at the latest) their
Disposable.dispose() method must be invoked.
- Since:
- 6.0.1
Field Summary
|
static java.lang.String |
JNDI_NAME
Name that can be used for the JNDI lookup of this service |
Method Summary
|
ActionContext |
createContext(javax.portlet.ActionRequest request,
javax.portlet.ActionResponse response)
Constructs the COR context for request and response |
EventContext |
createContext(javax.portlet.EventRequest request,
javax.portlet.EventResponse response)
Constructs the COR context for request and response |
PortletContext |
createContext(javax.portlet.PortletRequest request,
javax.portlet.PortletResponse response)
Constructs the COR context for request and response |
RenderContext |
createContext(javax.portlet.RenderRequest request,
javax.portlet.RenderResponse response)
Constructs the COR context for request and response |
ResourceContext |
createContext(javax.portlet.ResourceRequest request,
javax.portlet.ResourceResponse response)
Constructs the COR context for request and response |
PortletActionPocService |
getPortletPocService(javax.portlet.ActionRequest request,
javax.portlet.ActionResponse response)
Get a portlet POC service for the current request and response. |
PortletEventPocService |
getPortletPocService(javax.portlet.EventRequest request,
javax.portlet.EventResponse response)
Get a portlet POC service for the current request and response. |
PortletPocService |
getPortletPocService(javax.portlet.PortletRequest request,
javax.portlet.PortletResponse response)
Get a portlet POC service for the current request and response. |
PortletRenderPocService |
getPortletPocService(javax.portlet.RenderRequest request,
javax.portlet.RenderResponse response)
Get a portlet POC service for the current request and response. |
PortletResourcePocService |
getPortletPocService(javax.portlet.ResourceRequest request,
javax.portlet.ResourceResponse response)
Get a portlet POC service for the current request and response. |
Methods inherited from interface com.ibm.portal.resolver.service.PocServiceHome
|
convert, convert, createDigestURI, createDigestURI, createURI, createURI, createURI, getContext, getDataSinkFactory, getDataSinkFactory, getDataSourceFactory, getFileTypeMap, getIdentityTemplates, getInvalidationEventListener, getLookupService, getObjectPoolFactory, getResolutionService, newFilter |
JNDI_NAME
static final java.lang.String JNDI_NAME
- Name that can be used for the JNDI lookup of this service
createContext
ActionContext createContext(javax.portlet.ActionRequest request,
javax.portlet.ActionResponse response)
- Constructs the COR context for request and response
- Parameters:
- request - the request, not null
- response - the response, not null
- Returns:
- the COR context, not null
- Since:
- 8.0.0.1
createContext
EventContext createContext(javax.portlet.EventRequest request,
javax.portlet.EventResponse response)
- Constructs the COR context for request and response
- Parameters:
- request - the request, not null
- response - the response, not null
- Returns:
- the COR context, not null
- Since:
- 8.0.0.1
createContext
PortletContext createContext(javax.portlet.PortletRequest request,
javax.portlet.PortletResponse response)
- Constructs the COR context for request and response
- Parameters:
- request - the request, not null
- response - the response, not null
- Returns:
- the COR context, not null
- Since:
- 6.1.0.3
createContext
RenderContext createContext(javax.portlet.RenderRequest request,
javax.portlet.RenderResponse response)
- Constructs the COR context for request and response
- Parameters:
- request - the request, not null
- response - the response, not null
- Returns:
- the COR context, not null
- Since:
- 8.0.0.1
createContext
ResourceContext createContext(javax.portlet.ResourceRequest request,
javax.portlet.ResourceResponse response)
- Constructs the COR context for request and response
- Parameters:
- request - the request, not null
- response - the response, not null
- Returns:
- the COR context, not null
- Since:
- 8.0.0.1
getPortletPocService
PortletActionPocService getPortletPocService(javax.portlet.ActionRequest request,
javax.portlet.ActionResponse response)
throws StateManagerException
- Get a portlet POC service for the current request and response.
- Parameters:
- request - The current portlet request. Must not be null.
- response - The current portlet response. Must not be null.
- Returns:
- A poc service for accessing POC related functionality
- Throws:
- StateManagerException - thrown if the initialization of the
PortletPocService fails.
- Since:
- 7.0
getPortletPocService
PortletEventPocService getPortletPocService(javax.portlet.EventRequest request,
javax.portlet.EventResponse response)
throws StateManagerException
- Get a portlet POC service for the current request and response.
- Parameters:
- request - The current portlet request. Must not be null.
- response - The current portlet response. Must not be null.
- Returns:
- A poc service for accessing POC related functionality
- Throws:
- StateManagerException - thrown if the initialization of the
PortletPocService fails.
- Since:
- 7.0
getPortletPocService
PortletPocService getPortletPocService(javax.portlet.PortletRequest request,
javax.portlet.PortletResponse response)
throws StateManagerException
- Get a portlet POC service for the current request and response.
- Parameters:
- request - The current portlet request. Must not be null.
- response - The current portlet response. Must not be null.
- Returns:
- A poc service for accessing POC related functionality
- Throws:
- StateManagerException - thrown if the initialization of the
PortletPocService fails.
getPortletPocService
PortletRenderPocService getPortletPocService(javax.portlet.RenderRequest request,
javax.portlet.RenderResponse response)
throws StateManagerException
- Get a portlet POC service for the current request and response.
- Parameters:
- request - The current portlet request. Must not be null.
- response - The current portlet response. Must not be null.
- Returns:
- A poc service for accessing POC related functionality
- Throws:
- StateManagerException - thrown if the initialization of the
PortletPocService fails.
- Since:
- 6.1.0
getPortletPocService
PortletResourcePocService getPortletPocService(javax.portlet.ResourceRequest request,
javax.portlet.ResourceResponse response)
throws StateManagerException
- Get a portlet POC service for the current request and response.
- Parameters:
- request - The current portlet request. Must not be null.
- response - The current portlet response. Must not be null.
- Returns:
- A poc service for accessing POC related functionality
- Throws:
- StateManagerException - thrown if the initialization of the
PortletPocService fails.
- Since:
- 6.1.0