org.apache.ode.bpel.compiler
Class BpelC

java.lang.Object
  extended by org.apache.ode.bpel.compiler.BpelC

public class BpelC
extends java.lang.Object

Wrapper for BpelCompiler implementations, providing basic utility methods and auto-detection of BPEL version.

s


Field Summary
 java.io.OutputStream _outputStream
           
static java.lang.String PROCESS_CUSTOM_PROPERTIES
           
 
Method Summary
 void compile(java.io.File bpelFile)
           Compile a BPEL process from a file.
 void compile(Process process, java.lang.String outputPath)
           Compile a BPEL process from a BOM Process object.
protected  void finalize()
           
static BpelC newBpelCompiler()
           
 void setBaseDirectory(java.io.File baseDir)
           
 void setCompileListener(CompileListener cl)
           Set a non-default target CompileListener implementation.
 void setCompileProperties(java.util.Map<java.lang.String,java.lang.Object> compileProperties)
          Compilation properties eventually retrieved by the compiler
 void setDryRun(boolean dryRun)
          Configures the compiler to run a dry compilation, doesn't generate the produced compiled process.
 void setOutputStream(java.io.OutputStream os)
          Set the output stream to which the compiled representation will be generated.
 void setProcessWSDL(java.net.URI wsdl)
          Register a "global" WSDL import for compilation.
 void setResourceFinder(ResourceFinder finder)
           Tell the compiler how to locate WSDL imports for a BPEL process.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROCESS_CUSTOM_PROPERTIES

public static final java.lang.String PROCESS_CUSTOM_PROPERTIES
See Also:
Constant Field Values

_outputStream

public java.io.OutputStream _outputStream
Method Detail

newBpelCompiler

public static BpelC newBpelCompiler()

finalize

protected void finalize()
                 throws java.lang.Throwable
Overrides:
finalize in class java.lang.Object
Throws:
java.lang.Throwable

setCompileListener

public void setCompileListener(CompileListener cl)

Set a non-default target CompileListener implementation.

Parameters:
cl - the listener.

setDryRun

public void setDryRun(boolean dryRun)
Configures the compiler to run a dry compilation, doesn't generate the produced compiled process.

Parameters:
dryRun -

setResourceFinder

public void setResourceFinder(ResourceFinder finder)

Tell the compiler how to locate WSDL imports for a BPEL process. Setting this to null will cause the default behavior.

Parameters:
finder - the ResourceFinder implementation to use.

setProcessWSDL

public void setProcessWSDL(java.net.URI wsdl)
Register a "global" WSDL import for compilation. This is used to specify WSDL imports for BPEL 1.1 processes that do not support the <import> BPEL construct.

Parameters:
wsdl - the WSDL URI (resolvable against the resource repository)

setCompileProperties

public void setCompileProperties(java.util.Map<java.lang.String,java.lang.Object> compileProperties)
Compilation properties eventually retrieved by the compiler

Parameters:
compileProperties -

setOutputStream

public void setOutputStream(java.io.OutputStream os)
Set the output stream to which the compiled representation will be generated.

Parameters:
os - compiled representation output stream

setBaseDirectory

public void setBaseDirectory(java.io.File baseDir)

compile

public void compile(Process process,
                    java.lang.String outputPath)
             throws CompilationException,
                    java.io.IOException

Compile a BPEL process from a BOM Process object.

Parameters:
process - the BOM Process to compile.
Throws:
java.io.IOException - if one occurs while processing (e.g., getting imports) or writing output.
CompilationException - if one occurs while compiling.

compile

public void compile(java.io.File bpelFile)
             throws CompilationException,
                    java.io.IOException

Compile a BPEL process from a file. This method uses a BpelObjectFactory to parse the XML and then calls compile(Process,String).

Parameters:
bpelFile - the file of the BPEL process to be compiled.
Throws:
java.io.IOException - if one occurs while reading the BPEL process or writing the output.
CompilationException - if one occurs while compiling the process.