|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.james.management.SpoolFilter
public class SpoolFilter
immutual collection of filters used to specify which mail should be processed by SpoolManagement criterias are: exact state match headerValue regular expressions match all related headers
Field Summary | |
---|---|
static java.lang.String |
ERROR_STATE
|
static SpoolFilter |
ERRORMAIL_FILTER
|
Constructor Summary | |
---|---|
SpoolFilter(java.lang.String state)
Construct the SpoolFilter |
|
SpoolFilter(java.lang.String state,
java.util.Map headerFilters)
Construct the SpoolFilter |
|
SpoolFilter(java.lang.String header,
java.lang.String headerValueRegex)
Construct the SpoolFilter |
|
SpoolFilter(java.lang.String state,
java.lang.String header,
java.lang.String headerValueRegex)
Construct the SpoolFilter |
Method Summary | |
---|---|
boolean |
doFilter()
|
boolean |
doFilterHeader()
Return true if any filters should be used on the headers |
boolean |
doFilterState()
Return true if any state was given on init the SpoolFilter |
java.util.Iterator |
getHeaders()
Return an Iterator which contains all headers which should be filtered |
java.lang.String |
getHeaderValueRegex(java.lang.String header)
Return the regex which should be used on the given header. |
org.apache.oro.text.regex.Pattern |
getHeaderValueRegexCompiled(java.lang.String header)
Return the compiled Pattern for the given header. |
java.lang.String |
getState()
Return the message state on which the filter will be used |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String ERROR_STATE
public static final SpoolFilter ERRORMAIL_FILTER
Constructor Detail |
---|
public SpoolFilter(java.lang.String state, java.lang.String header, java.lang.String headerValueRegex)
state
- the message state on which message the filter should be usedheader
- the headername on which the given regex should be usedheaderValueRegex
- the regex to use on the value of the given headerpublic SpoolFilter(java.lang.String state)
state
- the message state on which message the filter should be usedpublic SpoolFilter(java.lang.String header, java.lang.String headerValueRegex)
header
- the headername on which the given regex should be usedheaderValueRegex
- the regex to use on the value of the given headerpublic SpoolFilter(java.lang.String state, java.util.Map headerFilters)
state
- the message state on which message the filter should be usedheaderFilters
- a Map which contains filters to useMethod Detail |
---|
public boolean doFilter()
public boolean doFilterState()
public boolean doFilterHeader()
public java.lang.String getState()
public java.util.Iterator getHeaders()
public java.lang.String getHeaderValueRegex(java.lang.String header)
header
- the headername for which the regex should be retrieven.
public org.apache.oro.text.regex.Pattern getHeaderValueRegexCompiled(java.lang.String header) throws SpoolManagementException
header
- the header for which the pattern should be returned
SpoolManagementException
- get thrown if an invalid regex is used with the given header
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |