public class Attachment extends Resource
Each document may contain zero or more attachments. Attachments can be of any MIME type - text, image, binary data. These are stored externally in Azure Blob storage. Attachments are automatically deleted when the parent document is deleted.
Constructor and Description |
---|
Attachment()
Initialize an attachment object.
|
Attachment(org.json.JSONObject jsonObject)
Initialize an attachment object from json object.
|
Attachment(String source)
Initialize an attachment object from json string.
|
Modifier and Type | Method and Description |
---|---|
String |
getContentType()
Gets the MIME content type of the attachment.
|
String |
getMediaLink()
Gets the media link associated with the attachment content.
|
void |
setContentType(String contentType)
Sets the MIME content type of the attachment.
|
void |
setMediaLink(String mediaLink)
Sets the media link associated with the attachment content.
|
getETag, getId, getResourceId, getSelfLink, getTimestamp, setId, setResourceId
get, getBoolean, getCollection, getCollection, getDouble, getHashMap, getInt, getLogger, getLong, getMapper, getObject, getObject, getObjectByPath, getString, has, remove, set, toJson, toJson, toObject, toString
public Attachment()
public Attachment(String source)
source
- the json string representation of the Attachment.public Attachment(org.json.JSONObject jsonObject)
jsonObject
- the json object representation of the Attachment.public String getContentType()
public void setContentType(String contentType)
contentType
- the content type to use.public String getMediaLink()
public void setMediaLink(String mediaLink)
mediaLink
- the media link to use.Copyright © 2018. All rights reserved.