com.dtolabs.client.services
Class JobDefinitionSerializer

java.lang.Object
  extended by com.dtolabs.client.services.JobDefinitionSerializer

public class JobDefinitionSerializer
extends java.lang.Object

JobDefinitionSerializer utility converts execution contexts to jobs.xml formatted XML.


Constructor Summary
JobDefinitionSerializer()
           
 
Method Summary
static org.dom4j.Document serialize(IDispatchedScript dispatchdef)
          Serialize a script dispatch into jobs.xml format
static void serializeToFile(IDispatchedScript script, java.io.File file)
          Convert the input script context to a Jobs.xml document and serialize it to the given file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JobDefinitionSerializer

public JobDefinitionSerializer()
Method Detail

serialize

public static org.dom4j.Document serialize(IDispatchedScript dispatchdef)
                                    throws java.io.IOException
Serialize a script dispatch into jobs.xml format

Parameters:
dispatchdef - the script dispatch descriptor
Returns:
the XML Document
Throws:
java.io.IOException - if the input IDispatchedScript throws it when accessing script stream input.

serializeToFile

public static void serializeToFile(IDispatchedScript script,
                                   java.io.File file)
                            throws java.io.IOException
Convert the input script context to a Jobs.xml document and serialize it to the given file.

Parameters:
script - the input dispatch script
file - destination file
Throws:
java.io.IOException - if an error occurs