SMILA 1.0 API documentation

org.eclipse.smila.http.client.attachments
Class RecordAttachments

java.lang.Object
  extended by org.eclipse.smila.http.client.attachments.RecordAttachments
All Implemented Interfaces:
Attachments

public class RecordAttachments
extends java.lang.Object
implements Attachments

Use this class to provide attachments from a Record to the RestClient for a POST request.

Since:
1.1.0

Field Summary
 
Fields inherited from interface org.eclipse.smila.http.client.Attachments
MIMETYPE_ATTACHMENT
 
Constructor Summary
RecordAttachments(Record record)
          Create instance from a Record.
 
Method Summary
 java.util.Map<java.lang.String,ContentBody> getAttachmentParts()
          Get attachments parts to add to a multipart request.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RecordAttachments

public RecordAttachments(Record record)
Create instance from a Record.

Parameters:
record - record with attachments.
Throws:
AttachmentException - if the attachment content cannot be accessed.
Method Detail

getAttachmentParts

public java.util.Map<java.lang.String,ContentBody> getAttachmentParts()
Description copied from interface: Attachments
Get attachments parts to add to a multipart request. The keys of the returned map are the attachment names. The values can wrap different kinds of attachment objects, for example simple byte{] objects or java.io.InputStreams.

Specified by:
getAttachmentParts in interface Attachments
Returns:
map of attachment names and values.

SMILA 1.0 API documentation