org.apache.ode.bpel.compiler.v2
Class BpelCompiler20

java.lang.Object
  extended by org.apache.ode.bpel.compiler.v2.BaseCompiler
      extended by org.apache.ode.bpel.compiler.v2.BpelCompiler20
All Implemented Interfaces:
BpelCompiler, CompilerContext

public class BpelCompiler20
extends BaseCompiler

OASIS BPEL V2.0 Compiler


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.ode.bpel.compiler.BpelCompiler
BpelCompiler.Version
 
Field Summary
protected static org.apache.commons.logging.Log __log
          Class-severity logger.
static java.lang.String OASIS_EXPLANG_XPATH_1_0
           
static java.lang.String OASIS_EXPLANG_XPATH_2_0
           
static java.lang.String OASIS_EXPLANG_XQUERY_1_0
           
 
Fields inherited from class org.apache.ode.bpel.compiler.v2.BaseCompiler
_oprocess
 
Constructor Summary
BpelCompiler20()
           
 
Method Summary
 void addWsdlImport(java.net.URI from, java.net.URI wsdlImport, SourceLocation sloc)
           
 void addXsdImport(java.net.URI from, java.net.URI location, SourceLocation sloc)
           
 OActivity compile(Activity source)
           
 void compile(OActivity context, BpelObject source, java.lang.Runnable run)
           
 OProcess compile(Process process, ResourceFinder rf)
          Compile a process.
 OExpression compileExpr(Expression expression)
           
 OExpression compileExpr(java.lang.String expr, NSContext nc)
          BPEL 1.1 legacy.
 OExpression compileJoinCondition(Expression expression)
           
 OLValueExpression compileLValueExpr(Expression expression)
           
 OScope compileSLC(ScopeLikeActivity source, OScope.Variable[] variables)
           
 OXslSheet compileXslt(java.lang.String docStrUri)
           
 OExpression constantExpr(boolean value)
          Produce a boolean OExpression expression that returns a constant value.
 java.util.List<OScope.Variable> getAccessibleVariables()
           
 java.util.List<OActivity> getActivityStack()
           
 java.net.URI getBaseResourceURI()
          Retrieves the base URI that the BPEL Process execution context is running relative to.
protected  java.lang.String getBpwsNamespace()
           
 CompileListener getCompileListener()
           
 OActivity getCurrent()
           
protected  java.lang.String getDefaultExpressionLanguage()
           
 ExtensionValidator getExtensionValidator(javax.xml.namespace.QName extensionElementName)
           
 OProcess getOProcess()
           
 Process getProcessDef()
          Get the process definition.
 java.util.Map<java.net.URI,javax.xml.transform.Source> getSchemaSources()
           
 java.lang.String getSourceLocation()
           
 javax.wsdl.Definition[] getWsdlDefinitions()
           
 boolean isExtensionDeclared(java.lang.String namespace)
           
 boolean isPartnerLinkAssigned(java.lang.String plink)
           
 void recoveredFromError(SourceLocation where, CompilationException bce)
           
protected  void registerActivityCompiler(java.lang.Class defClass, ActivityGenerator generator)
           
protected  void registerExpressionLanguage(java.lang.String expLangUri, ExpressionCompiler expressionCompiler)
           
protected  void registerExpressionLanguage(java.lang.String expLangUri, java.lang.String classname)
           
 OScope resolveCompensatableScope(java.lang.String scopeToCompensate)
           
 OScope.CorrelationSet resolveCorrelationSet(java.lang.String csetName)
           
 OMessageVarType.Part resolveHeaderPart(OScope.Variable var, java.lang.String partname)
           
 OLink resolveLink(java.lang.String linkName)
           
 OMessageVarType resolveMessageType(javax.xml.namespace.QName messageType)
           
 OScope.Variable resolveMessageVariable(java.lang.String inputVar)
           
 OScope.Variable resolveMessageVariable(java.lang.String inputVar, javax.xml.namespace.QName messageType)
           
 javax.wsdl.Operation resolveMyRoleOperation(OPartnerLink partnerLink, java.lang.String operationName)
           
 OMessageVarType.Part resolvePart(OScope.Variable var, java.lang.String partname)
           
 OPartnerLink resolvePartnerLink(java.lang.String name)
           
 PartnerLinkType resolvePartnerLinkType(javax.xml.namespace.QName partnerLinkType)
           
 javax.wsdl.Operation resolvePartnerRoleOperation(OPartnerLink partnerLink, java.lang.String operationName)
           
 javax.wsdl.PortType resolvePortType(javax.xml.namespace.QName portTypeName)
           
 OProcess.OProperty resolveProperty(javax.xml.namespace.QName name)
           
 OProcess.OPropertyAlias resolvePropertyAlias(OScope.Variable variable, javax.xml.namespace.QName propertyName)
           
 OScope.Variable resolveVariable(java.lang.String varName)
           
 OXsdTypeVarType resolveXsdType(javax.xml.namespace.QName typeName)
           
 void setCompileListener(CompileListener compileListener)
           
 void setCustomProperties(java.util.Map<javax.xml.namespace.QName,org.w3c.dom.Node> customProperties)
           
 void setExtensionValidators(java.util.Map<javax.xml.namespace.QName,ExtensionValidator> extensionValidators)
           
 void setResourceFinder(ResourceFinder finder)
           
 
