Search in sources :

Example 16 with MappableException

use of com.dexels.navajo.script.api.MappableException in project navajo by Dexels.

the class ResourceMailAdapter method store.

@Override
public void store() throws MappableException, UserException {
    MailResource resource = MailResourceFactory.getInstance().getMailResource(resourceName);
    if (resource == null) {
        throw new MappableException("Missing mail resource with name: " + resourceName);
    }
    String body = this.text;
    if (this.xslFile != null && !"".equals(xslFile)) {
        try {
            body = parseWithXslStyle(xslFile);
        } catch (Throwable e) {
            throw new MappableException("Error parsing using XSL file", e);
        }
    }
    List<AttachmentMapInterface> attach = new ArrayList<AttachmentMapInterface>(attachments);
    resource.send(sender, this.recipientArray, this.ccArray, this.bccArray, this.subject, body, attach, contentType, relatedMultipart);
}
Also used : MappableException(com.dexels.navajo.script.api.MappableException) ArrayList(java.util.ArrayList) AttachmentMapInterface(com.dexels.navajo.adapter.mailmap.AttachmentMapInterface)

Aggregations

MappableException (com.dexels.navajo.script.api.MappableException)16 UserException (com.dexels.navajo.script.api.UserException)10 Message (com.dexels.navajo.document.Message)8 NavajoException (com.dexels.navajo.document.NavajoException)5 IOException (java.io.IOException)5 Property (com.dexels.navajo.document.Property)4 Navajo (com.dexels.navajo.document.Navajo)2 File (java.io.File)2 FileInputStream (java.io.FileInputStream)2 ArrayList (java.util.ArrayList)2 FileLineMap (com.dexels.navajo.adapter.filemap.FileLineMap)1 AttachmentMapInterface (com.dexels.navajo.adapter.mailmap.AttachmentMapInterface)1 ConnectionBrokerManager (com.dexels.navajo.adapter.sqlmap.ConnectionBrokerManager)1 RecordMap (com.dexels.navajo.adapter.sqlmap.RecordMap)1 ResultSetMap (com.dexels.navajo.adapter.sqlmap.ResultSetMap)1 SQLMapDatasourceMap (com.dexels.navajo.adapter.sqlmap.SQLMapDatasourceMap)1 ClientInterface (com.dexels.navajo.client.ClientInterface)1 Selection (com.dexels.navajo.document.Selection)1 Binary (com.dexels.navajo.document.types.Binary)1 ElasticSearchResult (com.dexels.navajo.elasticsearch.impl.ElasticSearchResult)1