Class AbstractDocumentMarshallingStrategy

  • All Implemented Interfaces:
    org.kie.api.marshalling.ObjectMarshallingStrategy
    Direct Known Subclasses:
    DocumentMarshallingStrategy

    public abstract class AbstractDocumentMarshallingStrategy
    extends Object
    implements org.kie.api.marshalling.ObjectMarshallingStrategy
    Marshalling strategy definition to Marshal Document.
    • Constructor Detail

      • AbstractDocumentMarshallingStrategy

        public AbstractDocumentMarshallingStrategy()
    • Method Detail

      • buildDocument

        public abstract Document buildDocument​(String name,
                                               long size,
                                               Date lastModified,
                                               Map<String,​String> params)
        Creates a valid Document instance with the data received. This method is called when a document is uploaded to create the Document instance before marshalling the document content.
        Parameters:
        name - The document name.
        size - The size of the document content.
        lastModified - The last modified date of the document.
        params - A Map that contain params for the document creation.
        Returns:
        A Document instance containing all the document info (including identifier and download link) except the Document content.
      • accept

        public boolean accept​(Object o)
        Specified by:
        accept in interface org.kie.api.marshalling.ObjectMarshallingStrategy