Overview | Package | Class | Tree | Serialized | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.ibm.wps.pe.pc.legacy.cmpf
Class PortletFilterAdapter

    java.lang.Object
      com.ibm.wps.pe.pc.legacy.cmpf.PortletFilterAdapter

    public abstract class PortletFilterAdapter

extends java.lang.Object

The `PortletFilterAdapter` is a default implementation for the `PortletFilter` interface. It is recommended not to extend the portlet filter interface directly. Rather, a portlet filter should derive from this adapter.

Since:
  5.0
See Also:
  `PortletFilter`

Constructor Summary
`PortletFilterAdapter()` Creates a new PortletFilterAdapter.

Method Summary
`void` | `destroy()`
`void` | `doActionEvent(PortletRequest request, PortletResponse response, PortletFilterChain chain)` Called by the portlet container (via the `doFilter` method) to allow a portlet filter to handle a ACTIONEVENT method.
`void` | `doBeginPage(PortletRequest request, PortletResponse response, PortletFilterChain chain)` Called by the portlet container (via the `doFilter` method) to allow a portlet filter to handle a BEGINPAGE method.
`void` | `doEndPage(PortletRequest request, PortletResponse response, PortletFilterChain chain)` Called by the portlet container (via the `doFilter` method) to allow a portlet filter to handle a ENDPAGE method.
`void` | `doFilter(Method method, PortletRequest request, PortletResponse response, PortletFilterChain chain)` The doFilter method of the Filter is called by the container each time a request/response pair is passed through the chain due to a client request for a resource at the end of the chain.
`void` | `doLogin(PortletRequest request, PortletResponse response, PortletFilterChain chain)` Called by the portlet container (via the `doFilter` method) to allow a portlet filter to handle a LOGIN method.
`void` | `doMessageEvent(PortletRequest request, PortletResponse response, PortletFilterChain chain)` Called by the portlet container (via the `doFilter` method) to allow a portlet filter to handle a MESSAGEVENT method.
`void` | `doService(PortletRequest request, PortletResponse response, PortletFilterChain chain)` Called by the portlet container (via the `doFilter` method) to allow a portlet filter to handle a SERVICE method.
`void` | `doTitle(PortletRequest request, PortletResponse response, PortletFilterChain chain)` Called by the portlet container (via the `doFilter` method) to allow a portlet filter to handle a DOTITLE method.
`void` | `doWindowEvent(PortletRequest request, PortletResponse response, PortletFilterChain chain)` Called by the portlet container (via the `doFilter` method) to allow a portlet filter to handle a WINDOWEVENT method.
`PortletFilterConfig` | `getFilterConfig()` Returns the FilterConfig for this Filter.
`void` | `init(PortletFilterConfig filterConfig)` Called by the portlet container to indicate to a filter that it is being placed into service.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### PortletFilterAdapter

    public PortletFilterAdapter()

  Creates a new PortletFilterAdapter.

Method Detail

### init

    public void init(PortletFilterConfig filterConfig)
              throws PortletException

  Called by the portlet container to indicate to a filter that it is being placed into service. The portlet container calls the init method exactly once after instantiating the filter.
  The init method must complete successfully before the filter is asked to do any filtering work.

  The portlet container cannot place the filter into service if the init method either

  1. Throws a PortletException
  2. Does not return within a time period defined by the portlet container

  Parameters:
    `filterConfig` - the portlet filter config
  Throws:
    `PortletException` - if an exception has occurrred that interferes with the portlet filter's normal initialization

### doFilter

    public void doFilter(Method method,
                         PortletRequest request,
                         PortletResponse response,
                         PortletFilterChain chain)
                  throws PortletException,
                         java.io.IOException

  The doFilter method of the Filter is called by the container each time a request/response pair is passed through the chain due to a client request for a resource at the end of the chain.

  Please note that the response may be null for an event-based method, e.g., ActionEvent.

  The FilterChain passed in to this method allows the Filter to pass on the request and response to the next entity in the chain.

  A typical implementation of this method would follow the following pattern:

  1. Examine the request
  2. Optionally wrap the request object with a custom implementation to filter content or headers for input filtering
  3. Optionally wrap the response object with a custom implementation to filter content or headers for output filtering
  4. a) Either invoke the next entity in the chain using the FilterChain object (chain.doFilter()),
  5. b) or not pass on the request/response pair to the next entity in the filter chain to block the request processing

  Parameters:
    `method` - the type of requested method
    `request` - the request to pass along the chain.
    `response` - the response to pass along the chain.
    `chain` - the portlet filter chain
  Throws:
    `PortletException` - if the filter has trouble fulfilling the request
    `java.io.IOException` - if the streaming causes an I/O problem
  See Also:
    `PortletFilterChain`

