com.ibm.ecm.extension

Class PluginRequestFilter

  1. java.lang.Object
  2. extended bycom.ibm.ecm.extension.PluginRequestFilter

  1. public abstract class PluginRequestFilter
  2. extends java.lang.Object
Provides an abstract class that is extended to create a filter for requests to a particular service. The filter is provided with the request parameters before being examined by the service. The filter can change the parameters or reject the request.

Constructor Summary

Constructor and Description
PluginRequestFilter()

Method Summary

Modifier and Type Method and Description
  1. abstract
  2. JSONObject
filter(PluginServiceCallbacks callbacks,javax.servlet.http.HttpServletRequest request,JSONArtifact jsonRequest)
Filters a request that is submitted to a service.
  1. abstract
  2. java.lang.String[]
getFilteredServices()
Returns the names of the services that are extended by this filter.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

PluginRequestFilter

  1. public PluginRequestFilter()

Method Detail

getFilteredServices

  1. public abstract java.lang.String[] getFilteredServices( )
Returns the names of the services that are extended by this filter.
Returns:
A String array that contains the names of the services.

filter

  1. public abstract JSONObject filter( PluginServiceCallbacks callbacks,
  2. javax.servlet.http.HttpServletRequest request,
  3. JSONArtifact jsonRequest)
  4. throws java.lang.Exception
Filters a request that is submitted to a service.
Parameters:
callbacks - An instance of PluginServiceCallbacks that contains several functions that can be used by the service. These functions provide access to plug-in configuration and content server APIs.
request - The HttpServletRequest object that provides the request. The service can access the invocation parameters from the request. Note: The request object can be passed to a response filter to allow a plug-in to communicate information between a request and response filter.
jsonRequest - A JSONArtifact that provides the request in JSON format. If the request does not include a JSON Artifact object, this parameter returns null.
Returns:
A JSONObject object. If this object is not null, the service is skipped and the JSON object is used as the response.
Throws:
java.lang.Exception