org.apache.ode.bpel.compiler

## Class BpelCompiler

- java.lang.Object
- - org.apache.ode.bpel.compiler.BpelCompiler

- All Implemented Interfaces:
    CompilerContext
  Direct Known Subclasses:
    BpelCompiler11, BpelCompiler20, BpelCompiler20Draft

      public abstract class BpelCompiler
      extends java.lang.Object
      implements CompilerContext

  Compiler for converting BPEL process descriptions (and their associated WSDL and XSD documents) into compiled representations suitable for execution by the ODE BPEL Service Provider. TODO: Move process validation into this class.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected static org.apache.commons.logging.Log` | `__log` Class-severity logger.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `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, long version)` Compile a process.
    `OExpression` | `compileExpr(Expression expression)`
    `OExpression` | `compileExpr(Expression expression, OVarType rootNodeType, java.lang.Object requestedResultType, java.lang.Object[] resultType)`
    `OExpression` | `compileExpr(java.lang.String expr, NSContext nc)` BPEL 1.1 legacy.
    `OExpression` | `compileJoinCondition(Expression expression)`
    `OLValueExpression` | `compileLValueExpr(Expression expression)`
    `OLValueExpression` | `compileLValueExpr(Expression expression, OVarType rootNodeType, java.lang.Object requestedResultType, java.lang.Object[] resultType)`
    `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 contextis running relative to.
    `protected abstract java.lang.String` | `getBpwsNamespace()`
    `CompileListener` | `getCompileListener()`
    `OActivity` | `getCurrent()`
    `protected abstract java.lang.String` | `getDefaultExpressionLanguage()`
    `OProcess` | `getOProcess()`
    `Process` | `getProcessDef()` Get the process definition.
    `java.util.Map<java.net.URI,javax.xml.transform.Source>` | `getSchemaSources()`
    `java.lang.String` | `getSourceLocation()`
    `static long` | `getVersion(java.lang.String dirName)`
    `javax.wsdl.Definition[]` | `getWsdlDefinitions()`
    `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` | `setResourceFinder(ResourceFinder finder)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### __log

          protected static final org.apache.commons.logging.Log __log

      Class-severity logger.

  - ### Method Detail

    - #### addWsdlImport

          public void addWsdlImport(java.net.URI from,
                           java.net.URI wsdlImport,
                           SourceLocation sloc)

    - #### addXsdImport

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

    - #### setResourceFinder

          public void setResourceFinder(ResourceFinder finder)

    - #### setCompileListener

          public void setCompileListener(CompileListener compileListener)

    - #### getCompileListener

          public CompileListener getCompileListener()

    - #### setCustomProperties

          public void setCustomProperties(java.util.Map<javax.xml.namespace.QName,org.w3c.dom.Node> customProperties)

    - #### 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`

    - #### compileLValueExpr

          public OLValueExpression compileLValueExpr(Expression expression,
                                            OVarType rootNodeType,
                                            java.lang.Object requestedResultType,
                                            java.lang.Object[] resultType)
                                              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(Expression expression,
                                OVarType rootNodeType,
                                java.lang.Object requestedResultType,
                                java.lang.Object[] resultType)
                                  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`

    - #### getVersion

          public static long getVersion(java.lang.String dirName)

    - #### compile

          public OProcess compile(Process process,
                         ResourceFinder rf,
                         long version)
                           throws CompilationException

      Compile a process.
      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)

    - #### getDefaultExpressionLanguage

          protected abstract java.lang.String getDefaultExpressionLanguage()

    - #### getBpwsNamespace

          protected abstract java.lang.String getBpwsNamespace()

    - #### registerExpressionLanguage

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

    - #### registerExpressionLanguage

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

      Throws:
        `java.lang.Exception`

    - #### 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 contextis running relative to.
      Specified by:
        `getBaseResourceURI` in interface `CompilerContext`
      Returns:
        URI - the URI representing the absolute physical file path location that this process is defined within.
      Throws:
        `java.io.IOException`
        `java.net.MalformedURLException`