You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ode.apache.org by mr...@apache.org on 2008/08/05 01:54:05 UTC

svn commit: r682542 [4/4] - in /ode/branches/rtver: axis2/src/main/java/org/apache/ode/axis2/ bpel-api/src/main/java/org/apache/ode/bpel/rapi/ bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/ bpel-compiler/src/main/java/org/apache/ode/bpel/com...

Added: ode/branches/rtver/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/v2/ThrowGenerator.java
URL: http://svn.apache.org/viewvc/ode/branches/rtver/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/v2/ThrowGenerator.java?rev=682542&view=auto
==============================================================================
--- ode/branches/rtver/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/v2/ThrowGenerator.java (added)
+++ ode/branches/rtver/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/v2/ThrowGenerator.java Mon Aug  4 16:54:02 2008
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.ode.bpel.compiler.v2;
+
+import org.apache.ode.bpel.compiler.bom.Activity;
+import org.apache.ode.bpel.compiler.bom.ThrowActivity;
+import org.apache.ode.bpel.rtrep.v2.OActivity;
+import org.apache.ode.bpel.rtrep.v2.OThrow;
+
+
+/**
+ * Generates code for <code>&lt;throw&gt;</code> activities.
+ */
+class ThrowGenerator extends DefaultActivityGenerator {
+
+    public OActivity newInstance(Activity src) {
+        return new OThrow(_context.getOProcess(), _context.getCurrent());
+    }
+
+    public void compile(OActivity output, Activity src) {
+        ThrowActivity throwDef = (ThrowActivity)src;
+        OThrow othrow = (OThrow) output;
+        othrow.faultName = throwDef.getFaultName();
+        if(throwDef.getFaultVariable() != null) {
+            othrow.faultVariable = _context.resolveVariable(throwDef.getFaultVariable());
+            othrow.variableRd.add(othrow.faultVariable);
+        }
+    }
+}

Added: ode/branches/rtver/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/v2/WaitGenerator.java
URL: http://svn.apache.org/viewvc/ode/branches/rtver/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/v2/WaitGenerator.java?rev=682542&view=auto
==============================================================================
--- ode/branches/rtver/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/v2/WaitGenerator.java (added)
+++ ode/branches/rtver/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/v2/WaitGenerator.java Mon Aug  4 16:54:02 2008
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.ode.bpel.compiler.v2;
+
+import org.apache.ode.bpel.compiler.api.CompilationException;
+import org.apache.ode.bpel.compiler.bom.Activity;
+import org.apache.ode.bpel.compiler.bom.WaitActivity;
+import org.apache.ode.bpel.rtrep.v2.OActivity;
+import org.apache.ode.bpel.rtrep.v2.OWait;
+import org.apache.ode.utils.msg.MessageBundle;
+
+/**
+ * Generates code for the <code>&lt;wait&gt;</code> activities.
+ */
+class WaitGenerator extends DefaultActivityGenerator {
+
+    private WaitGeneratorMessages _msgs = MessageBundle.getMessages(WaitGeneratorMessages.class);
+
+    public OActivity newInstance(Activity src) {
+        return new OWait(_context.getOProcess(), _context.getCurrent());
+    }
+
+    public void compile(OActivity output, Activity src) {
+        WaitActivity waitDef = (WaitActivity)src;
+        OWait owait = (OWait)output;
+        if (waitDef.getFor() != null && waitDef.getUntil() == null) {
+            owait.forExpression = _context.compileExpr(waitDef.getFor());
+        }
+        else if (waitDef.getFor() == null && waitDef.getUntil() != null) {
+            owait.untilExpression = _context.compileExpr(waitDef.getUntil());
+        }
+        else {
+            throw new CompilationException(_msgs.errWaitMustDefineForOrUntilDuration().setSource(waitDef));
+        }
+    }
+}

Added: ode/branches/rtver/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/v2/WaitGeneratorMessages.java
URL: http://svn.apache.org/viewvc/ode/branches/rtver/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/v2/WaitGeneratorMessages.java?rev=682542&view=auto
==============================================================================
--- ode/branches/rtver/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/v2/WaitGeneratorMessages.java (added)
+++ ode/branches/rtver/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/v2/WaitGeneratorMessages.java Mon Aug  4 16:54:02 2008
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.ode.bpel.compiler.v2;
+
+import org.apache.ode.bpel.compiler.api.CompilationMessage;
+import org.apache.ode.bpel.compiler.api.CompilationMessageBundle;
+
+public class WaitGeneratorMessages extends CompilationMessageBundle {
+
+    /** Must specify exactly one "for" or "until" expression. */
+    public CompilationMessage errWaitMustDefineForOrUntilDuration() {
+        return this.formatCompilationMessage("Must specify exactly one \"for\" or \"until\" expression.");
+    }
+
+}

Added: ode/branches/rtver/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/v2/WhileGenerator.java
URL: http://svn.apache.org/viewvc/ode/branches/rtver/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/v2/WhileGenerator.java?rev=682542&view=auto
==============================================================================
--- ode/branches/rtver/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/v2/WhileGenerator.java (added)
+++ ode/branches/rtver/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/v2/WhileGenerator.java Mon Aug  4 16:54:02 2008
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.ode.bpel.compiler.v2;
+
+import org.apache.ode.bpel.compiler.bom.Activity;
+import org.apache.ode.bpel.compiler.bom.WhileActivity;
+import org.apache.ode.bpel.rtrep.v2.OActivity;
+import org.apache.ode.bpel.rtrep.v2.OWhile;
+
+
+/**
+ * Generates code for <code>&lt;while&gt;</code> activities.
+ */
+class WhileGenerator extends DefaultActivityGenerator {
+    public OActivity newInstance(Activity src) {
+        return new OWhile(_context.getOProcess(), _context.getCurrent());
+    }
+
+    public void compile(OActivity output, Activity srcx)  {
+        OWhile owhile = (OWhile) output;
+        WhileActivity src = (WhileActivity)srcx;
+        owhile.whileCondition = _context.compileExpr(src.getCondition());
+        owhile.activity = _context.compile(src.getActivity());
+    }
+}

