[jbpm-commits] JBoss JBPM SVN: r1630 - in jbpm3/trunk: modules/jpdl/core/src/main/java/org/jbpm/integration/model and 1 other directory.

do-not-reply at jboss.org do-not-reply at jboss.org
Mon Jul 14 11:46:47 EDT 2008


Author: thomas.diesler at jboss.com
Date: 2008-07-14 11:46:47 -0400 (Mon, 14 Jul 2008)
New Revision: 1630

Removed:
   jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/model/EndEventImpl.java
   jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/model/ProcessImpl.java
   jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/model/StartEventImpl.java
   jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/model/TaskImpl.java
Modified:
   jbpm3/trunk/.classpath
   jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/model/ProcessAdapter.java
Log:
Seperate JAXB from Impl hirarchy

Modified: jbpm3/trunk/.classpath
===================================================================
--- jbpm3/trunk/.classpath	2008-07-14 15:46:35 UTC (rev 1629)
+++ jbpm3/trunk/.classpath	2008-07-14 15:46:47 UTC (rev 1630)
@@ -1,8 +1,35 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
 	<classpathentry kind="src" output="modules/jpdl/core/target/classes" path="modules/jpdl/core/src/main/java"/>
-	<classpathentry kind="src" output="modules/jpdl/core/target/test-classes" path="modules/jpdl/core/src/testsuite/java"/>
 	<classpathentry kind="src" output="modules/jpdl/core/target/test-classes" path="modules/jpdl/core/src/test/java"/>
+	<classpathentry excluding="**" kind="src" output="modules/jpdl/core/target/classes" path="modules/jpdl/core/src/main/resources"/>
+	<classpathentry excluding="**" kind="src" output="modules/jpdl/core/target/test-classes" path="modules/jpdl/core/src/test/resources"/>
+	<classpathentry excluding="**" kind="src" output="modules/jpdl/core/target/test-classes" path="modules/jpdl/core/src/testsuite/resources"/>
+	<classpathentry excluding="**" kind="src" output="modules/jpdl/db/target/classes" path="modules/jpdl/db/src/main/resources"/>
+	<classpathentry kind="src" output="modules/jpdl/examples/target/test-classes" path="modules/jpdl/examples/src/test/java"/>
+	<classpathentry excluding="**" kind="src" output="modules/jpdl/examples/target/test-classes" path="modules/jpdl/examples/src/test/resources"/>
+	<classpathentry kind="src" output="modules/jpdl/identity/target/classes" path="modules/jpdl/identity/src/main/java"/>
+	<classpathentry kind="src" output="modules/jpdl/identity/target/test-classes" path="modules/jpdl/identity/src/test/java"/>
+	<classpathentry excluding="**" kind="src" output="modules/jpdl/identity/target/classes" path="modules/jpdl/identity/src/main/resources"/>
+	<classpathentry excluding="**" kind="src" output="modules/jpdl/identity/target/test-classes" path="modules/jpdl/identity/src/test/resources"/>
+	<classpathentry kind="src" output="modules/jpdl/simulation/target/classes" path="modules/jpdl/simulation/src/main/java"/>
+	<classpathentry kind="src" output="modules/jpdl/simulation/target/test-classes" path="modules/jpdl/simulation/src/test/java"/>
+	<classpathentry excluding="**" kind="src" output="modules/jpdl/simulation/target/classes" path="modules/jpdl/simulation/src/main/resources"/>
+	<classpathentry kind="src" output="modules/jpdl/ws/target/classes" path="modules/jpdl/ws/src/main/java"/>
+	<classpathentry excluding="**" kind="src" output="modules/jpdl/ws/target/classes" path="modules/jpdl/ws/src/main/resources"/>
+	<classpathentry excluding="**" kind="src" output="modules/console/target/classes" path="modules/console/src/main/resources"/>
+	<classpathentry kind="src" output="modules/enterprise/target/classes" path="modules/enterprise/src/main/java"/>
+	<classpathentry kind="src" output="modules/enterprise/target/test-classes" path="modules/enterprise/src/test/java"/>
+	<classpathentry excluding="**" kind="src" output="modules/enterprise/target/classes" path="modules/enterprise/src/main/resources"/>
+	<classpathentry excluding="**" kind="src" output="modules/enterprise/target/test-classes" path="modules/enterprise/src/test/resources"/>
+	<classpathentry kind="src" output="modules/jbpm4jsf/target/classes" path="modules/jbpm4jsf/src/main/java"/>
+	<classpathentry excluding="**" kind="src" output="modules/jbpm4jsf/target/classes" path="modules/jbpm4jsf/src/main/resources"/>
+	<classpathentry kind="src" output="modules/bamconsole/ejb/target/classes" path="modules/bamconsole/ejb/src/main/java"/>
+	<classpathentry kind="src" output="modules/bamconsole/ejb/target/test-classes" path="modules/bamconsole/ejb/src/test/java"/>
+	<classpathentry excluding="**" kind="src" output="modules/bamconsole/ejb/target/classes" path="modules/bamconsole/ejb/src/main/resources"/>
+	<classpathentry excluding="**" kind="src" output="modules/bamconsole/ejb/target/test-classes" path="modules/bamconsole/ejb/src/test/resources"/>
+	<classpathentry excluding="**" kind="src" output="modules/bamconsole/war/target/classes" path="modules/bamconsole/war/src/main/resources"/>
+	<classpathentry excluding="**" kind="src" output="modules/bamconsole/ear/target/classes" path="modules/bamconsole/ear/src/main/resources"/>
 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
 	<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
 	<classpathentry kind="output" path="target/classes"/>

