com.ibm.workplace.wcm.api.extensions.resolution
Interface ContentPageResolutionFilter


public interface ContentPageResolutionFilter

This interface can be implemented to realize a custom element in the filter chain for ContentPageResolution in WCM. The resolve method is called once for every WCM POC ?urile=wcm:path:contentPath ) request before the portal state and render parameters are set. It can thus be used to change the contentPath and set the specific portal page to show the content one

The order of the content page resolution filter elements is determined by calling the getFilterChainWeight() method. The lower the weight the earlier the filter will be inserted into the chain.

Each content page resolution filter is instantiated as a singleton, so the implementor must make sure that the resolve(ContentPageResolutionRequest, ContentPageResolutionResponse, ContentPageResolutionFilterChain) method is thread-safe.

Since:
7.0
Note:
This interface is designed to be implemented by clients.

Method Summary
 int getFilterChainWeight()
          This method id called when constructing the filter chain.
 void resolve(ContentPageResolutionRequest request, ContentPageResolutionResponse response, ContentPageResolutionFilterChain chain)
          Invoked as part of the ContentPageResolution processing when determining the contentPath and Page to render for a given URI
 

Method Detail

resolve

void resolve(ContentPageResolutionRequest request,
             ContentPageResolutionResponse response,
             ContentPageResolutionFilterChain chain)
             throws ContentPageResolutionException
Invoked as part of the ContentPageResolution processing when determining the contentPath and Page to render for a given URI

The response parameter will contain the specified ContentPath of the content Item to being rendered. as well as the Portal Page ID of the page(s) found to render the content.

The resolve method can change the content Item by calling setContntPath and changing the contentPath of the item. Additionally the page to be used to render the content can be set by by calling setPageId() on the response object.

Parameters:
request - - Allows access to all the parameters passed to the ResolutionService handling the request.
response - - Can be used to change the contentPath or set the portal page id.
chain - The reference to the content page resolution filter chain that has to be used to call the resolve method of the next content page resolution filter chain element.
Throws:
ContentPageResolutionException - if there are any errors in processing the filter.

getFilterChainWeight

int getFilterChainWeight()
This method id called when constructing the filter chain.

This method must return a positive integer. A value of zero disables the filter

Returns:
a number greater than 0, indicating the weight of this filter in the chain or zero if the filter is disabled