Modified: ode/branches/rtver/bpel-compiler/src/main/java/org/apache/ode/bpel/elang/xpath10/compiler/JaxenBpelHandler.java
URL: http://svn.apache.org/viewvc/ode/branches/rtver/bpel-compiler/src/main/java/org/apache/ode/bpel/elang/xpath10/compiler/JaxenBpelHandler.java?rev=682542&r1=682541&r2=682542&view=diff
==============================================================================
--- ode/branches/rtver/bpel-compiler/src/main/java/org/apache/ode/bpel/elang/xpath10/compiler/JaxenBpelHandler.java (original)
+++ ode/branches/rtver/bpel-compiler/src/main/java/org/apache/ode/bpel/elang/xpath10/compiler/JaxenBpelHandler.java Mon Aug  4 16:54:02 2008
@@ -23,7 +23,7 @@
 import javax.xml.namespace.QName;
 
 import org.apache.ode.bpel.compiler.api.CompilationException;
-import org.apache.ode.bpel.compiler.api.CompilerContext;
+import org.apache.ode.bpel.compiler.v2.CompilerContext;
 import org.apache.ode.bpel.rtrep.v2.OExpression;
 import org.apache.ode.bpel.rtrep.v2.OLink;
 import org.apache.ode.bpel.rtrep.v2.OMessageVarType;

Modified: ode/branches/rtver/bpel-compiler/src/main/java/org/apache/ode/bpel/elang/xpath10/compiler/SourceLocatorWrapper.java
URL: http://svn.apache.org/viewvc/ode/branches/rtver/bpel-compiler/src/main/java/org/apache/ode/bpel/elang/xpath10/compiler/SourceLocatorWrapper.java?rev=682542&r1=682541&r2=682542&view=diff
==============================================================================
--- ode/branches/rtver/bpel-compiler/src/main/java/org/apache/ode/bpel/elang/xpath10/compiler/SourceLocatorWrapper.java (original)
+++ ode/branches/rtver/bpel-compiler/src/main/java/org/apache/ode/bpel/elang/xpath10/compiler/SourceLocatorWrapper.java Mon Aug  4 16:54:02 2008
@@ -22,9 +22,9 @@
 
 import javax.xml.transform.SourceLocator;
 
-import org.apache.ode.bpel.compiler.api.SourceLocation;
+import org.apache.ode.bpel.compiler.SourceLocation;
 
