public class DocumentValue extends Object implements Serializable
Constructor and Description |
---|
DocumentValue(byte[] content,
String mimeType,
String fileName)
Represent the value of a document.
|
DocumentValue(long documentId)
Represent an existing document that did not changed.
|
DocumentValue(long documentId,
byte[] content,
String mimeType,
String fileName)
Represent an existing document that changed with the content and metadata in parameters.
|
DocumentValue(long documentId,
String url)
Represent an existing document that changed to an external document.
|
DocumentValue(String url)
Represent the value of an external document, only the url is given
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
byte[] |
getContent() |
Long |
getDocumentId()
Indicate which document will be updated
Used only when updating list of document |
String |
getFileName() |
int |
getIndex() |
String |
getMimeType() |
String |
getUrl() |
boolean |
hasChanged()
If the document value updates an existing document, this getter tels us if the content is modified and should be
updated
|
boolean |
hasContent() |
int |
hashCode() |
void |
setContent(byte[] content) |
void |
setDocumentId(Long documentId) |
void |
setFileName(String fileName) |
void |
setHasChanged(boolean hasChanged) |
void |
setHasContent(boolean hasContent) |
DocumentValue |
setIndex(int index)
Index of were to put the document inside the list.
|
void |
setMimeType(String mimeType) |
void |
setUrl(String url) |
String |
toString() |
public DocumentValue(byte[] content, String mimeType, String fileName)
content
- content of the documentmimeType
- mime type of the documentfileName
- file name of the documentIllegalArgumentException
- if the content or the fileName is null or emptypublic DocumentValue(String url)
url
- url of the documentpublic DocumentValue(long documentId)
documentId
- the id of the existing document (mapping)public DocumentValue(long documentId, byte[] content, String mimeType, String fileName)
documentId
- the id of the existing document (mapping)content
- content of the documentmimeType
- mime type of the documentfileName
- file name of the documentIllegalArgumentException
- if the content or the fileName is null or emptypublic DocumentValue(long documentId, String url)
documentId
- the id of the existing document (mapping)public byte[] getContent()
public String getMimeType()
public String getFileName()
public String getUrl()
public boolean hasContent()
public void setContent(byte[] content)
public void setMimeType(String mimeType)
public void setFileName(String fileName)
public void setUrl(String url)
public void setHasContent(boolean hasContent)
public Long getDocumentId()
public void setDocumentId(Long documentId)
public boolean hasChanged()
public void setHasChanged(boolean hasChanged)
public int getIndex()
public DocumentValue setIndex(int index)
index
- index in the listCopyright © 2020 Bonitasoft S.A. All rights reserved.