|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.cocoon.mail.MailContentHandlerDelegate
public class MailContentHandlerDelegate
Marshal javamail objects
Having one or more javamail objects, like Message, Folder, et al. emit SAX events
| Field Summary | |
|---|---|
static String |
PREFIX
PREFIX of the generated XML elements |
static String |
URI
URI of the generated XML elements |
| Constructor Summary | |
|---|---|
MailContentHandlerDelegate(ContentHandler contentHandler)
Constructor for the MailContentHandler object |
|
| Method Summary | |
|---|---|
protected void |
contentToSAX(ContentHandler contentHandler,
Part part)
Emit content of message part as sequence of SAX events |
protected void |
emitAddress(String nodeName,
Address address)
Helper method emitting SAX events representing an internet address |
protected void |
emitDate(String nodeName,
Date d)
Helper method emitting SAX events representing a date |
void |
endDocument()
Emit starting SAX events sequence, including SAX endDocument event |
protected void |
endDocumentInternal(boolean emitEndDocument)
Emit end document sequence |
void |
endDocumentXMLizer()
Emit starting SAX events sequence, excluding SAX endDocument event |
protected void |
folderToSAX(ContentHandler contentHandler,
Folder folder)
Emit folder as sequence of SAX events |
SimpleDateFormat |
getSimpleDateFormat()
Gets the simpleDateFormat attribute of the MailContentHandlerDelegate object |
void |
marshalFolderToSAX(Folder folder)
Emit a folder as a sequence of SAX events |
void |
marshalFolderToSAX(Folder[] folders)
Emit folders as a sequence of SAX events |
void |
marshalMessageEnvelopeToSAX(Message message)
Emit a message envelope as a sequence of SAX events |
void |
marshalMessageToSAX(Message message)
Emit a message envelope, and message content as a sequence of SAX events |
void |
marshalPartToSAX(Part part)
Emit a message content as a sequence of SAX events |
protected void |
messageEnvelopeToSAX(ContentHandler contentHandler,
Message message)
Emit message envelope as sequence of SAX events |
protected void |
partToSAX(ContentHandler contentHandler,
Part part,
int i)
Emit part as sequence of SAX events |
void |
setSimpleDateFormat(SimpleDateFormat sdf)
Sets the simpleDateFormatter attribute of the MailContentHandlerDelegate object |
void |
startDocument()
Emit starting SAX events sequence, including SAX startDocument event |
protected void |
startDocumentInternal(boolean emitStartDocument)
Emit start document sequence |
void |
startDocumentXMLizer()
Emit starting SAX events sequence, excluding SAX startDocument event |
| Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled |
|---|
enableLogging, getLogger, setupLogger, setupLogger, setupLogger |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String URI
public static final String PREFIX
| Constructor Detail |
|---|
public MailContentHandlerDelegate(ContentHandler contentHandler)
contentHandler - Description of Parameter| Method Detail |
|---|
public void setSimpleDateFormat(SimpleDateFormat sdf)
sdf - The new simpleDateFormat valuepublic SimpleDateFormat getSimpleDateFormat()
public void startDocument()
throws SAXException
SAXException - thrown iff generating SAX events fails
public void startDocumentXMLizer()
throws SAXException
SAXException - thrown iff generating SAX events fails
public void endDocument()
throws SAXException
SAXException - thrown iff generating SAX events fails
public void endDocumentXMLizer()
throws SAXException
SAXException - thrown iff generating SAX events failspublic void marshalFolderToSAX(Folder folder)
folder - emit this folderpublic void marshalFolderToSAX(Folder[] folders)
folders - emit these folderspublic void marshalMessageEnvelopeToSAX(Message message)
message - emit envelope of this messagepublic void marshalMessageToSAX(Message message)
message - emit envelope, and content of this messagepublic void marshalPartToSAX(Part part)
part - Description of the Parameter
protected void startDocumentInternal(boolean emitStartDocument)
throws SAXException
emitStartDocument - flag controlling invocation of SAX startDocument
SAXException - thrown iff generating SAX events fails
protected void endDocumentInternal(boolean emitEndDocument)
throws SAXException
emitEndDocument - flag controlling invocation of SAX endDocument
SAXException - thrown iff generating SAX events fails
protected void folderToSAX(ContentHandler contentHandler,
Folder folder)
throws MessagingException,
SAXException
folder - emit this foldercontentHandler - specifies sink of SAX events
MessagingException - thrown iff accessing javamail data fails
SAXException - thrown iff generating SAX events fails
protected void messageEnvelopeToSAX(ContentHandler contentHandler,
Message message)
throws MessagingException,
SAXException
message - emit envelope of this messagecontentHandler - specifies sink of SAX events
MessagingException - thrown iff accessing javamail data fails
SAXException - thrown iff generating SAX events fails
protected void partToSAX(ContentHandler contentHandler,
Part part,
int i)
throws MessagingException,
IOException,
SAXException
part - Description of the ParametercontentHandler - specifies sink of SAX eventsi - Description of the Parameter
MessagingException - thrown iff accessing javamail data fails
IOException - thrown iff accessing content fails
SAXException - thrown iff generating SAX events fails
protected void contentToSAX(ContentHandler contentHandler,
Part part)
throws MessagingException,
IOException,
SAXException
contentHandler - specifies sink of SAX eventspart - emit this part as sequence of SAX events
SAXException - thrown iff generating SAX events fails
MessagingException - thrown iff accessing javamail data fails
IOException - thrown iff accessing content fails
protected void emitAddress(String nodeName,
Address address)
throws SAXException
nodeName - emitted element node nameaddress - emitted address data
SAXException - thrown iff generating SAX events fails
protected void emitDate(String nodeName,
Date d)
throws SAXException
nodeName - emitted element node named - Description of the Parameter
SAXException - thrown iff generating SAX events fails
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||