com.ibm.portal.resolver.service
Interface PortletResourcePocService

All Superinterfaces:
Disposable, Identifiable, PocServerContextProvider, PocService, PocURIFactory, PortletMimePocService, PortletPocService, ServerContextProvider

public interface PortletResourcePocService
extends PortletMimePocService

Version of the PortletPocService that can be used in a resource request of a JSR286 compatible portlet.

This service must be disposed after it has been retrieved via its home interface.

Since:
6.1.0
See Also:
Disposable

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.ibm.portal.resolver.service.PortletPocService
PortletPocService.URI_SCOPE
 
Method Summary
 ResourceContext getContext()
          Returns the COR Context for the environment that matches the service environment.
 DataSourceHandler getDataSourceHandler()
          Returns a handler that serializes a DataSource to the resource response
 int serveResource()
          Deprecated. use serveResource(URI, Map) instead
 int serveResource(Addressable aAddressable)
          Same as calling serveResource(Addressable, Boolean) with false as the caching parameter.
 int serveResource(Addressable aAddressable, java.lang.Boolean bCached)
          Same as calling serveResource(URI, Map, Boolean).
 int serveResource(java.lang.Boolean bCached)
          Deprecated. use serveResource(URI, Map, Boolean) instead
 int serveResource(java.net.URI aURI)
          Same as calling serveResource(URI, Boolean) with false as the caching parameter.
 int serveResource(java.net.URI aURI, java.lang.Boolean bCached)
          Same as calling serveResource(URI, Map, Boolean) with an empty map
 int serveResource(java.net.URI aURI, java.util.Map<java.lang.String,java.lang.String[]> aParams)
          Same as calling serveResource(URI, Map, Boolean) with false as the caching parameter.
 int serveResource(java.net.URI aURI, java.util.Map<java.lang.String,java.lang.String[]> aParams, java.lang.Boolean bCached)
           This method is meant to be used inside the ResourceServingPortlet.serveResource(javax.portlet.ResourceRequest, ResourceResponse) method of a portlet.
 
Methods inherited from interface com.ibm.portal.resolver.service.PortletMimePocService
createResourceURL, createResourceURL, createResourceURL
 
Methods inherited from interface com.ibm.portal.resolver.service.PortletPocService
createPortletURI, createResourceBundleURI, createResourceBundleURI, decodeParameters, decodePortletURI, encodeParameters, getObjectID
 
Methods inherited from interface com.ibm.portal.resolver.service.PocService
createContext, createDigestURI, createDigestURI, createURI, createURI, createURI, createXMLReader, getContextAccessor, getLookupService, getNonce, getServerContext, getURIParser, getURLFactory, getURLFactory, resolve, serveHeaders
 
Methods inherited from interface com.ibm.portal.Disposable
dispose
 

Method Detail

getContext

ResourceContext getContext()
Description copied from interface: PocService
Returns the COR Context for the environment that matches the service environment. This context can be used to issue custom COR lookups.

Specified by:
getContext in interface PocService
Specified by:
getContext in interface PortletMimePocService
Returns:
the COR context, not null

getDataSourceHandler

DataSourceHandler getDataSourceHandler()
Returns a handler that serializes a DataSource to the resource response

Returns:
the handler, not null
Since:
7.0.0.1

serveResource

@Deprecated
int serveResource()
                  throws javax.portlet.PortletException,
                         java.io.IOException
Deprecated. use serveResource(URI, Map) instead

Implements the ResourceServingPortlet.serveResource(javax.portlet.ResourceRequest, javax.portlet.ResourceResponse) method for a request that contains the POC URI as the resourceID. Portlets would implement the method and dispatch to the serveResource() method

Compatible ResourceURLs can be generates using the PortletMimePocService.createResourceURL(java.net.URI) method.

Returns:
the desired HTTP status code
Throws:
javax.portlet.PortletException
java.io.IOException

serveResource

int serveResource(Addressable aAddressable)
                  throws javax.portlet.PortletException,
                         java.io.IOException,
                         java.net.URISyntaxException
Same as calling serveResource(Addressable, Boolean) with false as the caching parameter.

