craigmcc 01/08/22 20:52:18 Modified: workflow build.xml workflow/src/java/org/apache/commons/workflow Context.java workflow/src/java/org/apache/commons/workflow/base BaseContext.java BaseScope.java workflow/src/java/org/apache/commons/workflow/core GetStep.java PutStep.java workflow/src/java/org/apache/commons/workflow/io DisplayStep.java workflow/src/test/org/apache/commons/workflow/base BaseContextTestCase.java workflow/src/test/org/apache/commons/workflow/web WebContextTestCase.java Log: Adapt to JPath -> JXPath name and location change. Revision Changes Path 1.8 +6 -6 jakarta-commons-sandbox/workflow/build.xml Index: build.xml =================================================================== RCS file: /home/cvs/jakarta-commons-sandbox/workflow/build.xml,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- build.xml 2001/08/22 04:52:45 1.7 +++ build.xml 2001/08/23 03:52:17 1.8 @@ -3,7 +3,7 @@ <!-- "Workflow" component of the Jakarta Commons Subproject - $Id: build.xml,v 1.7 2001/08/22 04:52:45 craigmcc Exp $ + $Id: build.xml,v 1.8 2001/08/23 03:52:17 craigmcc Exp $ --> @@ -28,7 +28,7 @@ <property name="beanutils.home" value="${commons.home}/beanutils"/> <property name="collections.home" value="${commons.home}/collections"/> <property name="digester.home" value="${commons.home}/digester"/> - <property name="jpath.home" value="${sandbox.home}/jpath"/> + <property name="jxpath.home" value="${commons.home}/jxpath"/> <property name="servletapi.home" value="../../jakarta-servleatpi-4"/> @@ -43,7 +43,7 @@ <property name="commons-beanutils.jar" value="${beanutils.home}/dist/commons-beanutils.jar"/> <property name="commons-collections.jar" value="${collections.home}/dist/commons-collections.jar"/> <property name="commons-digester.jar" value="${digester.home}/dist/commons-digester.jar"/> - <property name="commons-jpath.jar" value="${jpath.home}/dist/commons-jpath.jar"/> + <property name="commons-jxpath.jar" value="${jxpath.home}/dist/commons-jxpath.jar"/> <property name="servlet.jar" value="${servletapi.home}/lib/servlet.jar"/> @@ -96,7 +96,7 @@ <pathelement location="${commons-beanutils.jar}"/> <pathelement location="${commons-collections.jar}"/> <pathelement location="${commons-digester.jar}"/> - <pathelement location="${commons-jpath.jar}"/> + <pathelement location="${commons-jxpath.jar}"/> <pathelement location="${servlet.jar}"/> </path> @@ -114,7 +114,7 @@ <pathelement location="${commons-beanutils.jar}"/> <pathelement location="${commons-collections.jar}"/> <pathelement location="${commons-digester.jar}"/> - <pathelement location="${commons-jpath.jar}"/> + <pathelement location="${commons-jxpath.jar}"/> <pathelement location="${servlet.jar}"/> <pathelement location="${junit.jar}"/> </path> @@ -137,7 +137,7 @@ <pathelement location="${commons-beanutils.jar}"/> <pathelement location="${commons-collections.jar}"/> <pathelement location="${commons-digester.jar}"/> - <pathelement location="${commons-jpath.jar}"/> + <pathelement location="${commons-jxpath.jar}"/> <pathelement location="${servlet.jar}"/> </path> 1.6 +7 -7 jakarta-commons-sandbox/workflow/src/java/org/apache/commons/workflow/Context.java Index: Context.java =================================================================== RCS file: /home/cvs/jakarta-commons-sandbox/workflow/src/java/org/apache/commons/workflow/Context.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- Context.java 2001/08/19 23:53:10 1.5 +++ Context.java 2001/08/23 03:52:17 1.6 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-commons-sandbox/workflow/src/java/org/apache/commons/workflow/Context.java,v 1.5 2001/08/19 23:53:10 craigmcc Exp $ - * $Revision: 1.5 $ - * $Date: 2001/08/19 23:53:10 $ + * $Header: /home/cvs/jakarta-commons-sandbox/workflow/src/java/org/apache/commons/workflow/Context.java,v 1.6 2001/08/23 03:52:17 craigmcc Exp $ + * $Revision: 1.6 $ + * $Date: 2001/08/23 03:52:17 $ * * ==================================================================== * @@ -63,7 +63,7 @@ import java.util.EmptyStackException; -import org.apache.commons.jpath.JPathContext; +import org.apache.commons.jxpath.JXPathContext; /** @@ -88,7 +88,7 @@ * the Step implementations that are executed to maintain the stack's * integrity.</p> * - * @version $Revision: 1.5 $ $Date: 2001/08/19 23:53:10 $ + * @version $Revision: 1.6 $ $Date: 2001/08/23 03:52:17 $ * @author Craig R. McClanahan */ @@ -338,10 +338,10 @@ /** - * Return the JPathContext object that represents a unified namespace + * Return the JXPathContext object that represents a unified namespace * covering all of our registered <code>Scopes</code>. */ - public JPathContext getJPathContext(); + public JXPathContext getJXPathContext(); /** 1.9 +9 -9 jakarta-commons-sandbox/workflow/src/java/org/apache/commons/workflow/base/BaseContext.java Index: BaseContext.java =================================================================== RCS file: /home/cvs/jakarta-commons-sandbox/workflow/src/java/org/apache/commons/workflow/base/BaseContext.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- BaseContext.java 2001/08/22 01:38:11 1.8 +++ BaseContext.java 2001/08/23 03:52:18 1.9 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-commons-sandbox/workflow/src/java/org/apache/commons/workflow/base/BaseContext.java,v 1.8 2001/08/22 01:38:11 craigmcc Exp $ - * $Revision: 1.8 $ - * $Date: 2001/08/22 01:38:11 $ + * $Header: /home/cvs/jakarta-commons-sandbox/workflow/src/java/org/apache/commons/workflow/base/BaseContext.java,v 1.9 2001/08/23 03:52:18 craigmcc Exp $ + * $Revision: 1.9 $ + * $Date: 2001/08/23 03:52:18 $ * * ==================================================================== * @@ -64,7 +64,7 @@ import java.util.EmptyStackException; import org.apache.commons.collections.ArrayStack; -import org.apache.commons.jpath.JPathContext; +import org.apache.commons.jxpath.JXPathContext; import org.apache.commons.workflow.Activity; import org.apache.commons.workflow.Context; import org.apache.commons.workflow.ContextEvent; @@ -84,7 +84,7 @@ * class. If it is used in a multiple thread environment, callers must * take suitable precations.</p> * - * @version $Revision: 1.8 $ $Date: 2001/08/22 01:38:11 $ + * @version $Revision: 1.9 $ $Date: 2001/08/23 03:52:18 $ * @author Craig R. McClanahan */ @@ -119,7 +119,7 @@ /** * The bean representing the information about this Context made visible - * through JPath. + * through JXPath. */ protected BaseContextBean bean = null; @@ -572,14 +572,14 @@ /** - * Return the JPathContext object that represents a unified namespace + * Return the JXPathContext object that represents a unified namespace * covering all of our registered <code>Scopes</code>. */ - public JPathContext getJPathContext() { + public JXPathContext getJXPathContext() { if (bean == null) bean = new BaseContextBean(this); - return (JPathContext.newContext(bean)); + return (JXPathContext.newContext(bean)); } 1.3 +9 -9 jakarta-commons-sandbox/workflow/src/java/org/apache/commons/workflow/base/BaseScope.java Index: BaseScope.java =================================================================== RCS file: /home/cvs/jakarta-commons-sandbox/workflow/src/java/org/apache/commons/workflow/base/BaseScope.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- BaseScope.java 2001/08/20 04:14:19 1.2 +++ BaseScope.java 2001/08/23 03:52:18 1.3 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-commons-sandbox/workflow/src/java/org/apache/commons/workflow/base/BaseScope.java,v 1.2 2001/08/20 04:14:19 craigmcc Exp $ - * $Revision: 1.2 $ - * $Date: 2001/08/20 04:14:19 $ + * $Header: /home/cvs/jakarta-commons-sandbox/workflow/src/java/org/apache/commons/workflow/base/BaseScope.java,v 1.3 2001/08/23 03:52:18 craigmcc Exp $ + * $Revision: 1.3 $ + * $Date: 2001/08/23 03:52:18 $ * * ==================================================================== * @@ -67,8 +67,8 @@ import java.util.Iterator; import java.util.Map; import java.util.Set; -import org.apache.commons.jpath.JPathIntrospector; -import org.apache.commons.jpath.tree.MapDynamicPropertyHandler; +import org.apache.commons.jxpath.JXPathIntrospector; +import org.apache.commons.jxpath.tree.MapDynamicPropertyHandler; import org.apache.commons.workflow.Scope; import org.apache.commons.workflow.ScopeListener; import org.apache.commons.workflow.util.ScopeSupport; @@ -84,7 +84,7 @@ * class. If it is used in a multiple thread environment, callers must * take suitable precations.</p> * - * @version $Revision: 1.2 $ $Date: 2001/08/20 04:14:19 $ + * @version $Revision: 1.3 $ $Date: 2001/08/23 03:52:18 $ * @author Craig R. McClanahan */ @@ -95,11 +95,11 @@ /** - * Register ourselves with JPathIntrospector as an instance of a - * dynamic class (in JPath terminology). + * Register ourselves with JXPathIntrospector as an instance of a + * dynamic class (in JXPath terminology). */ static { - JPathIntrospector.registerDynamicClass + JXPathIntrospector.registerDynamicClass (BaseScope.class, MapDynamicPropertyHandler.class); } 1.4 +6 -6 jakarta-commons-sandbox/workflow/src/java/org/apache/commons/workflow/core/GetStep.java Index: GetStep.java =================================================================== RCS file: /home/cvs/jakarta-commons-sandbox/workflow/src/java/org/apache/commons/workflow/core/GetStep.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- GetStep.java 2001/08/22 01:06:08 1.3 +++ GetStep.java 2001/08/23 03:52:18 1.4 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-commons-sandbox/workflow/src/java/org/apache/commons/workflow/core/GetStep.java,v 1.3 2001/08/22 01:06:08 craigmcc Exp $ - * $Revision: 1.3 $ - * $Date: 2001/08/22 01:06:08 $ + * $Header: /home/cvs/jakarta-commons-sandbox/workflow/src/java/org/apache/commons/workflow/core/GetStep.java,v 1.4 2001/08/23 03:52:18 craigmcc Exp $ + * $Revision: 1.4 $ + * $Date: 2001/08/23 03:52:18 $ * * ==================================================================== * @@ -62,7 +62,7 @@ package org.apache.commons.workflow.core; -import org.apache.commons.jpath.JPathContext; +import org.apache.commons.jxpath.JXPathContext; import org.apache.commons.workflow.Context; import org.apache.commons.workflow.StepException; import org.apache.commons.workflow.base.BaseStep; @@ -85,7 +85,7 @@ * Context.</li> * </ul> * - * @version $Revision: 1.3 $ $Date: 2001/08/22 01:06:08 $ + * @version $Revision: 1.4 $ $Date: 2001/08/23 03:52:18 $ * @author Craig R. McClanahan */ @@ -198,7 +198,7 @@ // Retrieve the specified bean value Object value = null; if (xpath != null) { - JPathContext jpc = context.getJPathContext(); + JXPathContext jpc = context.getJXPathContext(); value = jpc.getValue("local/" + xpath); } else { if (scope == null) { 1.4 +7 -7 jakarta-commons-sandbox/workflow/src/java/org/apache/commons/workflow/core/PutStep.java Index: PutStep.java =================================================================== RCS file: /home/cvs/jakarta-commons-sandbox/workflow/src/java/org/apache/commons/workflow/core/PutStep.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- PutStep.java 2001/08/22 01:06:08 1.3 +++ PutStep.java 2001/08/23 03:52:18 1.4 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-commons-sandbox/workflow/src/java/org/apache/commons/workflow/core/PutStep.java,v 1.3 2001/08/22 01:06:08 craigmcc Exp $ - * $Revision: 1.3 $ - * $Date: 2001/08/22 01:06:08 $ + * $Header: /home/cvs/jakarta-commons-sandbox/workflow/src/java/org/apache/commons/workflow/core/PutStep.java,v 1.4 2001/08/23 03:52:18 craigmcc Exp $ + * $Revision: 1.4 $ + * $Date: 2001/08/23 03:52:18 $ * * ==================================================================== * @@ -63,7 +63,7 @@ import java.util.EmptyStackException; -import org.apache.commons.jpath.JPathContext; +import org.apache.commons.jxpath.JXPathContext; import org.apache.commons.workflow.Context; import org.apache.commons.workflow.StepException; import org.apache.commons.workflow.base.BaseStep; @@ -85,12 +85,12 @@ * Context.</li> * </ul> * - * <p><strong>WARNING</strong> - Due to current limitations in the JPath + * <p><strong>WARNING</strong> - Due to current limitations in the JXPath * implementation, you cannot use an <code>xpath</code> expression to create * a new bean in an appropriate Scope. Such an expression can only be used * to set a bean property of an existing bean.</p> * - * @version $Revision: 1.3 $ $Date: 2001/08/22 01:06:08 $ + * @version $Revision: 1.4 $ $Date: 2001/08/23 03:52:18 $ * @author Craig R. McClanahan */ @@ -210,7 +210,7 @@ // Use the XPath expression if specified if (xpath != null) { - JPathContext jpc = context.getJPathContext(); + JXPathContext jpc = context.getJXPathContext(); try { jpc.setValue("local/" + xpath, value); } catch (Throwable t) { 1.4 +6 -6 jakarta-commons-sandbox/workflow/src/java/org/apache/commons/workflow/io/DisplayStep.java Index: DisplayStep.java =================================================================== RCS file: /home/cvs/jakarta-commons-sandbox/workflow/src/java/org/apache/commons/workflow/io/DisplayStep.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- DisplayStep.java 2001/08/22 04:14:15 1.3 +++ DisplayStep.java 2001/08/23 03:52:18 1.4 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-commons-sandbox/workflow/src/java/org/apache/commons/workflow/io/DisplayStep.java,v 1.3 2001/08/22 04:14:15 craigmcc Exp $ - * $Revision: 1.3 $ - * $Date: 2001/08/22 04:14:15 $ + * $Header: /home/cvs/jakarta-commons-sandbox/workflow/src/java/org/apache/commons/workflow/io/DisplayStep.java,v 1.4 2001/08/23 03:52:18 craigmcc Exp $ + * $Revision: 1.4 $ + * $Date: 2001/08/23 03:52:18 $ * * ==================================================================== * @@ -62,7 +62,7 @@ package org.apache.commons.workflow.io; -import org.apache.commons.jpath.JPathContext; +import org.apache.commons.jxpath.JXPathContext; import org.apache.commons.workflow.Context; import org.apache.commons.workflow.StepException; import org.apache.commons.workflow.base.BaseStep; @@ -86,7 +86,7 @@ * Context.</li> * </ul> * - * @version $Revision: 1.3 $ $Date: 2001/08/22 04:14:15 $ + * @version $Revision: 1.4 $ $Date: 2001/08/23 03:52:18 $ * @author Craig R. McClanahan */ @@ -199,7 +199,7 @@ // Retrieve the specified bean value Object value = null; if (xpath != null) { - JPathContext jpc = context.getJPathContext(); + JXPathContext jpc = context.getJXPathContext(); value = jpc.getValue("local/" + xpath); } else { if (scope == null) { 1.7 +20 -20 jakarta-commons-sandbox/workflow/src/test/org/apache/commons/workflow/base/BaseContextTestCase.java Index: BaseContextTestCase.java =================================================================== RCS file: /home/cvs/jakarta-commons-sandbox/workflow/src/test/org/apache/commons/workflow/base/BaseContextTestCase.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- BaseContextTestCase.java 2001/08/22 01:38:11 1.6 +++ BaseContextTestCase.java 2001/08/23 03:52:18 1.7 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-commons-sandbox/workflow/src/test/org/apache/commons/workflow/base/BaseContextTestCase.java,v 1.6 2001/08/22 01:38:11 craigmcc Exp $ - * $Revision: 1.6 $ - * $Date: 2001/08/22 01:38:11 $ + * $Header: /home/cvs/jakarta-commons-sandbox/workflow/src/test/org/apache/commons/workflow/base/BaseContextTestCase.java,v 1.7 2001/08/23 03:52:18 craigmcc Exp $ + * $Revision: 1.7 $ + * $Date: 2001/08/23 03:52:18 $ * * ==================================================================== * @@ -67,7 +67,7 @@ import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; -import org.apache.commons.jpath.JPathContext; +import org.apache.commons.jxpath.JXPathContext; import org.apache.commons.workflow.Context; import org.apache.commons.workflow.Scope; @@ -77,7 +77,7 @@ * functions that are not dependent upon an associated Activity.</p> * * @author Craig R. McClanahan - * @version $Revision: 1.6 $ $Date: 2001/08/22 01:38:11 $ + * @version $Revision: 1.7 $ $Date: 2001/08/23 03:52:18 $ */ public class BaseContextTestCase extends TestCase { @@ -255,13 +255,13 @@ /** - * <p>Test the returned JPathContext for accessing items in the unified + * <p>Test the returned JXPathContext for accessing items in the unified * namespace.</p> * * <p><strong>WARNING:</strong> - Dependent upon how the Scopes associated - * with our Context are mapped to JPathContext objects.</p> + * with our Context are mapped to JXPathContext objects.</p> */ - public void testJPathContext() { + public void testJXPathContext() { // Set up an extra scope and put one object in each scope Scope extra = new BaseScope(); @@ -280,19 +280,19 @@ "This is extra0", context.get("extra0", Context.LOCAL_SCOPE + 1)); - // Extract the associated JPathContext - JPathContext jpc = context.getJPathContext(); - assertNotNull("Context can find JPathContext", jpc); - assertNotNull("JPathContext can find local", + // Extract the associated JXPathContext + JXPathContext jpc = context.getJXPathContext(); + assertNotNull("Context can find JXPathContext", jpc); + assertNotNull("JXPathContext can find local", jpc.getValue("local")); - assertNotNull("JPathContext can find extra", + assertNotNull("JXPathContext can find extra", jpc.getValue("local/extra")); - // Validate access using JPath access methods - assertEquals("JPathContext can find local0", + // Validate access using JXPath access methods + assertEquals("JXPathContext can find local0", "This is local0", (String) jpc.getValue("local/local0")); - assertEquals("JPathContext can find extra0", + assertEquals("JXPathContext can find extra0", "This is extra0", (String) jpc.getValue("local/extra/extra0")); @@ -300,9 +300,9 @@ /** - * Test basic JPath functionality that we rely on. + * Test basic JXPath functionality that we rely on. */ - public void testJPathFunctionality() { + public void testJXPathFunctionality() { Employee emp = new Employee("Test First Name", "Test Last Name"); Address homeAddress = new Address(); @@ -312,8 +312,8 @@ officeAddress.setZipCode("OfZip"); emp.addAddress("office", officeAddress); - JPathContext jpc = JPathContext.newContext(emp); - assertNotNull("Can create JPathContext", jpc); + JXPathContext jpc = JXPathContext.newContext(emp); + assertNotNull("Can create JXPathContext", jpc); assertEquals("Get firstName", "Test First Name", (String) jpc.getValue("firstName")); 1.2 +4 -5 jakarta-commons-sandbox/workflow/src/test/org/apache/commons/workflow/web/WebContextTestCase.java Index: WebContextTestCase.java =================================================================== RCS file: /home/cvs/jakarta-commons-sandbox/workflow/src/test/org/apache/commons/workflow/web/WebContextTestCase.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- WebContextTestCase.java 2001/08/22 04:52:46 1.1 +++ WebContextTestCase.java 2001/08/23 03:52:18 1.2 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-commons-sandbox/workflow/src/test/org/apache/commons/workflow/web/WebContextTestCase.java,v 1.1 2001/08/22 04:52:46 craigmcc Exp $ - * $Revision: 1.1 $ - * $Date: 2001/08/22 04:52:46 $ + * $Header: /home/cvs/jakarta-commons-sandbox/workflow/src/test/org/apache/commons/workflow/web/WebContextTestCase.java,v 1.2 2001/08/23 03:52:18 craigmcc Exp $ + * $Revision: 1.2 $ + * $Date: 2001/08/23 03:52:18 $ * * ==================================================================== * @@ -67,7 +67,6 @@ import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; -import org.apache.commons.jpath.JPathContext; import org.apache.commons.workflow.Context; import org.apache.commons.workflow.Scope; import org.apache.commons.workflow.base.BaseContextTestCase; @@ -78,7 +77,7 @@ * functions that are not dependent upon an associated Activity.</p> * * @author Craig R. McClanahan - * @version $Revision: 1.1 $ $Date: 2001/08/22 04:52:46 $ + * @version $Revision: 1.2 $ $Date: 2001/08/23 03:52:18 $ */ public class WebContextTestCase extends BaseContextTestCase {