|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.alfresco.email.server.handler.AbstractEmailMessageHandler
public abstract class AbstractEmailMessageHandler
Abstract class implements common logic for processing email messages.
Constructor Summary | |
---|---|
AbstractEmailMessageHandler()
|
Method Summary | |
---|---|
protected NodeRef |
addAttachment(NodeService nodeService,
NodeRef folder,
NodeRef mainContentNode,
java.lang.String fileName)
Adds new node into Alfresco repository and mark its as an attachment. |
protected void |
addAttachments(NodeRef spaceNodeRef,
NodeRef nodeRef,
EmailMessage message)
Extracts the attachments from the given message and adds them to the space. |
protected NodeRef |
addContentNode(NodeService nodeService,
NodeRef parent,
java.lang.String name)
Add new node into Alfresco repository with specified parameters. |
protected NodeRef |
addContentNode(NodeService nodeService,
NodeRef parent,
java.lang.String name,
QName assocType)
Add new node into Alfresco repository with specified parameters. |
protected void |
addEmailedAspect(NodeRef nodeRef,
EmailMessage message)
Add emailed aspect to the specified node. |
protected ContentService |
getContentService()
|
protected DictionaryService |
getDictionaryService()
|
protected MimetypeService |
getMimetypeService()
|
protected NodeService |
getNodeService()
|
protected NodeRef |
getTargetNode(java.lang.String to)
|
void |
setContentService(ContentService contentService)
|
void |
setDictionaryService(DictionaryService dictionaryService)
|
void |
setMimetypeService(MimetypeService mimetypeService)
|
void |
setNodeService(NodeService nodeService)
|
void |
setSearchService(SearchService searchService)
|
protected void |
writeContent(NodeRef nodeRef,
java.io.InputStream content,
java.lang.String mimetype,
java.lang.String encoding)
Write content to the node from InputStream. |
protected void |
writeContent(NodeRef nodeRef,
java.lang.String content)
Write the content to the node |
protected void |
writeContent(NodeRef nodeRef,
java.lang.String content,
java.lang.String mimetype)
Write the string as content to the node. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.alfresco.email.server.handler.EmailMessageHandler |
---|
processMessage |
Constructor Detail |
---|
public AbstractEmailMessageHandler()
Method Detail |
---|
protected ContentService getContentService()
public void setContentService(ContentService contentService)
contentService
- Alfresco Content Service.protected DictionaryService getDictionaryService()
public void setDictionaryService(DictionaryService dictionaryService)
dictionaryService
- Alfresco dictionary serviceprotected NodeService getNodeService()
public void setNodeService(NodeService nodeService)
nodeService
- Alfresco Node Service.public void setSearchService(SearchService searchService)
searchService
- Alfresco Search Service.protected MimetypeService getMimetypeService()
public void setMimetypeService(MimetypeService mimetypeService)
mimetypeService
- the the service to determine mimetype and encodingprotected NodeRef getTargetNode(java.lang.String to) throws com.sun.star.auth.InvalidArgumentException
to
- Email address which user part specifies node-dbid
com.sun.star.auth.InvalidArgumentException
- The exception is thrown if input string has incorrect format or empty.protected void writeContent(NodeRef nodeRef, java.lang.String content)
nodeRef
- Target nodecontent
- Contentprotected void writeContent(NodeRef nodeRef, java.lang.String content, java.lang.String mimetype)
nodeRef
- Target node.content
- Text for writting.mimetype
- MIME content type. For exaple you can set this parameter to "text/html" or "text/xml", etc.protected void writeContent(NodeRef nodeRef, java.io.InputStream content, java.lang.String mimetype, java.lang.String encoding)
nodeRef
- Target node.content
- Content stream.mimetype
- MIME content type.encoding
- Encoding. Can be null for non text based content.protected void addEmailedAspect(NodeRef nodeRef, EmailMessage message)
nodeService
- Alfresco Node Service.nodeRef
- Target node.mailParser
- Mail message that will be used for extracting necessary informationprotected NodeRef addContentNode(NodeService nodeService, NodeRef parent, java.lang.String name, QName assocType)
nodeService
- Alfresco Node Serviceparent
- Parent nodename
- Name of the new nodeassocType
- Association type that should be set between parent node and the new one.
protected NodeRef addContentNode(NodeService nodeService, NodeRef parent, java.lang.String name)
nodeService
- Alfresco Node Serviceparent
- Parent nodename
- Name of the new node
protected NodeRef addAttachment(NodeService nodeService, NodeRef folder, NodeRef mainContentNode, java.lang.String fileName)
nodeService
- Alfresco Node Service.folder
- Space/Folder to add.mainContentNode
- Main content node. Any mail is added into Alfresco as one main content node and several its attachments. Each attachment related with its main node.fileName
- File name for the attachment.
protected void addAttachments(NodeRef spaceNodeRef, NodeRef nodeRef, EmailMessage message)
spaceNodeRef
- the space to add the documents intonodeRef
- the node to which the documents will be attachedmessage
- the email message
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |