|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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()
|
java.util.List |
getActions()
Returns the List of actions. |
java.util.ListIterator |
getActionsIterator()
|
java.lang.Object |
getContent()
|
java.lang.String |
getContentType()
|
java.util.List |
getEnvelope(java.lang.String name)
|
java.lang.String |
getEnvelopeFrom()
Returns the from. |
java.util.List |
getEnvelopeNames()
|
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)
|
java.util.List |
getHeaderNames()
|
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)
|
java.util.List |
getMatchingHeader(java.lang.String name)
|
protected javax.mail.internet.MimeMessage |
getMessage()
Returns the message. |
java.lang.String |
getServerInfo()
Gets name (including version) of this server. |
int |
getSize()
|
MailAdapter.Address[] |
parseAddresses(java.lang.String arg)
|
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.MessagingException
public java.util.List getActions()
getActions
in interface MailAdapter
protected java.util.List computeActions()
public void addAction(Action action)
addAction
in interface MailAdapter
action
- The action to setpublic void executeActions() throws SieveException
executeActions
in interface MailAdapter
SieveException
MailAdapter.executeActions()
protected void setActions(java.util.List actions)
actions
- The actions to setprotected void updateActions()
public java.util.ListIterator getActionsIterator()
getActionsIterator
in interface MailAdapter
MailAdapter.getActionsIterator()
public java.util.List getHeader(java.lang.String name) throws SieveMailException
getHeader
in interface MailAdapter
SieveMailException
MailAdapter.getHeader(String)
public java.util.List getHeaderNames() throws SieveMailException
getHeaderNames
in interface MailAdapter
SieveMailException
MailAdapter.getHeaderNames()
public java.util.List getMatchingHeader(java.lang.String name) throws SieveMailException
getMatchingHeader
in interface MailAdapter
SieveMailException
MailAdapter.getMatchingHeader(String)
public int getSize() throws SieveMailException
getSize
in interface MailAdapter
SieveMailException
MailAdapter.getSize()
protected java.util.Map getEnvelopes()
public java.util.List getEnvelope(java.lang.String name) throws SieveMailException
getEnvelope
in interface EnvelopeAccessors
SieveMailException
EnvelopeAccessors.getEnvelope(String)
public java.util.List getEnvelopeNames() throws SieveMailException
getEnvelopeNames
in interface EnvelopeAccessors
SieveMailException
EnvelopeAccessors.getEnvelopeNames()
public java.util.List getMatchingEnvelope(java.lang.String name) throws SieveMailException
getMatchingEnvelope
in interface EnvelopeAccessors
SieveMailException
EnvelopeAccessors.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.Object
Object.toString()
public java.lang.Object getContent() throws SieveMailException
getContent
in interface MailAdapter
SieveMailException
public java.lang.String getContentType() throws SieveMailException
getContentType
in interface MailAdapter
SieveMailException
public MailAdapter.Address[] parseAddresses(java.lang.String arg) throws SieveMailException, InternetAddressException
parseAddresses
in interface MailAdapter
SieveMailException
InternetAddressException
public org.apache.commons.logging.Log getLog()
ActionContext
getLog
in interface ActionContext
public 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 ActionContext
uri
- 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 ActionContext
sender
- 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 |