Package org.imixs.workflow
Klasse FileData
java.lang.Object
org.imixs.workflow.FileData
Helper class to abstract the file content stored in a ItemCollection.
A FileData object contains at least the attributes 'name', 'content' and
'contentType'. The optional object custom attributes can be added. It
represents a Map<String, List<Object>>
- Version:
- 2.0
- Autor:
- rsoika
- Siehe auch:
-
Feldübersicht
Felder -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungGenerates a MD5 from a current file contentgetAttribute(String name) Returns the value of the named custom attribute as an Object, or null if no attribute of the given name exists.byte[]getName()voidsetAttribute(String name, List<Object> values) Set a custom attribute value.voidsetAttributes(Map<String, List<Object>> attributes) voidsetContent(byte[] content) voidsetContentType(String contentType) voidbooleanvalidateMD5(String checksum) Validates a given MD5 checksum
-
Felddetails
-
DEFAULT_CONTENT_TYPE
- Siehe auch:
-
-
Konstruktordetails
-
FileData
-
-
Methodendetails
-
getName
-
setName
-
getContent
public byte[] getContent() -
setContent
public void setContent(byte[] content) -
getContentType
-
setContentType
-
getAttributes
-
setAttributes
-
getAttribute
Returns the value of the named custom attribute as an Object, or null if no attribute of the given name exists. A custom attribute can be set by the method setAttribute().- Parameter:
name- a String specifying the name of the custom attribute
-
setAttribute
Set a custom attribute value.- Parameter:
name- a String specifying the name of the custom attributevalues- an Object containing the value of the attribute
-
generateMD5
Generates a MD5 from a current file content- Gibt zurück:
- md5 string
- Löst aus:
NoSuchAlgorithmException- - invalid algorithm
-
validateMD5
Validates a given MD5 checksum- Parameter:
checksum- - checksum to validate- Gibt zurück:
- true if equal
- Löst aus:
NoSuchAlgorithmException- - invalid algorithm
-