public class MimeHelper
extends java.lang.Object
Helper functions for conversion from/to MIME entries
| Constructor and Description | 
|---|
MimeHelper()
Default constructor 
 | 
MimeHelper(java.lang.String bodyfield)
Constructor that allows to define the body field 
 | 
| Modifier and Type | Method and Description | 
|---|---|
io.vertx.core.buffer.Buffer | 
docMime2Buffer(com.hcl.domino.DominoClient client,
              com.hcl.domino.data.Document doc,
              java.lang.String mimeType,
              int sibling)  | 
void | 
docMime2Html(com.hcl.domino.DominoClient client,
            com.hcl.domino.data.Document doc,
            int sibling,
            java.io.OutputStream out)  | 
io.vertx.core.json.JsonObject | 
docMime2Json(com.hcl.domino.DominoClient client,
            com.hcl.domino.data.Document doc,
            int sibling)  | 
void | 
docMime2Stream(com.hcl.domino.DominoClient client,
              com.hcl.domino.data.Document doc,
              java.lang.String mimeType,
              int sibling,
              java.io.OutputStream out)
Extracts a MIME part as Stream from a Document, since there might be multiple parts of the same type  
sibling can be specified, defaults to 0 - first found | 
java.lang.String | 
json2Mime(io.vertx.core.json.JsonObject source,
         java.util.Collection<java.lang.String> fields,
         java.lang.String creator,
         java.lang.String templateName)
Creates a MIME formatted message to store JSON and a pretty text representation 
 | 
void | 
mime2doc(KeepJnxSession session,
        com.hcl.domino.data.Document doc,
        java.lang.String message,
        java.util.List<java.lang.String> headerNames)
Writes MIME content out into a Note By nature of Mime, Mime only gets appended, so we need to clear fields and most important the Body before commencing 
 | 
io.vertx.core.buffer.Buffer | 
noteMime2Buffer(com.hcl.domino.DominoClient client,
               com.hcl.domino.data.Document doc,
               java.lang.String mimeType,
               int sibling)
Extracts a MIME part as buffer from a Document, since there might be multiple parts of the same type  
sibling can be specified, defaults to 0 - first found | 
io.vertx.core.json.JsonObject | 
noteMime2Json(com.hcl.domino.DominoClient client,
             com.hcl.domino.data.Document doc,
             int sibling)  | 
public MimeHelper()
Default constructor
public MimeHelper(java.lang.String bodyfield)
Constructor that allows to define the body field
bodyfield - Name of the field for the MimeBodypublic io.vertx.core.buffer.Buffer docMime2Buffer(com.hcl.domino.DominoClient client,
                                                  com.hcl.domino.data.Document doc,
                                                  java.lang.String mimeType,
                                                  int sibling)
client - doc - mimeType - sibling - public void docMime2Html(@Nonnull
                         com.hcl.domino.DominoClient client,
                         @Nonnull
                         com.hcl.domino.data.Document doc,
                         int sibling,
                         java.io.OutputStream out)
client - doc - sibling - which entry if there are more than one. default = 0out - public io.vertx.core.json.JsonObject docMime2Json(com.hcl.domino.DominoClient client,
                                                  com.hcl.domino.data.Document doc,
                                                  int sibling)
client - doc - sibling - public void docMime2Stream(@Nonnull
                           com.hcl.domino.DominoClient client,
                           @Nonnull
                           com.hcl.domino.data.Document doc,
                           @Nonnull
                           java.lang.String mimeType,
                           int sibling,
                           java.io.OutputStream out)
Extracts a MIME part as Stream from a Document, since there might be multiple parts of the same type sibling can be specified, defaults to 0 - first found
doc - Document to retrieve data frommimeType - the mime type to retrieve e.g. “application/json”sibling - what element to retrieve, default to 0out - public java.lang.String json2Mime(io.vertx.core.json.JsonObject source,
                                  java.util.Collection<java.lang.String> fields,
                                  java.lang.String creator,
                                  java.lang.String templateName)
Creates a MIME formatted message to store JSON and a pretty text representation
source - fields - creator - templateName - public void mime2doc(KeepJnxSession session, @Nonnull com.hcl.domino.data.Document doc, @Nonnull java.lang.String message, @Nonnull java.util.List<java.lang.String> headerNames) throws java.io.IOException
Writes MIME content out into a Note By nature of Mime, Mime only gets appended, so we need to clear fields and most important the Body before commencing
session - doc - message - headerNames - java.io.IOExceptionpublic io.vertx.core.buffer.Buffer noteMime2Buffer(@Nonnull
                                                   com.hcl.domino.DominoClient client,
                                                   @Nonnull
                                                   com.hcl.domino.data.Document doc,
                                                   @Nonnull
                                                   java.lang.String mimeType,
                                                   int sibling)
Extracts a MIME part as buffer from a Document, since there might be multiple parts of the same type sibling can be specified, defaults to 0 - first found
doc - Document to retrieve data frommimeType - the mime type to retrieve e.g. “application/json”sibling - what element to retrieve, default to 0public io.vertx.core.json.JsonObject noteMime2Json(@Nonnull
                                                   com.hcl.domino.DominoClient client,
                                                   @Nonnull
                                                   com.hcl.domino.data.Document doc,
                                                   int sibling)
doc - sibling - which entry if there are more than one. default = 0