jBPM :: Document Service 6.2.1-SNAPSHOT

org.jbpm.document.marshalling
Class AbstractDocumentMarshallingStrategy

java.lang.Object
  extended by org.jbpm.document.marshalling.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.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.kie.api.marshalling.ObjectMarshallingStrategy
org.kie.api.marshalling.ObjectMarshallingStrategy.Context
 
Constructor Summary
AbstractDocumentMarshallingStrategy()
           
 
Method Summary
 boolean accept(Object o)
           
abstract  Document buildDocument(String name, long size, Date lastModified, Map<String,String> params)
          Creates a valid Document instance with the data received.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.kie.api.marshalling.ObjectMarshallingStrategy
createContext, marshal, read, unmarshal, write
 

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

jBPM :: Document Service 6.2.1-SNAPSHOT

Copyright © 2001-2015 JBoss by Red Hat. All Rights Reserved.