### doLogin

    public void doLogin(PortletRequest request,
                        PortletResponse response,
                        PortletFilterChain chain)
                 throws PortletException,
                        java.io.IOException

  Called by the portlet container (via the `doFilter` method) to allow a portlet filter to handle a LOGIN method. For this method the response is always NULL.

  Parameters:
    `request` - the request to pass along the chain.
    `response` - the response to pass along the chain.
    `chain` - the portlet filter chain
  Throws:
    `PortletException` - if the filter has trouble fulfilling the request
    `java.io.IOException` - if the streaming causes an I/O problem
  See Also:
    `PortletFilterChain`

### doBeginPage

    public void doBeginPage(PortletRequest request,
                            PortletResponse response,
                            PortletFilterChain chain)
                     throws PortletException,
                            java.io.IOException

  Called by the portlet container (via the `doFilter` method) to allow a portlet filter to handle a BEGINPAGE method.

  Parameters:
    `request` - the request to pass along the chain.
    `response` - the response to pass along the chain.
    `chain` - the portlet filter chain
  Throws:
    `PortletException` - if the filter has trouble fulfilling the request
    `java.io.IOException` - if the streaming causes an I/O problem
  See Also:
    `PortletFilterChain`

### doService

    public void doService(PortletRequest request,
                          PortletResponse response,
                          PortletFilterChain chain)
                   throws PortletException,
                          java.io.IOException

  Called by the portlet container (via the `doFilter` method) to allow a portlet filter to handle a SERVICE method.

  Parameters:
    `request` - the request to pass along the chain.
    `response` - the response to pass along the chain.
    `chain` - the portlet filter chain
  Throws:
    `PortletException` - if the filter has trouble fulfilling the request
    `java.io.IOException` - if the streaming causes an I/O problem
  See Also:
    `PortletFilterChain`

### doEndPage

    public void doEndPage(PortletRequest request,
                          PortletResponse response,
                          PortletFilterChain chain)
                   throws PortletException,
                          java.io.IOException

  Called by the portlet container (via the `doFilter` method) to allow a portlet filter to handle a ENDPAGE method.

  Parameters:
    `request` - the request to pass along the chain.
    `response` - the response to pass along the chain.
    `chain` - the portlet filter chain
  Throws:
    `PortletException` - if the filter has trouble fulfilling the request
    `java.io.IOException` - if the streaming causes an I/O problem
  See Also:
    `PortletFilterChain`

### doTitle

    public void doTitle(PortletRequest request,
                        PortletResponse response,
                        PortletFilterChain chain)
                 throws PortletException,
                        java.io.IOException

  Called by the portlet container (via the `doFilter` method) to allow a portlet filter to handle a DOTITLE method.

  Parameters:
    `request` - the request to pass along the chain.
    `response` - the response to pass along the chain.
    `chain` - the portlet filter chain
  Throws:
    `PortletException` - if the filter has trouble fulfilling the request
    `java.io.IOException` - if the streaming causes an I/O problem
  See Also:
    `PortletFilterChain`

### doActionEvent

    public void doActionEvent(PortletRequest request,
                              PortletResponse response,
                              PortletFilterChain chain)
                       throws PortletException,
                              java.io.IOException

  Called by the portlet container (via the `doFilter` method) to allow a portlet filter to handle a ACTIONEVENT method. For this method the response is always NULL.

  Parameters:
    `request` - the request to pass along the chain.
    `response` - the response to pass along the chain.
    `chain` - the portlet filter chain
  Throws:
    `PortletException` - if the filter has trouble fulfilling the request
    `java.io.IOException` - if the streaming causes an I/O problem
  See Also:
    `PortletFilterChain`

### doMessageEvent

    public void doMessageEvent(PortletRequest request,
                               PortletResponse response,
                               PortletFilterChain chain)
                        throws PortletException,
                               java.io.IOException

  Called by the portlet container (via the `doFilter` method) to allow a portlet filter to handle a MESSAGEVENT method. For this method the response is always NULL.

  Parameters:
    `request` - the request to pass along the chain.
    `response` - the response to pass along the chain.
    `chain` - the portlet filter chain
  Throws:
    `PortletException` - if the filter has trouble fulfilling the request
    `java.io.IOException` - if the streaming causes an I/O problem
  See Also:
    `PortletFilterChain`

### doWindowEvent

    public void doWindowEvent(PortletRequest request,
                              PortletResponse response,
                              PortletFilterChain chain)
                       throws PortletException,
                              java.io.IOException

  Called by the portlet container (via the `doFilter` method) to allow a portlet filter to handle a WINDOWEVENT method. For this method the response is always NULL.

  Parameters:
    `request` - the request to pass along the chain.
    `response` - the response to pass along the chain.
    `chain` - the portlet filter chain
  Throws:
    `PortletException` - if the filter has trouble fulfilling the request
    `java.io.IOException` - if the streaming causes an I/O problem
  See Also:
    `PortletFilterChain`

### destroy

    public void destroy()

### getFilterConfig

    public PortletFilterConfig getFilterConfig()

  Returns the FilterConfig for this Filter.

  Returns:
    the filter config
  See Also:
    `PortletFilterConfig`

Overview | Package | Class | Tree | Serialized | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD