Class FileData


  • public class FileData
    extends Object
    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
    Author:
    rsoika
    See Also:
    addFile
    • Method Detail

      • getName

        public String getName()
      • setName

        public void setName​(String name)
      • getContent

        public byte[] getContent()
      • setContent

        public void setContent​(byte[] content)
      • getContentType

        public String getContentType()
      • setContentType

        public void setContentType​(String contentType)
      • getAttribute

        public Object getAttribute​(String name)
        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().
        Parameters:
        name - a String specifying the name of the custom attribute
      • setAttribute

        public void setAttribute​(String name,
                                 List<Object> values)
        Set a custom attribute value.
        Parameters:
        name - a String specifying the name of the custom attribute
        values - an Object containing the value of the attribute