Methods inherited from class org.apache.ode.bpel.compiler.v2.BaseCompiler
getOdeNamespace, makeConstants
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OASIS_EXPLANG_XPATH_1_0

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

OASIS_EXPLANG_XPATH_2_0

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

OASIS_EXPLANG_XQUERY_1_0

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

__log

protected static final org.apache.commons.logging.Log __log
Class-severity logger.

Constructor Detail

BpelCompiler20

public BpelCompiler20()
Method Detail

getBpwsNamespace

protected java.lang.String getBpwsNamespace()
Specified by:
getBpwsNamespace in class BaseCompiler

getDefaultExpressionLanguage

protected java.lang.String getDefaultExpressionLanguage()

addWsdlImport

public void addWsdlImport(java.net.URI from,
                          java.net.URI wsdlImport,
                          SourceLocation sloc)
Specified by:
addWsdlImport in interface BpelCompiler

addXsdImport

public void addXsdImport(java.net.URI from,
                         java.net.URI location,
                         SourceLocation sloc)

setResourceFinder

public void setResourceFinder(ResourceFinder finder)
Specified by:
setResourceFinder in interface BpelCompiler

setCompileListener

public void setCompileListener(CompileListener compileListener)
Specified by:
setCompileListener in interface BpelCompiler

getCompileListener

public CompileListener getCompileListener()

setCustomProperties

public void setCustomProperties(java.util.Map<javax.xml.namespace.QName,org.w3c.dom.Node> customProperties)
Specified by:
setCustomProperties in interface BpelCompiler

getProcessDef

public Process getProcessDef()
Get the process definition.

Returns:
the process definition

resolvePortType

public javax.wsdl.PortType resolvePortType(javax.xml.namespace.QName portTypeName)

resolveLink

public OLink resolveLink(java.lang.String linkName)
Specified by:
resolveLink in interface CompilerContext

resolveVariable

public OScope.Variable resolveVariable(java.lang.String varName)
Specified by:
resolveVariable in interface CompilerContext

getAccessibleVariables

public java.util.List<OScope.Variable> getAccessibleVariables()
Specified by:
getAccessibleVariables in interface CompilerContext

resolveMessageVariable

public OScope.Variable resolveMessageVariable(java.lang.String inputVar)
                                       throws CompilationException
Specified by:
resolveMessageVariable in interface CompilerContext
Throws:
CompilationException

resolveMessageVariable

public OScope.Variable resolveMessageVariable(java.lang.String inputVar,
                                              javax.xml.namespace.QName messageType)
                                       throws CompilationException
Specified by:
resolveMessageVariable in interface CompilerContext
Throws:
CompilationException

resolveProperty

public OProcess.OProperty resolveProperty(javax.xml.namespace.QName name)
Specified by:
resolveProperty in interface CompilerContext

resolvePropertyAlias

public OProcess.OPropertyAlias resolvePropertyAlias(OScope.Variable variable,
                                                    javax.xml.namespace.QName propertyName)
Specified by:
resolvePropertyAlias in interface CompilerContext

resolveCompensatableScope

public OScope resolveCompensatableScope(java.lang.String scopeToCompensate)
                                 throws CompilationException
Specified by:
resolveCompensatableScope in interface CompilerContext
Throws:
CompilationException

getSourceLocation

public java.lang.String getSourceLocation()
Specified by:
getSourceLocation in interface CompilerContext

resolveCorrelationSet

public OScope.CorrelationSet resolveCorrelationSet(java.lang.String csetName)
Specified by:
resolveCorrelationSet in interface CompilerContext

resolveMessageType

public OMessageVarType resolveMessageType(javax.xml.namespace.QName messageType)

resolveXsdType

public OXsdTypeVarType resolveXsdType(javax.xml.namespace.QName typeName)
                               throws CompilationException
Specified by:
resolveXsdType in interface CompilerContext
Throws:
CompilationException

resolvePart

public OMessageVarType.Part resolvePart(OScope.Variable var,
                                        java.lang.String partname)
Specified by:
resolvePart in interface CompilerContext

resolveHeaderPart

public OMessageVarType.Part resolveHeaderPart(OScope.Variable var,
                                              java.lang.String partname)
Specified by:
resolveHeaderPart in interface CompilerContext

resolvePartnerLinkType

