|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PortletPocServiceHome
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
.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.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface com.ibm.portal.resolver.service.PocServiceHome |
---|
PocServiceHome.FilterType |
Field Summary | |
---|---|
static java.lang.String |
JNDI_NAME
Name that can be used for the JNDI lookup of this service |
Fields inherited from interface com.ibm.portal.resolver.service.PocServiceHome |
---|
CACHED, UNCACHED |
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 |
Methods inherited from interface com.ibm.portal.resolver.xml.PooledTransformerFactory |
---|
newPooledTemplates, newPooledTemplates, newPooledTemplates |
Methods inherited from interface com.ibm.portal.resolver.xml.ContentHandlerURIParserFactory |
---|
createContentHandlerURIParser |
Methods inherited from interface com.ibm.portal.resolver.cache.CacheFactory |
---|
getCachedDataSourceFactory, getCachedDataSourceFactory |
Field Detail |
---|
static final java.lang.String JNDI_NAME
Method Detail |
---|
ActionContext createContext(javax.portlet.ActionRequest request, javax.portlet.ActionResponse response)
request
- the request, not null
response
- the response, not null
null
EventContext createContext(javax.portlet.EventRequest request, javax.portlet.EventResponse response)
request
- the request, not null
response
- the response, not null
null
PortletContext createContext(javax.portlet.PortletRequest request, javax.portlet.PortletResponse response)
request
- the request, not null
response
- the response, not null
null
RenderContext createContext(javax.portlet.RenderRequest request, javax.portlet.RenderResponse response)
request
- the request, not null
response
- the response, not null
null
ResourceContext createContext(javax.portlet.ResourceRequest request, javax.portlet.ResourceResponse response)
request
- the request, not null
response
- the response, not null
null
PortletActionPocService getPortletPocService(javax.portlet.ActionRequest request, javax.portlet.ActionResponse response) throws StateManagerException
request
- The current portlet request. Must not be null
.response
- The current portlet response. Must not be null
.
StateManagerException
- thrown if the initialization of the
PortletPocService
fails.PortletEventPocService getPortletPocService(javax.portlet.EventRequest request, javax.portlet.EventResponse response) throws StateManagerException
request
- The current portlet request. Must not be null
.response
- The current portlet response. Must not be null
.
StateManagerException
- thrown if the initialization of the
PortletPocService
fails.PortletPocService getPortletPocService(javax.portlet.PortletRequest request, javax.portlet.PortletResponse response) throws StateManagerException
request
- The current portlet request. Must not be null
.response
- The current portlet response. Must not be null
.
StateManagerException
- thrown if the initialization of the
PortletPocService
fails.PortletRenderPocService getPortletPocService(javax.portlet.RenderRequest request, javax.portlet.RenderResponse response) throws StateManagerException
request
- The current portlet request. Must not be null
.response
- The current portlet response. Must not be null
.
StateManagerException
- thrown if the initialization of the
PortletPocService
fails.PortletResourcePocService getPortletPocService(javax.portlet.ResourceRequest request, javax.portlet.ResourceResponse response) throws StateManagerException
request
- The current portlet request. Must not be null
.response
- The current portlet response. Must not be null
.
StateManagerException
- thrown if the initialization of the
PortletPocService
fails.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |