Source code: org/jbpm/workflow/delegation/Serializer.java
1 package org.jbpm.workflow.delegation;
2
3 /**
4 * performs (de)serialisation of {@link org.jbpm.workflow.execution.AttributeInstance}-values (which are ordinary java-objects), for storage in the database.
5 * It is even possible to use a process specific java-type as {@link org.jbpm.workflow.execution.AttributeInstance}-value.
6 * @author Tom Baeyens
7 */
8 public interface Serializer extends Configurable {
9
10 /**
11 * serializes the value of an {@link org.jbpm.workflow.execution.AttributeInstance}
12 * to store it in the database.
13 * @param object is the java-object that represents the value for the {@link org.jbpm.workflow.execution.AttributeInstance}
14 * @throws IllegalArgumentException if object is not serializable by this serializer
15 */
16 String serialize( Object object );
17
18 /**
19 * serializes the value of an {@link org.jbpm.workflow.execution.AttributeInstance}
20 * to store it in the database.
21 * @param the text, previously generated by the serialize-method and stored in the database.
22 * @return the java-object that represents the value for the {@link org.jbpm.workflow.execution.AttributeInstance}
23 * @return IllegalArgumentException if object is not deserializable by this serializer
24 */
25 Object deserialize( String text );
26 }