Deleted: jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/model/EndEventImpl.java
===================================================================
--- jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/model/EndEventImpl.java	2008-07-14 15:46:35 UTC (rev 1629)
+++ jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/model/EndEventImpl.java	2008-07-14 15:46:47 UTC (rev 1630)
@@ -1,54 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.integration.model;
-
-//$Id$
-
-import org.jboss.bpm.model.EndEvent;
-import org.jboss.bpm.model.Process;
-import org.jbpm.graph.def.Node;
-
-/**
- * TODO
- * 
- * @author thomas.diesler at jboss.com
- * @since 18-Jun-2008
- */
-public class EndEventImpl extends EndEvent
-{
-  private Node oldNode;
-  
-  EndEventImpl(Process proc, Node oldNode)
-  {
-    this.oldNode = oldNode;
-  }
-
-  public String getName()
-  {
-    return oldNode.getName();
-  }
-
-  public void setName(String name)
-  {
-    oldNode.setName(name);
-  }
-}

Modified: jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/model/ProcessAdapter.java
===================================================================
--- jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/model/ProcessAdapter.java	2008-07-14 15:46:35 UTC (rev 1629)
+++ jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/model/ProcessAdapter.java	2008-07-14 15:46:47 UTC (rev 1630)
@@ -28,11 +28,18 @@
 
 import org.jboss.bpm.InvalidProcessException;
 import org.jboss.bpm.model.ExecutionHandler;
+import org.jboss.bpm.model.Flow;
 import org.jboss.bpm.model.FlowObject;
 import org.jboss.bpm.model.MultipleOutFlowSupport;
 import org.jboss.bpm.model.Process;
-import org.jboss.bpm.model.SequenceFlow;
 import org.jboss.bpm.model.SingleOutFlowSupport;
+import org.jboss.bpm.model.internal.EndEventImpl;
+import org.jboss.bpm.model.internal.ExecutionHandlerImpl;
+import org.jboss.bpm.model.internal.ProcessImpl;
+import org.jboss.bpm.model.internal.SequenceFlowImpl;
+import org.jboss.bpm.model.internal.StartEventImpl;
+import org.jboss.bpm.model.internal.TaskImpl;
+import org.jboss.bpm.model.internal.jaxb.JAXBExecutionHandler;
 import org.jbpm.graph.def.Action;
 import org.jbpm.graph.def.Event;
 import org.jbpm.graph.def.Node;
@@ -52,7 +59,7 @@
 
   public static Process buildProcess(org.jbpm.graph.def.ProcessDefinition oldPD)
   {
-    ProcessImpl apiProc = new ProcessImpl(oldPD);
+    ProcessImpl apiProc = new ProcessImpl(oldPD.getName());
     List<org.jbpm.graph.def.Node> oldNodes = oldPD.getNodes();
     for (org.jbpm.graph.def.Node oldNode : oldNodes)
     {
@@ -69,17 +76,17 @@
       FlowObject flowObject;
       if (oldNode instanceof StartState)
       {
-        flowObject = new StartEventImpl(apiProc, oldNode);
+        flowObject = new StartEventImpl();
         initTranstions(flowObject, oldNode);
       }
       else if (oldNode instanceof EndState)
       {
-        flowObject = new EndEventImpl(apiProc, oldNode);
+        flowObject = new EndEventImpl(oldNode.getName());
         initTranstions(flowObject, oldNode);
       }
       else if (oldNode instanceof State)
       {
-        ExecutionHandler delegate = null;
+        flowObject = new TaskImpl(oldNode.getName());
         Event event = oldNode.getEvent(Event.EVENTTYPE_NODE_ENTER);
         if (event != null)
         {
@@ -94,10 +101,10 @@
           if (obj instanceof ExecutionHandler == false)
             throw new InvalidProcessException("Node action is not of type ExecutionHandler");
 
-          delegate = (ExecutionHandler)obj;
-          delegate.setClassName(obj.getClass().getName());
+          JAXBExecutionHandler jaxbHandler = new JAXBExecutionHandler();
+          jaxbHandler.setClassName(obj.getClass().getName());
+          ((TaskImpl)flowObject).setExecutionHandler(new ExecutionHandlerImpl(jaxbHandler));
         }
-        flowObject = new TaskImpl(apiProc, oldNode, delegate);
         initTranstions(flowObject, oldNode);
       }
       else
@@ -116,7 +123,7 @@
         if (outTrans != null && outTrans.size() > 0)
         {
           Transition trans = (Transition)outTrans.get(0);
-          SequenceFlow flow = new SequenceFlow(trans.getTo().getName());
+          Flow flow = new SequenceFlowImpl(trans.getTo().getName());
           sof.setOutFlow(flow);
         }
       }
@@ -130,7 +137,7 @@
           while (it.hasNext())
           {
             Transition trans = (Transition)it.next();
-            SequenceFlow flow = new SequenceFlow(trans.getTo().getName());
+            Flow flow = new SequenceFlowImpl(trans.getTo().getName());
             mof.addOutFlow(flow);
           }
         }

