org.jbpm.document.marshalling
Class DocumentMarshallingStrategy
java.lang.Object
org.jbpm.document.marshalling.AbstractDocumentMarshallingStrategy
org.jbpm.document.marshalling.DocumentMarshallingStrategy
- All Implemented Interfaces:
- org.kie.api.marshalling.ObjectMarshallingStrategy
public class DocumentMarshallingStrategy
- extends AbstractDocumentMarshallingStrategy
| Nested classes/interfaces inherited from interface org.kie.api.marshalling.ObjectMarshallingStrategy |
org.kie.api.marshalling.ObjectMarshallingStrategy.Context |
|
Method Summary |
Document |
buildDocument(String name,
long size,
Date lastModified,
Map<String,String> params)
Creates a valid Document instance with the data received. |
org.kie.api.marshalling.ObjectMarshallingStrategy.Context |
createContext()
|
byte[] |
marshal(org.kie.api.marshalling.ObjectMarshallingStrategy.Context context,
ObjectOutputStream objectOutputStream,
Object o)
|
Object |
read(ObjectInputStream os)
|
Object |
unmarshal(org.kie.api.marshalling.ObjectMarshallingStrategy.Context context,
ObjectInputStream objectInputStream,
byte[] object,
ClassLoader classLoader)
|
void |
write(ObjectOutputStream os,
Object object)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DocumentMarshallingStrategy
public DocumentMarshallingStrategy()
buildDocument
public Document buildDocument(String name,
long size,
Date lastModified,
Map<String,String> params)
- Description copied from class:
AbstractDocumentMarshallingStrategy
- 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.
- Specified by:
buildDocument in class AbstractDocumentMarshallingStrategy
- 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.
write
public void write(ObjectOutputStream os,
Object object)
throws IOException
- Throws:
IOException
read
public Object read(ObjectInputStream os)
throws IOException,
ClassNotFoundException
- Throws:
IOException
ClassNotFoundException
marshal
public byte[] marshal(org.kie.api.marshalling.ObjectMarshallingStrategy.Context context,
ObjectOutputStream objectOutputStream,
Object o)
throws IOException
- Throws:
IOException
unmarshal
public Object unmarshal(org.kie.api.marshalling.ObjectMarshallingStrategy.Context context,
ObjectInputStream objectInputStream,
byte[] object,
ClassLoader classLoader)
throws IOException,
ClassNotFoundException
- Throws:
IOException
ClassNotFoundException
createContext
public org.kie.api.marshalling.ObjectMarshallingStrategy.Context createContext()
Copyright © 2001-2015 JBoss by Red Hat. All Rights Reserved.