public PartnerLinkType resolvePartnerLinkType(javax.xml.namespace.QName partnerLinkType)

resolvePartnerLink

public OPartnerLink resolvePartnerLink(java.lang.String name)
Specified by:
resolvePartnerLink in interface CompilerContext

resolvePartnerRoleOperation

public javax.wsdl.Operation resolvePartnerRoleOperation(OPartnerLink partnerLink,
                                                        java.lang.String operationName)
Specified by:
resolvePartnerRoleOperation in interface CompilerContext

resolveMyRoleOperation

public javax.wsdl.Operation resolveMyRoleOperation(OPartnerLink partnerLink,
                                                   java.lang.String operationName)
Specified by:
resolveMyRoleOperation in interface CompilerContext

constantExpr

public OExpression constantExpr(boolean value)
Produce a boolean OExpression expression that returns a constant value.

Specified by:
constantExpr in interface CompilerContext
Parameters:
value - constant value to return
Returns:
OExpression returning a constant value.

compileLValueExpr

public OLValueExpression compileLValueExpr(Expression expression)
                                    throws CompilationException
Specified by:
compileLValueExpr in interface CompilerContext
Throws:
CompilationException

compileJoinCondition

public OExpression compileJoinCondition(Expression expression)
                                 throws CompilationException
Specified by:
compileJoinCondition in interface CompilerContext
Throws:
CompilationException

compileExpr

public OExpression compileExpr(Expression expression)
                        throws CompilationException
Specified by:
compileExpr in interface CompilerContext
Throws:
CompilationException

compileExpr

public OExpression compileExpr(java.lang.String expr,
                               NSContext nc)
Description copied from interface: CompilerContext
BPEL 1.1 legacy.

Specified by:
compileExpr in interface CompilerContext
Returns:

getOProcess

public OProcess getOProcess()
                     throws CompilationException
Specified by:
getOProcess in interface CompilerContext
Throws:
CompilationException

recoveredFromError

public void recoveredFromError(SourceLocation where,
                               CompilationException bce)
                        throws CompilationException
Specified by:
recoveredFromError in interface CompilerContext
Throws:
CompilationException

compile

public OProcess compile(Process process,
                        ResourceFinder rf)
                 throws CompilationException
Compile a process.

Specified by:
compile in interface BpelCompiler
Throws:
CompilationException

compile

public OActivity compile(Activity source)
Specified by:
compile in interface CompilerContext

compileSLC

public OScope compileSLC(ScopeLikeActivity source,
                         OScope.Variable[] variables)
Specified by:
compileSLC in interface CompilerContext

getCurrent

public OActivity getCurrent()
Specified by:
getCurrent in interface CompilerContext

compile

public void compile(OActivity context,
                    BpelObject source,
                    java.lang.Runnable run)

compileXslt

public OXslSheet compileXslt(java.lang.String docStrUri)
                      throws CompilationException
Specified by:
compileXslt in interface CompilerContext
Throws:
CompilationException

isPartnerLinkAssigned

public boolean isPartnerLinkAssigned(java.lang.String plink)
Specified by:
isPartnerLinkAssigned in interface CompilerContext

getWsdlDefinitions

public javax.wsdl.Definition[] getWsdlDefinitions()

registerActivityCompiler

protected void registerActivityCompiler(java.lang.Class defClass,
                                        ActivityGenerator generator)

registerExpressionLanguage

protected void registerExpressionLanguage(java.lang.String expLangUri,
                                          ExpressionCompiler expressionCompiler)

registerExpressionLanguage

protected void registerExpressionLanguage(java.lang.String expLangUri,
                                          java.lang.String classname)

setExtensionValidators

public void setExtensionValidators(java.util.Map<javax.xml.namespace.QName,ExtensionValidator> extensionValidators)
Specified by:
setExtensionValidators in interface BpelCompiler

isExtensionDeclared

public boolean isExtensionDeclared(java.lang.String namespace)
Specified by:
isExtensionDeclared in interface CompilerContext

getExtensionValidator

public ExtensionValidator getExtensionValidator(javax.xml.namespace.QName extensionElementName)
Specified by:
getExtensionValidator in interface CompilerContext

getActivityStack

public java.util.List<OActivity> getActivityStack()
Specified by:
getActivityStack in interface CompilerContext

getSchemaSources

public java.util.Map<java.net.URI,javax.xml.transform.Source> getSchemaSources()
Specified by:
getSchemaSources in interface CompilerContext

getBaseResourceURI

public java.net.URI getBaseResourceURI()
Retrieves the base URI that the BPEL Process execution context is running relative to.

Specified by:
getBaseResourceURI in interface BpelCompiler
Specified by:
getBaseResourceURI in interface CompilerContext
Returns:
URI - the URI representing the absolute physical file path location that this process is defined within.