Deleted: jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/model/ProcessImpl.java
===================================================================
--- jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/model/ProcessImpl.java	2008-07-14 15:46:35 UTC (rev 1629)
+++ jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/model/ProcessImpl.java	2008-07-14 15:46:47 UTC (rev 1630)
@@ -1,72 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.integration.model;
-
-//$Id$
-
-import org.jboss.bpm.client.ProcessManager;
-import org.jboss.bpm.model.FlowObject;
-import org.jboss.bpm.model.Process;
-import org.jbpm.graph.def.ProcessDefinition;
-
-/**
- * An implementation of a Process
- * 
- * @author thomas.diesler at jboss.com
- * @since 18-Jun-2008
- */
-public class ProcessImpl extends Process
-{
-  private ProcessDefinition oldPD;
-  
-  public ProcessImpl(ProcessDefinition oldPD)
-  {
-    this.oldPD = oldPD;
-    initName(oldPD.getName());
-  }
-
-  private void initName(String name)
-  {
-    if (name == null)
-    {
-      ProcessManager pdm = ProcessManager.locateProcessManager();
-      name = "AnonymousProcess#" + pdm.getProcesses().size();
-      setName(name);
-    }
-  }
-
-  // Provide public access
-  public void addFlowObject(FlowObject flowObject)
-  {
-    super.addFlowObject(flowObject);
-  }
-
-  public String getName()
-  {
-    return oldPD.getName();
-  }
-
-  public void setName(String name)
-  {
-    oldPD.setName(name);
-  }
-}

Deleted: jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/model/StartEventImpl.java
===================================================================
--- jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/model/StartEventImpl.java	2008-07-14 15:46:35 UTC (rev 1629)
+++ jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/model/StartEventImpl.java	2008-07-14 15:46:47 UTC (rev 1630)
@@ -1,44 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.integration.model;
-
-//$Id$
-
-import org.jboss.bpm.model.Process;
-import org.jboss.bpm.model.StartEvent;
-import org.jbpm.graph.def.Node;
-
-/**
- * TODO
- * 
- * @author thomas.diesler at jboss.com
- * @since 18-Jun-2008
- */
-public class StartEventImpl extends StartEvent
-{
-  private Node oldNode;
-
-  StartEventImpl(Process proc, Node oldNode)
-  {
-    this.oldNode = oldNode;
-  }
-}

Deleted: jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/model/TaskImpl.java
===================================================================
--- jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/model/TaskImpl.java	2008-07-14 15:46:35 UTC (rev 1629)
+++ jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/model/TaskImpl.java	2008-07-14 15:46:47 UTC (rev 1630)
@@ -1,56 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.integration.model;
-
-//$Id$
-
-import org.jboss.bpm.model.ExecutionHandler;
-import org.jboss.bpm.model.Process;
-import org.jboss.bpm.model.Task;
-import org.jbpm.graph.def.Node;
-
-/**
- * A jBPM3 implementation of a flow object
- * 
- * @author thomas.diesler at jboss.com
- * @since 18-Jun-2008
- */
-public class TaskImpl extends Task
-{
-  private Node oldNode;
-
-  TaskImpl(Process proc, Node oldNode, ExecutionHandler handler)
-  {
-    this.oldNode = oldNode;
-    setExecutionHandler(handler);
-  }
-
-  public String getName()
-  {
-    return oldNode.getName();
-  }
-
-  public void setName(String name)
-  {
-    oldNode.setName(name);
-  }
-}




More information about the jbpm-commits mailing list