-public class SourceLocatorWrapper implements SourceLocation {
+public class SourceLocatorWrapper extends SourceLocation {
 
     private SourceLocator _sloc;
 

Modified: ode/branches/rtver/bpel-compiler/src/main/java/org/apache/ode/bpel/elang/xpath10/compiler/XPath10ExpressionCompilerBPEL11.java
URL: http://svn.apache.org/viewvc/ode/branches/rtver/bpel-compiler/src/main/java/org/apache/ode/bpel/elang/xpath10/compiler/XPath10ExpressionCompilerBPEL11.java?rev=682542&r1=682541&r2=682542&view=diff
==============================================================================
--- ode/branches/rtver/bpel-compiler/src/main/java/org/apache/ode/bpel/elang/xpath10/compiler/XPath10ExpressionCompilerBPEL11.java (original)
+++ ode/branches/rtver/bpel-compiler/src/main/java/org/apache/ode/bpel/elang/xpath10/compiler/XPath10ExpressionCompilerBPEL11.java Mon Aug  4 16:54:02 2008
@@ -34,7 +34,7 @@
   }
   
   /**
-   * @see org.apache.ode.bpel.compiler.api.ExpressionCompiler#compileJoinCondition(java.lang.Object)
+   * @see org.apache.ode.bpel.compiler.v2.ExpressionCompiler#compileJoinCondition(java.lang.Object)
    */
   public OExpression compileJoinCondition(Object source) throws CompilationException {
   	return compile(source);
@@ -45,7 +45,7 @@
   }
 
   /**
-   * @see org.apache.ode.bpel.compiler.api.ExpressionCompiler#compile(java.lang.Object)
+   * @see org.apache.ode.bpel.compiler.v2.ExpressionCompiler#compile(java.lang.Object)
    */
   public OExpression compile(Object source) throws CompilationException {
     Expression xpath = (Expression)source;

Modified: ode/branches/rtver/bpel-compiler/src/main/java/org/apache/ode/bpel/elang/xpath10/compiler/XPath10ExpressionCompilerBPEL20.java
URL: http://svn.apache.org/viewvc/ode/branches/rtver/bpel-compiler/src/main/java/org/apache/ode/bpel/elang/xpath10/compiler/XPath10ExpressionCompilerBPEL20.java?rev=682542&r1=682541&r2=682542&view=diff
==============================================================================
--- ode/branches/rtver/bpel-compiler/src/main/java/org/apache/ode/bpel/elang/xpath10/compiler/XPath10ExpressionCompilerBPEL20.java (original)
+++ ode/branches/rtver/bpel-compiler/src/main/java/org/apache/ode/bpel/elang/xpath10/compiler/XPath10ExpressionCompilerBPEL20.java Mon Aug  4 16:54:02 2008
@@ -19,7 +19,7 @@
 package org.apache.ode.bpel.elang.xpath10.compiler;
 
 import org.apache.ode.bpel.compiler.api.CompilationException;
-import org.apache.ode.bpel.compiler.api.CompilerContext;
+import org.apache.ode.bpel.compiler.v2.CompilerContext;
 import org.apache.ode.bpel.compiler.bom.Expression;
 import org.apache.ode.bpel.rtrep.v2.xpath10.OXPath10Expression;
 import org.apache.ode.bpel.rtrep.v2.xpath10.OXPath10ExpressionBPEL20;
@@ -51,7 +51,7 @@
     }
 
     /**
-     * @see org.apache.ode.bpel.compiler.api.ExpressionCompiler#compileJoinCondition(java.lang.Object)
+     * @see org.apache.ode.bpel.compiler.v2.ExpressionCompiler#compileJoinCondition(java.lang.Object)
      */
     public OExpression compileJoinCondition(Object source) throws CompilationException {
         return _compile((Expression)source, true);
@@ -64,13 +64,13 @@
         XslTransformHandler.getInstance().setErrorListener(xe);
     }
     /**
-     * @see org.apache.ode.bpel.compiler.api.ExpressionCompiler#compile(java.lang.Object)
+     * @see org.apache.ode.bpel.compiler.v2.ExpressionCompiler#compile(java.lang.Object)
      */
     public OExpression compile(Object source) throws CompilationException {
         return _compile((Expression)source, false);
     }
     /**
-     * @see org.apache.ode.bpel.compiler.api.ExpressionCompiler#compileLValue(java.lang.Object)
+     * @see org.apache.ode.bpel.compiler.v2.ExpressionCompiler#compileLValue(java.lang.Object)
      */
     public OLValueExpression compileLValue(Object source) throws CompilationException {
         return (OLValueExpression)_compile((Expression)source, false);

Modified: ode/branches/rtver/bpel-compiler/src/main/java/org/apache/ode/bpel/elang/xpath10/compiler/XPath10ExpressionCompilerImpl.java
URL: http://svn.apache.org/viewvc/ode/branches/rtver/bpel-compiler/src/main/java/org/apache/ode/bpel/elang/xpath10/compiler/XPath10ExpressionCompilerImpl.java?rev=682542&r1=682541&r2=682542&view=diff
==============================================================================
--- ode/branches/rtver/bpel-compiler/src/main/java/org/apache/ode/bpel/elang/xpath10/compiler/XPath10ExpressionCompilerImpl.java (original)
+++ ode/branches/rtver/bpel-compiler/src/main/java/org/apache/ode/bpel/elang/xpath10/compiler/XPath10ExpressionCompilerImpl.java Mon Aug  4 16:54:02 2008
@@ -24,8 +24,8 @@
 import javax.xml.namespace.QName;
 
 import org.apache.ode.bpel.compiler.api.CompilationException;
-import org.apache.ode.bpel.compiler.api.CompilerContext;
-import org.apache.ode.bpel.compiler.api.ExpressionCompiler;
+import org.apache.ode.bpel.compiler.v2.CompilerContext;
+import org.apache.ode.bpel.compiler.v2.ExpressionCompiler;
 import org.apache.ode.bpel.compiler.bom.Expression;
 import org.apache.ode.bpel.rtrep.v2.xpath10.OXPath10Expression;
 import org.apache.ode.utils.msg.MessageBundle;
@@ -73,14 +73,14 @@
     }
 
     /**
-     * @see org.apache.ode.bpel.compiler.api.ExpressionCompiler#setCompilerContext(org.apache.ode.bpel.compiler.api.CompilerContext)
+     * @see org.apache.ode.bpel.compiler.v2.ExpressionCompiler#setCompilerContext(org.apache.ode.bpel.compiler.v2.CompilerContext)
      */
     public void setCompilerContext(CompilerContext compilerContext) {
         _compilerContext = compilerContext;
     }
 
     /**
-     * @see org.apache.ode.bpel.compiler.api.ExpressionCompiler#getProperties()
+     * @see org.apache.ode.bpel.compiler.v2.ExpressionCompiler#getProperties()
      */
     public Map<String, String> getProperties() {
         return _properties;

Modified: ode/branches/rtver/bpel-compiler/src/main/java/org/apache/ode/bpel/elang/xpath10/compiler/XslCompilationErrorListener.java
URL: http://svn.apache.org/viewvc/ode/branches/rtver/bpel-compiler/src/main/java/org/apache/ode/bpel/elang/xpath10/compiler/XslCompilationErrorListener.java?rev=682542&r1=682541&r2=682542&view=diff
==============================================================================
--- ode/branches/rtver/bpel-compiler/src/main/java/org/apache/ode/bpel/elang/xpath10/compiler/XslCompilationErrorListener.java (original)
+++ ode/branches/rtver/bpel-compiler/src/main/java/org/apache/ode/bpel/elang/xpath10/compiler/XslCompilationErrorListener.java Mon Aug  4 16:54:02 2008
@@ -23,8 +23,8 @@
 import org.apache.commons.logging.LogFactory;
 import org.apache.ode.bpel.compiler.api.CompilationException;
 import org.apache.ode.bpel.compiler.api.CompilationMessage;
-import org.apache.ode.bpel.compiler.api.CompilerContext;
-import org.apache.ode.bpel.compiler.api.SourceLocation;
+import org.apache.ode.bpel.compiler.v2.CompilerContext;
+import org.apache.ode.bpel.compiler.SourceLocation;
 
 import javax.xml.transform.ErrorListener;
 import javax.xml.transform.TransformerException;

Modified: ode/branches/rtver/bpel-compiler/src/main/java/org/apache/ode/bpel/elang/xpath10/compiler/XslCompileUriResolver.java
URL: http://svn.apache.org/viewvc/ode/branches/rtver/bpel-compiler/src/main/java/org/apache/ode/bpel/elang/xpath10/compiler/XslCompileUriResolver.java?rev=682542&r1=682541&r2=682542&view=diff
==============================================================================
--- ode/branches/rtver/bpel-compiler/src/main/java/org/apache/ode/bpel/elang/xpath10/compiler/XslCompileUriResolver.java (original)
+++ ode/branches/rtver/bpel-compiler/src/main/java/org/apache/ode/bpel/elang/xpath10/compiler/XslCompileUriResolver.java Mon Aug  4 16:54:02 2008
@@ -19,7 +19,7 @@
 
 package org.apache.ode.bpel.elang.xpath10.compiler;
 
-import org.apache.ode.bpel.compiler.api.CompilerContext;
+import org.apache.ode.bpel.compiler.v2.CompilerContext;
 import org.apache.ode.bpel.rtrep.v2.xpath10.OXPath10Expression;
 import org.apache.ode.bpel.rtrep.v2.OXslSheet;
 

Modified: ode/branches/rtver/bpel-compiler/src/main/java/org/apache/ode/bpel/elang/xpath20/compiler/JaxpFunctionResolver.java
URL: http://svn.apache.org/viewvc/ode/branches/rtver/bpel-compiler/src/main/java/org/apache/ode/bpel/elang/xpath20/compiler/JaxpFunctionResolver.java?rev=682542&r1=682541&r2=682542&view=diff
==============================================================================
--- ode/branches/rtver/bpel-compiler/src/main/java/org/apache/ode/bpel/elang/xpath20/compiler/JaxpFunctionResolver.java (original)
+++ ode/branches/rtver/bpel-compiler/src/main/java/org/apache/ode/bpel/elang/xpath20/compiler/JaxpFunctionResolver.java Mon Aug  4 16:54:02 2008
@@ -20,7 +20,7 @@
 package org.apache.ode.bpel.elang.xpath20.compiler;
 
 import org.apache.ode.bpel.compiler.api.CompilationException;
-import org.apache.ode.bpel.compiler.api.CompilerContext;
+import org.apache.ode.bpel.compiler.v2.CompilerContext;
 import org.apache.ode.bpel.elang.xpath10.compiler.XPathMessages;
 import org.apache.ode.bpel.elang.xpath10.compiler.XslCompileUriResolver;
 import org.apache.ode.bpel.rtrep.v2.xpath20.OXPath20ExpressionBPEL20;

Modified: ode/branches/rtver/bpel-compiler/src/main/java/org/apache/ode/bpel/elang/xpath20/compiler/JaxpVariableResolver.java
URL: http://svn.apache.org/viewvc/ode/branches/rtver/bpel-compiler/src/main/java/org/apache/ode/bpel/elang/xpath20/compiler/JaxpVariableResolver.java?rev=682542&r1=682541&r2=682542&view=diff
==============================================================================
--- ode/branches/rtver/bpel-compiler/src/main/java/org/apache/ode/bpel/elang/xpath20/compiler/JaxpVariableResolver.java (original)
+++ ode/branches/rtver/bpel-compiler/src/main/java/org/apache/ode/bpel/elang/xpath20/compiler/JaxpVariableResolver.java Mon Aug  4 16:54:02 2008
@@ -20,7 +20,7 @@
 package org.apache.ode.bpel.elang.xpath20.compiler;
 
 import org.apache.ode.bpel.compiler.api.CompilationException;
-import org.apache.ode.bpel.compiler.api.CompilerContext;
+import org.apache.ode.bpel.compiler.v2.CompilerContext;
 import org.apache.ode.bpel.elang.xpath10.compiler.XPathMessages;
 import org.apache.ode.bpel.rtrep.v2.xpath10.OXPath10ExpressionBPEL20;
 import org.apache.ode.bpel.rtrep.v2.OElementVarType;

Modified: ode/branches/rtver/bpel-compiler/src/main/java/org/apache/ode/bpel/elang/xpath20/compiler/XPath20ExpressionCompilerImpl.java
URL: http://svn.apache.org/viewvc/ode/branches/rtver/bpel-compiler/src/main/java/org/apache/ode/bpel/elang/xpath20/compiler/XPath20ExpressionCompilerImpl.java?rev=682542&r1=682541&r2=682542&view=diff
==============================================================================
--- ode/branches/rtver/bpel-compiler/src/main/java/org/apache/ode/bpel/elang/xpath20/compiler/XPath20ExpressionCompilerImpl.java (original)
+++ ode/branches/rtver/bpel-compiler/src/main/java/org/apache/ode/bpel/elang/xpath20/compiler/XPath20ExpressionCompilerImpl.java Mon Aug  4 16:54:02 2008
@@ -32,8 +32,8 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.ode.bpel.compiler.api.CompilationException;
-import org.apache.ode.bpel.compiler.api.CompilerContext;
-import org.apache.ode.bpel.compiler.api.ExpressionCompiler;
+import org.apache.ode.bpel.compiler.v2.CompilerContext;
+import org.apache.ode.bpel.compiler.v2.ExpressionCompiler;
 import org.apache.ode.bpel.compiler.bom.Expression;
 import org.apache.ode.bpel.elang.xpath10.compiler.XPathMessages;
 import org.apache.ode.bpel.elang.xpath10.compiler.XslCompilationErrorListener;
@@ -83,28 +83,28 @@
     }
 
     /**
-     * @see org.apache.ode.bpel.compiler.api.ExpressionCompiler#compileJoinCondition(java.lang.Object)
+     * @see org.apache.ode.bpel.compiler.v2.ExpressionCompiler#compileJoinCondition(java.lang.Object)
      */
     public OExpression compileJoinCondition(Object source) throws CompilationException {
         return _compile((Expression) source, true);
     }
 
     /**
-     * @see org.apache.ode.bpel.compiler.api.ExpressionCompiler#compile(java.lang.Object)
+     * @see org.apache.ode.bpel.compiler.v2.ExpressionCompiler#compile(java.lang.Object)
      */
     public OExpression compile(Object source) throws CompilationException {
         return _compile((Expression) source, false);
     }
 
     /**
-     * @see org.apache.ode.bpel.compiler.api.ExpressionCompiler#compileLValue(java.lang.Object)
+     * @see org.apache.ode.bpel.compiler.v2.ExpressionCompiler#compileLValue(java.lang.Object)
      */
     public OLValueExpression compileLValue(Object source) throws CompilationException {
         return (OLValueExpression) _compile((Expression) source, false);
     }
 
     /**
-     * @see org.apache.ode.bpel.compiler.api.ExpressionCompiler#compile(java.lang.Object)
+     * @see org.apache.ode.bpel.compiler.v2.ExpressionCompiler#compile(java.lang.Object)
      */
     private OExpression _compile(org.apache.ode.bpel.compiler.bom.Expression xpath, boolean isJoinCondition)
             throws CompilationException {

Modified: ode/branches/rtver/bpel-compiler/src/test/java/org/apache/ode/bpel/compiler/CompilationMessageTest.java
URL: http://svn.apache.org/viewvc/ode/branches/rtver/bpel-compiler/src/test/java/org/apache/ode/bpel/compiler/CompilationMessageTest.java?rev=682542&r1=682541&r2=682542&view=diff
==============================================================================
--- ode/branches/rtver/bpel-compiler/src/test/java/org/apache/ode/bpel/compiler/CompilationMessageTest.java (original)
+++ ode/branches/rtver/bpel-compiler/src/test/java/org/apache/ode/bpel/compiler/CompilationMessageTest.java Mon Aug  4 16:54:02 2008
@@ -20,6 +20,7 @@
 package org.apache.ode.bpel.compiler;
 
 import org.apache.ode.bpel.compiler.api.CompilationMessage;
+import org.apache.ode.bpel.compiler.v2.SourceLocationImpl;
 import org.apache.ode.utils.msg.MessageBundle;
 
 import java.net.URI;
@@ -36,7 +37,7 @@
   private static String WRONG_PARAMETER_CODE = "WrongParameter";
 
   private CompilationTestMessages _bundle;
-  private SourceLocationImpl sloc;
+  private SourceLocation sloc;
   private Locale oldLocale;
   @Override
   protected void setUp() throws Exception {
@@ -44,7 +45,7 @@
     oldLocale = Locale.getDefault();
     Locale.setDefault(Locale.ENGLISH);
     _bundle = MessageBundle.getMessages(CompilationTestMessages.class);
-    sloc = new SourceLocationImpl(new URI("urn:foo"));
+    sloc = new SourceLocation(new URI("urn:foo"));
   }
 
   @Override

Modified: ode/branches/rtver/bpel-compiler/src/test/java/org/apache/ode/bpel/compiler/WSDLRegistryTest.java
URL: http://svn.apache.org/viewvc/ode/branches/rtver/bpel-compiler/src/test/java/org/apache/ode/bpel/compiler/WSDLRegistryTest.java?rev=682542&r1=682541&r2=682542&view=diff
==============================================================================
--- ode/branches/rtver/bpel-compiler/src/test/java/org/apache/ode/bpel/compiler/WSDLRegistryTest.java (original)
+++ ode/branches/rtver/bpel-compiler/src/test/java/org/apache/ode/bpel/compiler/WSDLRegistryTest.java Mon Aug  4 16:54:02 2008
@@ -29,6 +29,7 @@
 import org.apache.ode.bpel.compiler.wsdl.Definition4BPEL;
 import org.apache.ode.bpel.compiler.wsdl.WSDLFactory4BPEL;
 import org.apache.ode.bpel.compiler.wsdl.WSDLFactoryBPEL11;
+import org.apache.ode.bpel.compiler.DefaultResourceFinder;
 import org.apache.ode.utils.xsd.SchemaModel;
 
 public class WSDLRegistryTest extends TestCase {

Modified: ode/branches/rtver/bpel-compiler/src/test/java/org/apache/ode/bpel/compiler/XPathTest.java
URL: http://svn.apache.org/viewvc/ode/branches/rtver/bpel-compiler/src/test/java/org/apache/ode/bpel/compiler/XPathTest.java?rev=682542&r1=682541&r2=682542&view=diff
==============================================================================
--- ode/branches/rtver/bpel-compiler/src/test/java/org/apache/ode/bpel/compiler/XPathTest.java (original)
+++ ode/branches/rtver/bpel-compiler/src/test/java/org/apache/ode/bpel/compiler/XPathTest.java Mon Aug  4 16:54:02 2008
@@ -30,9 +30,9 @@
 import junit.framework.TestCase;
 
 import org.apache.ode.bpel.compiler.api.CompilationException;
-import org.apache.ode.bpel.compiler.api.CompilerContext;
-import org.apache.ode.bpel.compiler.api.ExpressionCompiler;
-import org.apache.ode.bpel.compiler.api.ExtensionValidator;
+import org.apache.ode.bpel.compiler.v2.CompilerContext;
+import org.apache.ode.bpel.compiler.v2.ExpressionCompiler;
+import org.apache.ode.bpel.compiler.v2.ExtensionValidator;
 import org.apache.ode.bpel.compiler.api.SourceLocation;
 import org.apache.ode.bpel.compiler.bom.Activity;
 import org.apache.ode.bpel.compiler.bom.BpelObject;

Modified: ode/branches/rtver/bpel-runtime/src/test/java/org/apache/ode/bpel/elang/xpath20/runtime/MockCompilerContext.java
URL: http://svn.apache.org/viewvc/ode/branches/rtver/bpel-runtime/src/test/java/org/apache/ode/bpel/elang/xpath20/runtime/MockCompilerContext.java?rev=682542&r1=682541&r2=682542&view=diff
==============================================================================
--- ode/branches/rtver/bpel-runtime/src/test/java/org/apache/ode/bpel/elang/xpath20/runtime/MockCompilerContext.java (original)
+++ ode/branches/rtver/bpel-runtime/src/test/java/org/apache/ode/bpel/elang/xpath20/runtime/MockCompilerContext.java Mon Aug  4 16:54:02 2008
@@ -27,34 +27,19 @@
 import javax.xml.namespace.QName;
 
 import org.apache.ode.bpel.compiler.api.CompilationException;
-import org.apache.ode.bpel.compiler.api.CompilerContext;
-import org.apache.ode.bpel.compiler.api.ExtensionValidator;
-import org.apache.ode.bpel.compiler.api.SourceLocation;
+import org.apache.ode.bpel.compiler.v2.CompilerContext;
+import org.apache.ode.bpel.compiler.v2.ExtensionValidator;
 import org.apache.ode.bpel.compiler.bom.Activity;
 import org.apache.ode.bpel.compiler.bom.BpelObject;
 import org.apache.ode.bpel.compiler.bom.Expression;
 import org.apache.ode.bpel.compiler.bom.ScopeLikeActivity;
-import org.apache.ode.bpel.o.OActivity;
-import org.apache.ode.bpel.o.OElementVarType;
-import org.apache.ode.bpel.o.OExpression;
-import org.apache.ode.bpel.o.OLValueExpression;
-import org.apache.ode.bpel.o.OLink;
-import org.apache.ode.bpel.o.OMessageVarType;
-import org.apache.ode.bpel.o.OPartnerLink;
-import org.apache.ode.bpel.o.OProcess;
-import org.apache.ode.bpel.o.OScope;
-import org.apache.ode.bpel.o.OXsdTypeVarType;
-import org.apache.ode.bpel.o.OXslSheet;
-import org.apache.ode.bpel.o.OMessageVarType.Part;
-import org.apache.ode.bpel.o.OProcess.OProperty;
-import org.apache.ode.bpel.o.OProcess.OPropertyAlias;
-import org.apache.ode.bpel.o.OScope.CorrelationSet;
-import org.apache.ode.bpel.o.OScope.Variable;
+import org.apache.ode.bpel.compiler.SourceLocation;
+import org.apache.ode.bpel.rtrep.v2.*;
 import org.apache.ode.utils.NSContext;
 
 public class MockCompilerContext implements CompilerContext {
     private OProcess _oprocess = new OProcess("20");
-    private Map<String , Variable> _vars =new  HashMap<String, Variable>();
+    private Map<String , OScope.Variable> _vars =new  HashMap<String, OScope.Variable>();
     
     public OExpression constantExpr(boolean value) {
         // TODO Auto-generated method stub
@@ -85,28 +70,28 @@
         return null;
     }
 
-    public OProperty resolveProperty(QName name) throws CompilationException {
+    public OProcess.OProperty resolveProperty(QName name) throws CompilationException {
         // TODO Auto-generated method stub
         return null;
     }
 
-    public Variable resolveVariable(String name) throws CompilationException {
+    public OScope.Variable resolveVariable(String name) throws CompilationException {
         return _vars.get(name);
     }
 
-    public List<Variable> getAccessibleVariables() {
-        return new ArrayList<Variable>(_vars.values());
+    public List<OScope.Variable> getAccessibleVariables() {
+        return new ArrayList<OScope.Variable>(_vars.values());
     }
 
-    public Variable resolveMessageVariable(String inputVar) throws CompilationException {
+    public OScope.Variable resolveMessageVariable(String inputVar) throws CompilationException {
         return _vars.get(inputVar);
     }
 
-    public Variable resolveMessageVariable(String inputVar, QName messageType) throws CompilationException {
+    public OScope.Variable resolveMessageVariable(String inputVar, QName messageType) throws CompilationException {
         return _vars.get(inputVar);
     }
 
-    public Part resolvePart(Variable variable, String partname) throws CompilationException {
+    public OMessageVarType.Part resolvePart(OScope.Variable variable, String partname) throws CompilationException {
         return ((OMessageVarType)variable.type).parts.get(partname);
     }
 
@@ -135,7 +120,7 @@
         return null;
     }
 
-    public OPropertyAlias resolvePropertyAlias(Variable variable, QName property) throws CompilationException {
+    public OProcess.OPropertyAlias resolvePropertyAlias(OScope.Variable variable, QName property) throws CompilationException {
         // TODO Auto-generated method stub
         return null;
     }
@@ -159,7 +144,7 @@
         return _oprocess;
     }
 
-    public CorrelationSet resolveCorrelationSet(String csetName) throws CompilationException {
+    public OScope.CorrelationSet resolveCorrelationSet(String csetName) throws CompilationException {
         // TODO Auto-generated method stub
         return null;
     }
@@ -198,7 +183,7 @@
         // TODO Auto-generated method stub
         return null;
     }
-    public OScope compileSLC(ScopeLikeActivity child, Variable[] variables) {
+    public OScope compileSLC(ScopeLikeActivity child, OScope.Variable[] variables) {
         // TODO Auto-generated method stub
         return null;
     }
@@ -213,7 +198,7 @@
 		return null;
 	}
 
-     public Part resolveHeaderPart(Variable variable, String partname) throws CompilationException {
+     public OMessageVarType.Part resolveHeaderPart(OScope.Variable variable, String partname) throws CompilationException {
          return null;
      }
 

Modified: ode/branches/rtver/bpel-store/src/main/java/org/apache/ode/store/DeploymentUnitDir.java
URL: http://svn.apache.org/viewvc/ode/branches/rtver/bpel-store/src/main/java/org/apache/ode/store/DeploymentUnitDir.java?rev=682542&r1=682541&r2=682542&view=diff
==============================================================================
--- ode/branches/rtver/bpel-store/src/main/java/org/apache/ode/store/DeploymentUnitDir.java (original)
+++ ode/branches/rtver/bpel-store/src/main/java/org/apache/ode/store/DeploymentUnitDir.java Mon Aug  4 16:54:02 2008
@@ -23,7 +23,7 @@
 import org.apache.ode.bpel.compiler.BpelC;
 import org.apache.ode.bpel.compiler.DefaultResourceFinder;
 import org.apache.ode.bpel.compiler.WSDLLocatorImpl;
-import org.apache.ode.bpel.compiler.api.ExtensionValidator;
+import org.apache.ode.bpel.compiler.v2.ExtensionValidator;
 import org.apache.ode.bpel.compiler.wsdl.Definition4BPEL;
 import org.apache.ode.bpel.compiler.wsdl.WSDLFactory4BPEL;
 import org.apache.ode.bpel.compiler.wsdl.WSDLFactoryBPEL20;
@@ -32,6 +32,7 @@
 import org.apache.ode.bpel.dd.TDeployment.Process;
 import org.apache.ode.bpel.iapi.ContextException;
 import org.apache.ode.bpel.o.Serializer;
+import org.apache.ode.bpel.rapi.Serializer;
 import org.apache.xmlbeans.XmlOptions;
 import org.w3c.dom.Node;
 

Modified: ode/branches/rtver/bpel-store/src/main/java/org/apache/ode/store/ProcessStoreImpl.java
URL: http://svn.apache.org/viewvc/ode/branches/rtver/bpel-store/src/main/java/org/apache/ode/store/ProcessStoreImpl.java?rev=682542&r1=682541&r2=682542&view=diff
==============================================================================
--- ode/branches/rtver/bpel-store/src/main/java/org/apache/ode/store/ProcessStoreImpl.java (original)
+++ ode/branches/rtver/bpel-store/src/main/java/org/apache/ode/store/ProcessStoreImpl.java Mon Aug  4 16:54:02 2008
@@ -36,7 +36,7 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.ode.bpel.compiler.api.CompilationException;
-import org.apache.ode.bpel.compiler.api.ExtensionValidator;
+import org.apache.ode.bpel.compiler.v2.ExtensionValidator;
 import org.apache.ode.bpel.dd.DeployDocument;
 import org.apache.ode.bpel.dd.TDeployment;
 import org.apache.ode.bpel.iapi.ContextException;

Modified: ode/branches/rtver/bpel-test/src/test/java/org/apache/ode/test/ExtensibilityTest.java
URL: http://svn.apache.org/viewvc/ode/branches/rtver/bpel-test/src/test/java/org/apache/ode/test/ExtensibilityTest.java?rev=682542&r1=682541&r2=682542&view=diff
==============================================================================
--- ode/branches/rtver/bpel-test/src/test/java/org/apache/ode/test/ExtensibilityTest.java (original)
+++ ode/branches/rtver/bpel-test/src/test/java/org/apache/ode/test/ExtensibilityTest.java Mon Aug  4 16:54:02 2008
@@ -21,7 +21,7 @@
 import org.apache.ode.bpel.common.FaultException;
 import org.apache.ode.bpel.compiler.api.CompilationException;
 import org.apache.ode.bpel.compiler.api.CompilationMessage;
-import org.apache.ode.bpel.compiler.api.CompilerContext;
+import org.apache.ode.bpel.compiler.v2.CompilerContext;
 import org.apache.ode.bpel.compiler.bom.ExtensibleElement;
 import org.apache.ode.bpel.iapi.BpelEngineException;
 import org.apache.ode.bpel.runtime.extension.AbstractAsyncExtensionOperation;

Modified: ode/branches/rtver/jbi/src/main/java/org/apache/ode/jbi/OdeLifeCycle.java
URL: http://svn.apache.org/viewvc/ode/branches/rtver/jbi/src/main/java/org/apache/ode/jbi/OdeLifeCycle.java?rev=682542&r1=682541&r2=682542&view=diff
==============================================================================
--- ode/branches/rtver/jbi/src/main/java/org/apache/ode/jbi/OdeLifeCycle.java (original)
+++ ode/branches/rtver/jbi/src/main/java/org/apache/ode/jbi/OdeLifeCycle.java Mon Aug  4 16:54:02 2008
@@ -37,12 +37,11 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.ode.bpel.compiler.api.ExtensionValidator;
+import org.apache.ode.bpel.compiler.v2.ExtensionValidator;
 import org.apache.ode.bpel.connector.BpelServerConnector;
 import org.apache.ode.bpel.dao.BpelDAOConnectionFactoryJDBC;
 import org.apache.ode.bpel.engine.BpelServerImpl;
 import org.apache.ode.bpel.engine.ProcessAndInstanceManagementMBean;
-import org.apache.ode.bpel.engine.ProcessAndInstanceManagementImpl;
 import org.apache.ode.bpel.evtproc.DebugBpelEventListener;
 import org.apache.ode.bpel.iapi.BpelEventListener;
 import org.apache.ode.bpel.intercept.MessageExchangeInterceptor;

Added: ode/branches/rtver/runtime-repo/src/main/java/org/apache/ode/bpel/rtrep/Serializers.java
URL: http://svn.apache.org/viewvc/ode/branches/rtver/runtime-repo/src/main/java/org/apache/ode/bpel/rtrep/Serializers.java?rev=682542&view=auto
==============================================================================
--- ode/branches/rtver/runtime-repo/src/main/java/org/apache/ode/bpel/rtrep/Serializers.java (added)
+++ ode/branches/rtver/runtime-repo/src/main/java/org/apache/ode/bpel/rtrep/Serializers.java Mon Aug  4 16:54:02 2008
@@ -0,0 +1,15 @@
+package org.apache.ode.bpel.rtrep;
+
+import org.apache.ode.bpel.rapi.Serializer;
+
+public class Serializers {
+
+    public static Serializer getLatest() {
+        return new org.apache.ode.bpel.rtrep.v2.Serializer(System.currentTimeMillis());
+    }
+
+    public static Serializer getVersion(int version) {
+        // TODO switch on the version when we'll have more than one
+        return getLatest();
+    }
+}

Modified: ode/branches/rtver/runtime-repo/src/main/java/org/apache/ode/bpel/rtrep/v2/RuntimeImpl.java
URL: http://svn.apache.org/viewvc/ode/branches/rtver/runtime-repo/src/main/java/org/apache/ode/bpel/rtrep/v2/RuntimeImpl.java?rev=682542&r1=682541&r2=682542&view=diff
==============================================================================
--- ode/branches/rtver/runtime-repo/src/main/java/org/apache/ode/bpel/rtrep/v2/RuntimeImpl.java (original)
+++ ode/branches/rtver/runtime-repo/src/main/java/org/apache/ode/bpel/rtrep/v2/RuntimeImpl.java Mon Aug  4 16:54:02 2008
@@ -166,7 +166,7 @@
     private OProcess deserializeCompiledProcess(InputStream is) throws IOException, ClassNotFoundException {
         OProcess compiledProcess;
         Serializer ofh = new Serializer(is);
-        compiledProcess = ofh.readOProcess();
+        compiledProcess = ofh.readPModel();
         return compiledProcess;
     }
 

Modified: ode/branches/rtver/runtime-repo/src/main/java/org/apache/ode/bpel/rtrep/v2/Serializer.java
URL: http://svn.apache.org/viewvc/ode/branches/rtver/runtime-repo/src/main/java/org/apache/ode/bpel/rtrep/v2/Serializer.java?rev=682542&r1=682541&r2=682542&view=diff
==============================================================================
--- ode/branches/rtver/runtime-repo/src/main/java/org/apache/ode/bpel/rtrep/v2/Serializer.java (original)
+++ ode/branches/rtver/runtime-repo/src/main/java/org/apache/ode/bpel/rtrep/v2/Serializer.java Mon Aug  4 16:54:02 2008
@@ -18,6 +18,8 @@
  */
 package org.apache.ode.bpel.rtrep.v2;
 
+import org.apache.ode.bpel.rapi.ProcessModel;
+
 import javax.xml.namespace.QName;
 import java.io.*;
 import java.util.Arrays;
@@ -25,7 +27,7 @@
 /**
  * Header written at the beginning of every compiled BPEL object file.
  */
-public class Serializer  {
+public class Serializer implements org.apache.ode.bpel.rapi.Serializer {
 
     public static final byte[] MAGIC_NUMBER_OFH_20040908 =
             new byte[]  { 0x55, '5', 'S', 0x00, 'O', 'F', 'H', 0x20, 0x04, 0x09, 0x08  };
@@ -110,7 +112,8 @@
         throw new IOException("Unrecognized file format (bad magic number).");
     }
  
-    public void writeOProcess(OProcess process, OutputStream os) throws IOException {
+    public void writePModel(ProcessModel pmodel, OutputStream os) throws IOException {
+        OProcess process = (OProcess) pmodel;
         DataOutputStream out = new DataOutputStream(os);
 
         out.write(MAGIC_NUMBER);
@@ -125,10 +128,7 @@
         oos.flush();
     }
 
-    public OProcess readOProcess() throws IOException, ClassNotFoundException {
-//        if (_oprocess != null)
-//            return _oprocess;
-        
+    public OProcess readPModel() throws IOException, ClassNotFoundException {
         ObjectInputStream ois = new CustomObjectInputStream(_inputStream);
         OProcess oprocess;
         try {