|
Compoze Software, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.compoze.mail.AbstractMessageFilter
This class is the base for a message filter.
Field Summary | |
protected boolean |
m_bFilterOr
|
protected boolean |
m_bOr
|
protected AbstractMessageFilter |
m_filter
|
Constructor Summary | |
AbstractMessageFilter()
|
Method Summary | |
java.util.List |
acceptMessages(java.util.Collection messages)
Checks if the filter accepts messages in the list. |
abstract boolean |
accepts(IMessage message)
Checks if the filter accepts specified message. |
void |
addFilter(AbstractMessageFilter filter,
boolean bOr)
Adds the filter to this filter. |
protected boolean |
compareDate(java.util.Date givenDate,
java.util.Date startDate,
java.util.Date endDate)
Compares a given date to determine if within a specified range. |
protected boolean |
compareString(java.lang.String sStr1,
java.lang.String sStr2,
boolean bExact,
boolean bCaseSensitive)
Compares two strings. |
protected boolean |
compareStringStartsWith(java.lang.String sStr,
java.lang.String sPrefix)
Compares two strings. |
AbstractMessageFilter |
getFilter()
Gets the filter added to this message filter. |
abstract com.compoze.ejb.persistence.database.IFilterRule |
getFilterRule()
Gets the filter rule associated with this message filter. |
void |
setOr(boolean bOr)
Sets the or. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected boolean m_bOr
protected boolean m_bFilterOr
protected AbstractMessageFilter m_filter
Constructor Detail |
public AbstractMessageFilter()
Method Detail |
public abstract boolean accepts(IMessage message) throws MailException
message
- the message to checktrue
if the filter accepts the message; false
otherwisepublic java.util.List acceptMessages(java.util.Collection messages) throws MailException
messages
- a collection of IMessage
objects to checkIMessage
objects the filter accepts or an empty list of no messages are acceptedpublic void setOr(boolean bOr)
public void addFilter(AbstractMessageFilter filter, boolean bOr)
filter
- the filterbOr
- true
to 'or' the filter; false
otherwiseprotected boolean compareStringStartsWith(java.lang.String sStr, java.lang.String sPrefix)
sStr1
- the string to compare forsStr2
- the string to compare withtrue
if the strings compare; false
otherwiseprotected boolean compareString(java.lang.String sStr1, java.lang.String sStr2, boolean bExact, boolean bCaseSensitive)
sStr1
- the string to compare forsStr2
- the string to compare withbExact
- true
for an exact matchbCaseSensitive
- true
for case sensitive matchtrue
if the strings compare; false
otherwiseprotected boolean compareDate(java.util.Date givenDate, java.util.Date startDate, java.util.Date endDate)
givenDate
- the given datestartDate
- the start date (may not be null
)endDate
- the end date (may not be null
)true
if the given date is within the specified range; false
otherwisepublic AbstractMessageFilter getFilter()
null
if not setaddFilter(AbstractMessageFilter,boolean)
public abstract com.compoze.ejb.persistence.database.IFilterRule getFilterRule()
null
for no filtering
|
Compoze Software, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |