Package org.apache.tomcat.util.descriptor.web

## Class FilterMap

- java.lang.Object
- - org.apache.tomcat.util.descriptor.web.XmlEncodingBase
  - - org.apache.tomcat.util.descriptor.web.FilterMap

All Implemented Interfaces:
  `java.io.Serializable`

    public class FilterMap
    extends XmlEncodingBase
    implements java.io.Serializable

Representation of a filter mapping for a web application, as represented in a `<filter-mapping>` element in the deployment descriptor. Each filter mapping must contain a filter name plus either a URL pattern or a servlet name.

Author:
  Craig R. McClanahan
See Also:
  Serialized Form

### Field Summary

Fields
`static int` `ASYNC`
`static int` `ERROR` The name of this filter to be executed when this mapping matches a particular request.
`static int` `FORWARD`
`static int` `INCLUDE`
`static int` `REQUEST`

### Constructor Summary

Constructors
`FilterMap()`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `addServletName​(java.lang.String servletName)`
`void` `addURLPattern​(java.lang.String urlPattern)`
`void` `addURLPatternDecoded​(java.lang.String urlPattern)`
`int` `getDispatcherMapping()`
`java.lang.String[]` `getDispatcherNames()`
`java.lang.String` `getFilterName()`
`boolean` `getMatchAllServletNames()`
`boolean` `getMatchAllUrlPatterns()`
`java.lang.String[]` `getServletNames()`
`java.lang.String[]` `getURLPatterns()`
`void` `setDispatcher​(java.lang.String dispatcherString)` This method will be used to set the current state of the FilterMap representing the state of when filters should be applied.
`void` `setFilterName​(java.lang.String filterName)`
`java.lang.String` `toString()` Render a String representation of this object.

### Methods inherited from class org.apache.tomcat.util.descriptor.web.XmlEncodingBase

`getCharset, getEncoding, setCharset, setEncoding`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Field Detail

#### ERROR

    public static final int ERROR

The name of this filter to be executed when this mapping matches a particular request.

See Also:
  Constant Field Values

#### FORWARD

    public static final int FORWARD

See Also:
  Constant Field Values

#### INCLUDE

    public static final int INCLUDE

See Also:
  Constant Field Values

#### REQUEST

    public static final int REQUEST

See Also:
  Constant Field Values

#### ASYNC

    public static final int ASYNC

See Also:
  Constant Field Values

### Constructor Detail

#### FilterMap

    public FilterMap()

### Method Detail

#### getFilterName

    public java.lang.String getFilterName()

#### setFilterName

    public void setFilterName​(java.lang.String filterName)

#### getServletNames

    public java.lang.String[] getServletNames()

#### addServletName

    public void addServletName​(java.lang.String servletName)

#### getMatchAllUrlPatterns

    public boolean getMatchAllUrlPatterns()

#### getMatchAllServletNames

    public boolean getMatchAllServletNames()

#### getURLPatterns

    public java.lang.String[] getURLPatterns()

#### addURLPattern

    public void addURLPattern​(java.lang.String urlPattern)

#### addURLPatternDecoded

    public void addURLPatternDecoded​(java.lang.String urlPattern)

#### setDispatcher

    public void setDispatcher​(java.lang.String dispatcherString)

This method will be used to set the current state of the FilterMap representing the state of when filters should be applied.

Parameters:
  `dispatcherString` - the dispatcher type which should match this filter

#### getDispatcherMapping

    public int getDispatcherMapping()

#### getDispatcherNames

    public java.lang.String[] getDispatcherNames()

#### toString

    public java.lang.String toString()

Render a String representation of this object.

Overrides:
  `toString` in class `java.lang.Object`