com.ibm.portal.resolver.service
Interface PocService

All Superinterfaces:
Disposable, PocServerContextProvider, PocURIFactory, ServerContextProvider
All Known Subinterfaces:
ActionPocService, PortalPocService, PortletActionPocService, PortletEventPocService, PortletMimePocService, PortletPocService, PortletRenderPocService, PortletResourcePocService

public interface PocService
extends PocServerContextProvider, PocURIFactory, Disposable

Service that provides access to POC specific functionality. This service must be disposed by a call to Disposable.dispose() after it has been retrieved via its home interface.

Since:
6.0.1
See Also:
Disposable, PortalPocServiceHome, PortletPocServiceHome, CorPocServiceHomes

Method Summary
 Context createContext()
          Deprecated. use getContext() instead.
 java.net.URI createDigestURI(Addressable addr)
          Creates a shortened URI that targets the Addressable object
 java.net.URI createDigestURI(java.net.URI uri, java.util.Map<java.lang.String,java.lang.String[]> params)
          Creates a shortened URI that targets the given URI and parameters
 java.net.URI createURI(java.lang.String uri)
          Parses the URI string and creates a new URI object.
 java.net.URI createURI(java.lang.String scheme, java.lang.String schemeSpecificPart)
          Creates a new URI based on scheme and scheme specific part.
 java.net.URI createURI(java.net.URI uri)
          Creates a new URI based on an existing URI.
 ContentHandlerURIParser createXMLReader(java.lang.Boolean bCached)
          Constructs a URIParser that parses a DataSource onto a ContentHandler.
 DigestContext getContext()
          Returns the COR Context for the environment that matches the service environment.
 ContextAccessor getContextAccessor()
          Returns access to information about the current access context.
 LookupService getLookupService()
          Deprecated. use PocServiceHome.getLookupService() instead
 java.lang.String getNonce()
          Deprecated. use ContextAccessor.getNonce() instead
 PocServerContext getServerContext()
          Returns the server context that describes the server configuration for this service instance (i.e.
 URIParser getURIParser(java.lang.Boolean bCached)
          Returns a parser that performs a lookup for data sources in the current context
 PocURLFactory getURLFactory()
          Returns access to the URL generation functionality for POC URLs
 DisposablePocURLFactory getURLFactory(PocServerContext serverContext)
          Returns access to the URL generation functionality for POC URLs.
 boolean resolve(StateHolderController ctrl, java.net.URI uri, java.lang.String verb, java.util.Map<java.lang.String,java.lang.String[]> params)
          Performs state resolution in the scope of the current request.
 void serveHeaders(DataSource aDataSource)
          Serves the response headers for the given DataSource.
 
Methods inherited from interface com.ibm.portal.Disposable
dispose
 

Method Detail

createContext

@Deprecated
Context createContext()
Deprecated. use getContext() instead.


createDigestURI

java.net.URI createDigestURI(Addressable addr)
                             throws java.io.IOException,
                                    java.net.URISyntaxException
Creates a shortened URI that targets the Addressable object

Parameters:
addr - the target object
Returns:
the shortened URI
Throws:
java.io.IOException
java.net.URISyntaxException
Since:
8.0

createDigestURI

java.net.URI createDigestURI(java.net.URI uri,
                             java.util.Map<java.lang.String,java.lang.String[]> params)
                             throws java.io.IOException,
                                    java.net.URISyntaxException
Creates a shortened URI that targets the given URI and parameters

Parameters:
uri - the target URI
params - the target parameters
Returns:
the shortened URI
Throws:
java.io.IOException
java.net.URISyntaxException

createURI

java.net.URI createURI(java.lang.String uri)
                       throws java.net.URISyntaxException,
                              java.io.IOException
Parses the URI string and creates a new URI object.

Specified by:
createURI in interface PocURIFactory
Parameters:
uri - the URI string, not null
Returns:
the equivalent URI
Throws:
java.net.URISyntaxException
java.io.IOException
Since:
6.1.0

createURI

java.net.URI createURI(java.lang.String scheme,
                       java.lang.String schemeSpecificPart)
                       throws java.net.URISyntaxException
Creates a new URI based on scheme and scheme specific part. This method is preferable to the constructor of the URI object because it potentially caches frequently used URIs.

Specified by:
createURI in interface PocURIFactory
Parameters:
scheme - scheme, not null
schemeSpecificPart - scheme specific part, not null
Returns:
the URI
Throws:
java.net.URISyntaxException
Since:
6.1.0

createURI

java.net.URI createURI(java.net.URI uri)
Creates a new URI based on an existing URI. The purpose of this method is to provide a canonical mapping of URI object.s

Specified by:
createURI in interface PocURIFactory
Parameters:
uri - the original URI, not null
Returns:
the equivalent URI
Since:
6.1.0

createXMLReader

ContentHandlerURIParser createXMLReader(java.lang.Boolean bCached)
                                        throws org.xml.sax.SAXException
Constructs a URIParser that parses a DataSource onto a ContentHandler.

Parameters:
bCached - indicates if the parser internally caches the parsing result.
Returns:
the parser, not null. The instance must be disposed via a call to Disposable.dispose() after usage.
Throws:
org.xml.sax.SAXException
Since:
7.0

getContext

DigestContext getContext()
Returns the COR Context for the environment that matches the service environment. This context can be used to issue custom COR lookups.

Returns:
the COR context, not null
Since:
6.1.0

getContextAccessor

ContextAccessor getContextAccessor()
Returns access to information about the current access context.

Returns:
accessor to the context
Since:
6.1.0

getLookupService

@Deprecated
LookupService getLookupService()
Deprecated. use PocServiceHome.getLookupService() instead

Returns the default lookup service that can be used to discover the service endpoints for services associated with POC URIs. The implementation of this service will first try to locate a LookupService via the COR APIs. If this process fails, it will use a default implementation as a fallback. In order to access only the fallback implementation use an extension point lookup using the information in LookupService.

Returns:
default lookup service, not null

getNonce

@Deprecated
java.lang.String getNonce()
Deprecated. use ContextAccessor.getNonce() instead

Returns a nonce for the current request

Returns:
the nonce for the request, not null
Since:
8.0.0.1

getServerContext

PocServerContext getServerContext()
Returns the server context that describes the server configuration for this service instance (i.e. hostname and paths to the entry servlets).

Specified by:
getServerContext in interface PocServerContextProvider
Specified by:
getServerContext in interface ServerContextProvider
Returns:
the server context, not null
Since:
8.0

getURIParser

URIParser getURIParser(java.lang.Boolean bCached)
Returns a parser that performs a lookup for data sources in the current context

Parameters:
bCached - indicates if the parser internally caches the parsing result.
Returns:
the parser
Since:
7.0.0.1

getURLFactory

PocURLFactory getURLFactory()
Returns access to the URL generation functionality for POC URLs

Returns:
factory to create POC URLs, not null

getURLFactory

DisposablePocURLFactory getURLFactory(PocServerContext serverContext)
                                      throws StateException
Returns access to the URL generation functionality for POC URLs. The returned instance of the PocURLFactory must be disposed when not used any longer.

Parameters:
serverContext - the server context for the generated URLs, not null
Returns:
factory to create POC URLs, not null
Throws:
StateException
Since:
8.0

resolve

boolean resolve(StateHolderController ctrl,
                java.net.URI uri,
                java.lang.String verb,
                java.util.Map<java.lang.String,java.lang.String[]> params)
                throws ResolutionException,
                       StateException
Performs state resolution in the scope of the current request.

Parameters:
ctrl - state to be modified
uri - the POC URI
verb - the verb
params - the parameters
Returns:
true if the resolution was successful, else false
Throws:
ResolutionException
StateException
Since:
7.0

serveHeaders

void serveHeaders(DataSource aDataSource)
                  throws java.io.IOException
Serves the response headers for the given DataSource.

Parameters:
aDataSource - the data source
Throws:
java.io.IOException
Since:
8.5