org.mentawai.filter
Class CharacterEncodingFilter

java.lang.Object
  extended by org.mentawai.filter.CharacterEncodingFilter
All Implemented Interfaces:
Filter

public class CharacterEncodingFilter
extends Object
implements Filter

Filter class CharacterEncodingFilter can change charset and
content type system wide.

Author:
helio frota

Field Summary
static String ISO_8859_1
          Attribute constant ISO_8859_1 of CharacterEncodingFilter.
static String TEXT_CSS
          Attribute constant TEXT_CSS of CharacterEncodingFilter.
static String TEXT_HTML
          Attribute constant TEXT_HTML of CharacterEncodingFilter.
static String TEXT_PLAIN
          Attribute constant TEXT_PLAIN of CharacterEncodingFilter.
static String UTF_8
          Attribute constant UTF_8 of CharacterEncodingFilter.
 
Constructor Summary
CharacterEncodingFilter()
          Default constructor.
CharacterEncodingFilter(String charSet)
          Parametric constructor.
CharacterEncodingFilter(String charSet, String contentType)
          Parametric constructor.
 
Method Summary
 void destroy()
          Default destroy method.
 String filter(InvocationChain chain)
          Executes the filter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UTF_8

public static final String UTF_8
Attribute constant UTF_8 of CharacterEncodingFilter.

See Also:
Constant Field Values

ISO_8859_1

public static final String ISO_8859_1
Attribute constant ISO_8859_1 of CharacterEncodingFilter.

See Also:
Constant Field Values

TEXT_PLAIN

public static final String TEXT_PLAIN
Attribute constant TEXT_PLAIN of CharacterEncodingFilter.

See Also:
Constant Field Values

TEXT_HTML

public static final String TEXT_HTML
Attribute constant TEXT_HTML of CharacterEncodingFilter.

See Also:
Constant Field Values

TEXT_CSS

public static final String TEXT_CSS
Attribute constant TEXT_CSS of CharacterEncodingFilter.

See Also:
Constant Field Values
Constructor Detail

CharacterEncodingFilter

public CharacterEncodingFilter()
Default constructor.


CharacterEncodingFilter

public CharacterEncodingFilter(String charSet)
Parametric constructor.

Parameters:
charSet - String

CharacterEncodingFilter

public CharacterEncodingFilter(String charSet,
                               String contentType)
Parametric constructor.

Parameters:
charSet -
contentType -
Method Detail

filter

public String filter(InvocationChain chain)
              throws Exception
Description copied from interface: Filter
Executes the filter.

Specified by:
filter in interface Filter
Parameters:
chain - The InvocationChain for the action this filter is being applied to.
Returns:
The result of the filter or the action the filter is being applied to.
Throws:
Exception

destroy

public void destroy()
Default destroy method.

Specified by:
destroy in interface Filter


Copyright © 2013. All Rights Reserved.