Parameters:
aAddressable - the object that identifies the resource, must not be null
Returns:
the desired HTTP status code
Throws:
javax.portlet.PortletException
java.io.IOException
java.net.URISyntaxException
Since:
8.5

serveResource

int serveResource(Addressable aAddressable,
                  java.lang.Boolean bCached)
                  throws javax.portlet.PortletException,
                         java.io.IOException,
                         java.net.URISyntaxException
Same as calling serveResource(URI, Map, Boolean).

Parameters:
aAddressable - the object that identifies the resource, must not be null
bCached - if true the method uses a cache to lookup the POC URI. If false the method does not use a cache, which is the same as calling the method without a parameter. The value null refers to the system default
Returns:
the desired HTTP status code
Throws:
javax.portlet.PortletException
java.io.IOException
java.net.URISyntaxException
Since:
8.5

serveResource

@Deprecated
int serveResource(java.lang.Boolean bCached)
                  throws javax.portlet.PortletException,
                         java.io.IOException
Deprecated. use serveResource(URI, Map, Boolean) instead

Implements the ResourceServingPortlet.serveResource(javax.portlet.ResourceRequest, javax.portlet.ResourceResponse) method for a request that contains the POC URI as the resourceID. Portlets would implement the method and dispatch to the serveResource() method

Compatible ResourceURLs can be generates using the PortletMimePocService.createResourceURL(java.net.URI) method.

Parameters:
bCached - if true the method uses a cache to lookup the POC URI. If false the method does not use a cache, which is the same as calling the method without a parameter. The value null refers to the system default
Returns:
the desired HTTP status code
Throws:
javax.portlet.PortletException
java.io.IOException
Since:
7.0.0.1

serveResource

int serveResource(java.net.URI aURI)
                  throws javax.portlet.PortletException,
                         java.io.IOException
Same as calling serveResource(URI, Boolean) with false as the caching parameter.

Parameters:
aURI - the URI identifier to the resource, must not be null
Returns:
the desired HTTP status code
Throws:
javax.portlet.PortletException
java.io.IOException
Since:
8.5

serveResource

int serveResource(java.net.URI aURI,
                  java.lang.Boolean bCached)
                  throws javax.portlet.PortletException,
                         java.io.IOException
Same as calling serveResource(URI, Map, Boolean) with an empty map

Parameters:
aURI - the URI identifier to the resource, must not be null
bCached - if true the method uses a cache to lookup the POC URI. If false the method does not use a cache, which is the same as calling the method without a parameter. The value null refers to the system default
Returns:
the desired HTTP status code
Throws:
javax.portlet.PortletException
java.io.IOException
Since:
8.5

serveResource

int serveResource(java.net.URI aURI,
                  java.util.Map<java.lang.String,java.lang.String[]> aParams)
                  throws javax.portlet.PortletException,
                         java.io.IOException
Same as calling serveResource(URI, Map, Boolean) with false as the caching parameter.

Parameters:
aURI - the URI identifier to the resource, must not be null
aParams - the parameter map, must not be null
Returns:
the desired HTTP status code
Throws:
javax.portlet.PortletException
java.io.IOException
Since:
8.5

serveResource

int serveResource(java.net.URI aURI,
                  java.util.Map<java.lang.String,java.lang.String[]> aParams,
                  java.lang.Boolean bCached)
                  throws javax.portlet.PortletException,
                         java.io.IOException

This method is meant to be used inside the ResourceServingPortlet.serveResource(javax.portlet.ResourceRequest, ResourceResponse) method of a portlet. If the HTTP request is a GET request, then the DataSource identified via URI and parameters will be serialized onto the ResourceResponse. If the method is used for a PUT or POST or DELETE request, then the matching DataSink will be invoked and the result will be serialized onto the ResourceResponse.

Compatible ResourceURLs can be generates using the PortletMimePocService.createResourceURL(java.net.URI) method.

Parameters:
aURI - the URI identifier to the resource, must not be null
aParams - the parameter map, must not be null
bCached - if true the method uses a cache to lookup the POC URI. If false the method does not use a cache, which is the same as calling the method without a parameter. The value null refers to the system default
Returns:
the desired HTTP status code
Throws:
javax.portlet.PortletException
java.io.IOException
Since:
8.5