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

## org.ajax4jsf.webapp
Class BaseFilter

    java.lang.Object
      org.ajax4jsf.webapp.BaseFilter

All Implemented Interfaces:
  javax.servlet.Filter

    public abstract class BaseFilter

extends java.lang.Object
implements javax.servlet.Filter

Base class for request processing filters, with convert Htmp content to XML for ajax requests, and serve request to application off-page resources

Version:
  $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:58:21 $
Author:
  shura (latest modification by $Author: alexsmirnov $)

Field Summary
`static java.lang.String` | `ABSOLUTE_TAGS_PARAMETER`
`static java.lang.String` | `AJAX_PUSH_KEY_HEADER`
`static java.lang.String` | `AJAX_PUSH_READY`
`static java.lang.String` | `AJAX_PUSH_STATUS_HEADER`
`static java.lang.String` | `CACHEABLE_PREFIX`
`static java.lang.String` | `DATA_PARAMETER`
`static boolean` | `DEBUG`
`static java.lang.String` | `DEFAULT_SERVLET_PATH`
`protected PollEventsManager` | `eventsManager`
`static java.lang.String` | `FILTER_PERFORMED`
`static java.lang.String` | `MULTIPART` Multipart request start
`static java.lang.String` | `RENDERER_PREFIX`
`protected InternetResourceService` | `resourceService`
`static java.lang.String` | `RESPONSE_WRAPPER_ATTRIBUTE`
`static java.lang.String` | `REWRITEID_PARAMETER`
`static java.lang.String` | `SEND_HTTP_ERROR` Request parameter that allow to send HTTP error instead of html message
`static java.lang.String` | `STYLESHEET_PARAMETER`
`protected BaseXMLFilter` | `xmlFilter`

Constructor Summary
`BaseFilter()`

Method Summary
`void` | `destroy()` Destroy the filter.
`void` | `doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain)` Execute the filter.
`protected java.lang.String` | `getAttributesNames()`
`protected java.lang.String` | `getFunction()`
`protected InternetResourceService` | `getResourceService()`
`protected void` | `handleRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.FilterChain chain)`
`void` | `init(javax.servlet.FilterConfig config)` Initialize the filter.
`protected boolean` | `isAjaxRequest(javax.servlet.ServletRequest request)`
`protected boolean` | `isRewriteid()`
`protected void` | `processUploadsAndHandleRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.FilterChain chain)` Method catches upload files request.
`protected void` | `setAttributesNames(java.lang.String attributesNames)`
`protected void` | `setFunction(java.lang.String function)`
`protected void` | `setRewriteid(boolean rewriteid)`
`protected void` | `setupRequestEncoding(javax.servlet.http.HttpServletRequest httpServletRequest)`

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

Field Detail

### ABSOLUTE_TAGS_PARAMETER

    public static final java.lang.String ABSOLUTE_TAGS_PARAMETER

See Also:
  Constant Field Values

### AJAX_PUSH_KEY_HEADER

    public static final java.lang.String AJAX_PUSH_KEY_HEADER

See Also:
  Constant Field Values

### AJAX_PUSH_READY

    public static final java.lang.String AJAX_PUSH_READY

See Also:
  Constant Field Values

### AJAX_PUSH_STATUS_HEADER

    public static final java.lang.String AJAX_PUSH_STATUS_HEADER

See Also:
  Constant Field Values

### CACHEABLE_PREFIX

    public static final java.lang.String CACHEABLE_PREFIX

See Also:
  Constant Field Values

### DATA_PARAMETER

    public static final java.lang.String DATA_PARAMETER

See Also:
  Constant Field Values

### DEFAULT_SERVLET_PATH

    public static final java.lang.String DEFAULT_SERVLET_PATH

See Also:
  Constant Field Values

### FILTER_PERFORMED

    public static final java.lang.String FILTER_PERFORMED

See Also:
  Constant Field Values

### MULTIPART

    public static final java.lang.String MULTIPART

  Multipart request start

  See Also:
    Constant Field Values

### RENDERER_PREFIX

    public static final java.lang.String RENDERER_PREFIX

See Also:
  Constant Field Values

