|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jsieve.mailet.SieveMailAdapter
public class SieveMailAdapter
Class SieveMailAdapter implements a MailAdapter
for use in a Mailet environment.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.apache.jsieve.mail.MailAdapter |
|---|
MailAdapter.Address |
| Constructor Summary | |
|---|---|
SieveMailAdapter(org.apache.mailet.Mail aMail,
org.apache.mailet.MailetContext aMailetContext,
ActionDispatcher dispatcher,
Poster poster)
Constructor for SieveMailAdapter. |
|
| Method Summary | |
|---|---|
void |
addAction(Action action)
Adds an Action. |
protected java.util.List |
computeActions()
Returns a new List of actions. |
void |
executeActions()
Method executeActions. |
java.util.List |
getActions()
Returns the List of actions. |
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 |
getEnvelope(java.lang.String name)
Method getEnvelope answers a List of all of the envelope values in the receiver whose name is equal to the passed name. |
java.lang.String |
getEnvelopeFrom()
Returns the from. |
java.util.List |
getEnvelopeNames()
Method getEnvelopeNames answers a List of the names of the envelope values in the receiver. |
protected java.util.Map |
getEnvelopes()
Method getEnvelopes. |
java.lang.String |
getEnvelopeTo()
Returns the sole recipient or null if there isn't one. |
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. |
org.apache.commons.logging.Log |
getLog()
Gets the log. |
org.apache.mailet.Mail |
getMail()
Returns the mail. |
org.apache.mailet.MailetContext |
getMailetContext()
Returns the mailetContext. |
java.util.List |
getMatchingEnvelope(java.lang.String name)
Method getMatchingEnvelope answers a List of all of the envelope values in the receiver with the passed name. |
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. |
protected javax.mail.internet.MimeMessage |
getMessage()
Returns the message. |
java.lang.String |
getServerInfo()
Gets name (including version) of this server. |
int |
getSize()
Method getSize answers the receiver's message size in octets. |
MailAdapter.Address[] |
parseAddresses(java.lang.String arg)
Parses the named header value into individual addresses. |
void |
post(org.apache.mailet.MailAddress sender,
java.util.Collection recipients,
javax.mail.internet.MimeMessage mail)
Posts the given mail. |
void |
post(java.lang.String uri,
javax.mail.internet.MimeMessage mail)
Experimental mail delivery. |
protected void |
setActions(java.util.List actions)
Sets the actions. |
void |
setLog(org.apache.commons.logging.Log log)
|
protected void |
setMail(org.apache.mailet.Mail mail)
Sets the mail. |
protected void |
setMailetContext(org.apache.mailet.MailetContext mailetContext)
Sets the mailetContext. |
java.lang.String |
toString()
|
protected void |
updateActions()
Updates the actions. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SieveMailAdapter(org.apache.mailet.Mail aMail,
org.apache.mailet.MailetContext aMailetContext,
ActionDispatcher dispatcher,
Poster poster)
aMail - aMailetContext - | Method Detail |
|---|
public void setLog(org.apache.commons.logging.Log log)
protected javax.mail.internet.MimeMessage getMessage()
throws javax.mail.MessagingException
javax.mail.MessagingExceptionpublic java.util.List getActions()
getActions in interface MailAdapterprotected java.util.List computeActions()
public void addAction(Action action)
addAction in interface MailAdapteraction - The action to set
public void executeActions()
throws SieveException
MailAdapter
executeActions in interface MailAdapterSieveExceptionMailAdapter.executeActions()protected void setActions(java.util.List actions)
actions - The actions to setprotected void updateActions()
public java.util.ListIterator getActionsIterator()
MailAdapter
getActionsIterator in interface MailAdapterListIterator, not null, possibly unmodifiableMailAdapter.getActionsIterator()
public java.util.List getHeader(java.lang.String name)
throws SieveMailException
MailAdapter
getHeader in interface MailAdapterList not null, possibly empty, possible
unmodifiable
SieveMailExceptionMailAdapter.getHeader(String)
public java.util.List getHeaderNames()
throws SieveMailException
MailAdapter
getHeaderNames in interface MailAdapterList, not null possible empty, possible
unmodifiable
SieveMailExceptionMailAdapter.getHeaderNames()
public java.util.List getMatchingHeader(java.lang.String name)
throws SieveMailException
MailAdapterMethod 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 MailAdapterList, not null possibly empty, possible
unmodifiable
SieveMailExceptionMailAdapter.getMatchingHeader(String)
public int getSize()
throws SieveMailException
MailAdapter
getSize in interface MailAdapterSieveMailExceptionMailAdapter.getSize()protected java.util.Map getEnvelopes()
public java.util.List getEnvelope(java.lang.String name)
throws SieveMailException
EnvelopeAccessors
getEnvelope in interface EnvelopeAccessorsSieveMailExceptionEnvelopeAccessors.getEnvelope(String)
public java.util.List getEnvelopeNames()
throws SieveMailException
EnvelopeAccessors
getEnvelopeNames in interface EnvelopeAccessorsSieveMailExceptionEnvelopeAccessors.getEnvelopeNames()
public java.util.List getMatchingEnvelope(java.lang.String name)
throws SieveMailException
EnvelopeAccessorsMethod getMatchingEnvelope answers a List of all of the envelope values in the receiver with the passed name. If no matching names are found an empty List is returned.
This method differs from getEnvelope(String) in that it ignores case and the whitespace prefixes and suffixes of an envelope value name when performing the match, as required by RFC 3028. Thus "From", "from ", " From" and " from " are considered equal.
getMatchingEnvelope in interface EnvelopeAccessorsSieveMailExceptionEnvelopeAccessors.getMatchingEnvelope(String)public java.lang.String getEnvelopeFrom()
public java.lang.String getEnvelopeTo()
public org.apache.mailet.Mail getMail()
protected void setMail(org.apache.mailet.Mail mail)
mail - The mail to setpublic org.apache.mailet.MailetContext getMailetContext()
protected void setMailetContext(org.apache.mailet.MailetContext mailetContext)
mailetContext - The mailetContext to setpublic java.lang.String toString()
toString in class java.lang.ObjectObject.toString()
public java.lang.Object getContent()
throws SieveMailException
MailAdapter
getContent in interface MailAdapterSieveMailException
public java.lang.String getContentType()
throws SieveMailException
MailAdapter
getContentType in interface MailAdapterSieveMailException
public MailAdapter.Address[] parseAddresses(java.lang.String arg)
throws SieveMailException,
InternetAddressException
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 MailAdapterarg - name of the header whose value is to be split
SieveMailException - when the header value cannot be read
InternetAddressException - when the header value is not an address or list of addresses.
Implemetations may elect to support only standard headers
known to containing one or more addresses rather than parsing
the value contentpublic org.apache.commons.logging.Log getLog()
ActionContext
getLog in interface ActionContextpublic java.lang.String getServerInfo()
ActionContext
getServerInfo in interface ActionContext
public void post(java.lang.String uri,
javax.mail.internet.MimeMessage mail)
throws javax.mail.MessagingException
ActionContext
post in interface ActionContexturi - indicates the destination to which the mail to added. ATM
the value should be mailbox://mail - not null
javax.mail.MessagingException
public void post(org.apache.mailet.MailAddress sender,
java.util.Collection recipients,
javax.mail.internet.MimeMessage mail)
throws javax.mail.MessagingException
ActionContext
post in interface ActionContextsender - possibly nullrecipients - not nullmail - not null
javax.mail.MessagingException - when mail cannot be posted
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||