|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jsieve.util.check.ScriptCheckMailAdapter
public class ScriptCheckMailAdapter
Checks script execution for an email. The wrapped email is set by called
setMail(javax.mail.Message). Actions are recorded on executedActions and can
be retrieved by getExecutedActions().
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.apache.jsieve.mail.MailAdapter |
|---|
MailAdapter.Address |
| Constructor Summary | |
|---|---|
ScriptCheckMailAdapter()
|
|
| Method Summary | |
|---|---|
void |
addAction(Action action)
Method addAction adds an Action to the List of Actions to be performed by the receiver. |
void |
executeActions()
Method executeActions. |
java.util.List |
getActions()
Method getActions answers the List of Actions accumulated by the receiver. |
java.util.ListIterator |
getActionsIterator()
Method getActionIteraror answers an Iterator over the List of Actions accumulated by the receiver. |
java.lang.Object |
getContent()
Method getContent returns object containing the message content. |
java.lang.String |
getContentType()
Method getContentType returns string/mime representation of the message type. |
java.util.List |
getExecutedActions()
Gets the actions accumulated when executedActions was last
called. |
java.util.List |
getHeader(java.lang.String name)
Method getHeader answers a List of all of the headers in the receiver whose name is equal to the passed name. |
java.util.List |
getHeaderNames()
Method getHeaderNames answers a List of all of the headers in the receiver. |
javax.mail.Message |
getMail()
Gets the wrapped email. |
java.util.List |
getMatchingHeader(java.lang.String name)
Method getMatchingHeader answers a List of all of the headers in the receiver with the passed name. |
int |
getSize()
Method getSize answers the receiver's message size in octets. |
MailAdapter.Address[] |
parseAddresses(java.lang.String headerName)
Parses the named header value into individual addresses. |
MailAdapter.Address[] |
parseAddresses(java.lang.String headerName,
javax.mail.Message message)
Parses the value from the given message into addresses. |
void |
reset()
Resets executed and accumlated actions. |
void |
setMail(javax.mail.Message mail)
Sets the wrapped email and reset()s the adapter ready for another
execution. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ScriptCheckMailAdapter()
| Method Detail |
|---|
public javax.mail.Message getMail()
Message, possibly nullpublic void setMail(javax.mail.Message mail)
reset()s the adapter ready for another
execution.
mail - Message, possibly nullpublic void addAction(Action action)
addAction in interface MailAdapteraction -
public void executeActions()
throws SieveException
executeActions in interface MailAdapterSieveExceptionpublic java.util.List getExecutedActions()
executedActions was last
called.
List of Actions, not null. This list is a
modifiable copypublic java.util.List getActions()
getActions in interface MailAdapterList of Action's, not null, possibly
unmodifiablepublic java.util.ListIterator getActionsIterator()
getActionsIterator in interface MailAdapterListIterator, not null, possibly unmodifiablepublic void reset()
public java.util.List getHeader(java.lang.String name)
throws SieveMailException
getHeader in interface MailAdaptername -
List not null, possibly empty
SieveMailException
public java.util.List getHeaderNames()
throws SieveMailException
getHeaderNames in interface MailAdapterList, not null possible empty, possible
unmodifiable
SieveMailException
public java.util.List getMatchingHeader(java.lang.String name)
throws SieveMailException
Method getMatchingHeader answers a List of all of the headers in the receiver with the passed name. If no headers are found an empty List is returned.
This method differs from getHeader(String) in that it ignores case and the whitespace prefixes and suffixes of a header name when performing the match, as required by RFC 3028. Thus "From", "from ", " From" and " from " are considered equal.
getMatchingHeader in interface MailAdaptername -
List, not null possibly empty
SieveMailException
public int getSize()
throws SieveMailException
getSize in interface MailAdapterSieveMailException
public java.lang.String getContentType()
throws SieveMailException
getContentType in interface MailAdapterSieveMailException
public java.lang.Object getContent()
throws SieveMailException
getContent in interface MailAdapterSieveMailException
public MailAdapter.Address[] parseAddresses(java.lang.String headerName)
throws SieveMailException
MailAdapterParses the named header value into individual addresses.
Headers should be matched in a way that ignores case and the whitespace prefixes and suffixes of a header name when performing the match, as required by RFC 3028. Thus "From", "from ", " From" and " from " are considered equal.
parseAddresses in interface MailAdapterheaderName - name of the header whose value is to be split
SieveMailException - when the header value cannot be read
public MailAdapter.Address[] parseAddresses(java.lang.String headerName,
javax.mail.Message message)
throws SieveMailException
headerName - header name, to be matched case insensitivelymessage - Message, not null
Address array, not null possibly empty
SieveMailException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||