### RESPONSE_WRAPPER_ATTRIBUTE

    public static final java.lang.String RESPONSE_WRAPPER_ATTRIBUTE

See Also:
  Constant Field Values

### REWRITEID_PARAMETER

    public static final java.lang.String REWRITEID_PARAMETER

See Also:
  Constant Field Values

### SEND_HTTP_ERROR

    public static final java.lang.String SEND_HTTP_ERROR

  Request parameter that allow to send HTTP error instead of html message

  See Also:
    Constant Field Values

### STYLESHEET_PARAMETER

    public static final java.lang.String STYLESHEET_PARAMETER

See Also:
  Constant Field Values

### DEBUG

    public static final boolean DEBUG

See Also:
  Constant Field Values

### resourceService

    protected InternetResourceService resourceService

### xmlFilter

    protected BaseXMLFilter xmlFilter

### eventsManager

    protected PollEventsManager eventsManager

Constructor Detail

### BaseFilter

    public BaseFilter()

Method Detail

### init

    public void init(javax.servlet.FilterConfig config)
              throws javax.servlet.ServletException

  Initialize the filter.

  Specified by:
    `init` in interface `javax.servlet.Filter`
  Throws:
    `javax.servlet.ServletException`

### handleRequest

    protected void handleRequest(javax.servlet.http.HttpServletRequest request,
                                 javax.servlet.http.HttpServletResponse response,
                                 javax.servlet.FilterChain chain)
                          throws java.io.IOException,
                                 javax.servlet.ServletException

  Throws:
    `java.io.IOException`
    `javax.servlet.ServletException`

### processUploadsAndHandleRequest

    protected void processUploadsAndHandleRequest(javax.servlet.http.HttpServletRequest request,
                                                  javax.servlet.http.HttpServletResponse response,
                                                  javax.servlet.FilterChain chain)
                                           throws java.io.IOException,
                                                  javax.servlet.ServletException

  Method catches upload files request. Request parameter org.ajax4jsf.Filter.UPLOAD_FILES_ID indicates if request generated by rich-upload component. If it was detected custom parsing request should be done. Processing information about percent of completion and file size will be put into session scope.

  Parameters:
    `request` -
    `response` -
  Throws:
    `java.io.IOException`
    `javax.servlet.ServletException`

### setupRequestEncoding

    protected void setupRequestEncoding(javax.servlet.http.HttpServletRequest httpServletRequest)
                                 throws java.io.UnsupportedEncodingException

  Parameters:
    `httpServletRequest` -
  Throws:
    `java.io.UnsupportedEncodingException`

### doFilter

    public void doFilter(javax.servlet.ServletRequest request,
                         javax.servlet.ServletResponse response,
                         javax.servlet.FilterChain chain)
                  throws java.io.IOException,
                         javax.servlet.ServletException

  Execute the filter.

  Specified by:
    `doFilter` in interface `javax.servlet.Filter`
  Throws:
    `java.io.IOException`
    `javax.servlet.ServletException`

### isAjaxRequest

    protected boolean isAjaxRequest(javax.servlet.ServletRequest request)

  Parameters:
    `request` -
  Returns:

### destroy

    public void destroy()

  Destroy the filter.

  Specified by:
    `destroy` in interface `javax.servlet.Filter`

### getResourceService

    protected InternetResourceService getResourceService()
                                                  throws javax.servlet.ServletException

  Returns:
    the resourceService
  Throws:
    `javax.servlet.ServletException`

### setFunction

    protected void setFunction(java.lang.String function)

  Parameters:
    `function` - The function to set.

### getFunction

    protected java.lang.String getFunction()

  Returns:
    Returns the function.

### setRewriteid

    protected void setRewriteid(boolean rewriteid)

  Parameters:
    `rewriteid` - The rewriteid to set.

### isRewriteid

    protected boolean isRewriteid()

  Returns:
    Returns the rewriteid.

### setAttributesNames

    protected void setAttributesNames(java.lang.String attributesNames)

  Parameters:
    `attributesNames` - The attributesNames to set.

### getAttributesNames

    protected java.lang.String getAttributesNames()

  Returns:
    Returns the attributesNames.

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

Copyright © 2010 JBoss, a division of Red Hat, Inc.. All Rights Reserved.