[jbpm-commits] JBoss JBPM SVN: r4336 - in jbpm4/branches/tbaeyens/modules: api/src/main/java/org/jbpm/session and 11 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Thu Mar 26 15:16:56 EDT 2009


Author: tom.baeyens at jboss.com
Date: 2009-03-26 15:16:56 -0400 (Thu, 26 Mar 2009)
New Revision: 4336

Added:
   jbpm4/branches/tbaeyens/modules/api/src/main/java/org/jbpm/RepositoryService.java
   jbpm4/branches/tbaeyens/modules/api/src/main/java/org/jbpm/session/RepositorySession.java
   jbpm4/branches/tbaeyens/modules/distro/src/main/resources/config-tool/hibernate/mapping.files/jbpm.repository.hbm.xml
   jbpm4/branches/tbaeyens/modules/examples/src/test/resources/jbpm.repository.hbm.xml
   jbpm4/branches/tbaeyens/modules/integration/spi/src/main/java/org/jbpm/integration/spi/DeploymentRef.java
   jbpm4/branches/tbaeyens/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/xml/JpdlDeployerBinding.java
   jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/RepositoryCacheBinding.java
   jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/RepositoryServiceBinding.java
   jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/RepositorySessionBinding.java
Removed:
   jbpm4/branches/tbaeyens/modules/integration/spi/src/main/java/org/jbpm/integration/spi/ProcessDeploymentRef.java
   jbpm4/branches/tbaeyens/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/deploy/ParseJpdlDeployer.java
   jbpm4/branches/tbaeyens/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/xml/ParseJpdlBinding.java
   jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/deploy/AssignFileTypeDeployer.java
   jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/deploy/CheckProblemsDeployer.java
   jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/deploy/CheckProcessDeployer.java
   jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/deploy/Deployer.java
   jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/deploy/DeployerManager.java
   jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/deploy/SaveDeployer.java
   jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/repository/DeployExecutionService.java
   jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/repository/StartExecutionInLatestCmd.java
   jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/repository/api/Deployment.java
   jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/repository/api/RepositoryService.java
   jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/repository/api/RepositorySession.java
   jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/DeploymentImpl.java
   jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/AssignFileTypesBinding.java
   jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/CheckProblemsBinding.java
   jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/CheckProcessBinding.java
   jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/SaveBinding.java
   jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/descriptor/DeployerManagerDescriptor.java
Log:
revisiting deployment

Added: jbpm4/branches/tbaeyens/modules/api/src/main/java/org/jbpm/RepositoryService.java
===================================================================
--- jbpm4/branches/tbaeyens/modules/api/src/main/java/org/jbpm/RepositoryService.java	                        (rev 0)
+++ jbpm4/branches/tbaeyens/modules/api/src/main/java/org/jbpm/RepositoryService.java	2009-03-26 19:16:56 UTC (rev 4336)
@@ -0,0 +1,37 @@
+/*
+ * 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;
+
+
+
+/**
+ * @author Tom Baeyens
+ */
+public interface RepositoryService {
+
+  Deployment createDeployment();
+
+  void deleteDeployment(long deploymentDbid);
+
+  byte[] getResource(long deploymentDbid, String resourceName);
+
+}
\ No newline at end of file


Property changes on: jbpm4/branches/tbaeyens/modules/api/src/main/java/org/jbpm/RepositoryService.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: jbpm4/branches/tbaeyens/modules/api/src/main/java/org/jbpm/session/RepositorySession.java
===================================================================
--- jbpm4/branches/tbaeyens/modules/api/src/main/java/org/jbpm/session/RepositorySession.java	                        (rev 0)
+++ jbpm4/branches/tbaeyens/modules/api/src/main/java/org/jbpm/session/RepositorySession.java	2009-03-26 19:16:56 UTC (rev 4336)
@@ -0,0 +1,41 @@
+/*
+ * 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.session;
+
+import java.util.List;
+
+import org.jbpm.Deployment;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public interface RepositorySession {
+
+  Object getObject(long deploymentDbid, String objectName);
+
+  long deploy(Deployment deployment);
+
+  List<String> findObjectNames(String propertyKey, String propertyValue);
+  List<String> findObjectPropertyValues(String objectName, String propertyKey);
+  Object findObjectByPropertyValue(String propertyKey, String propertyValue);
+}


Property changes on: jbpm4/branches/tbaeyens/modules/api/src/main/java/org/jbpm/session/RepositorySession.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: jbpm4/branches/tbaeyens/modules/distro/src/main/resources/config-tool/hibernate/mapping.files/jbpm.repository.hbm.xml
===================================================================
--- jbpm4/branches/tbaeyens/modules/distro/src/main/resources/config-tool/hibernate/mapping.files/jbpm.repository.hbm.xml	                        (rev 0)
+++ jbpm4/branches/tbaeyens/modules/distro/src/main/resources/config-tool/hibernate/mapping.files/jbpm.repository.hbm.xml	2009-03-26 19:16:56 UTC (rev 4336)
@@ -0,0 +1,49 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping default-access="field">
+
+  <!-- ### Deployment ##################################################### -->
+  <class name="org.jbpm.pvm.internal.repository.DeploymentImpl" 
+         table="JBPM_DEPLOYMENT">
+
+    <!-- ProcessElementImpl part ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+    <id name="dbid" column="DBID_">
+      <generator class="native" />
+    </id>
+
+    <property name="name" column="NAME_" />
+    <property name="timestamp" column="TIMESTAMP_" />
+
+    <map name="resources" cascade="all-delete-orphan">
+      <key foreign-key="FK_LOB_DEPLOYMENT">
+        <column name="DEPLOYMENT_" index="IDX_LOB_DEPLOYMENT" />
+      </key>
+      <map-key type="string" column="NAME_" />
+      <one-to-many class="org.jbpm.pvm.internal.lob.Lob"/>
+    </map>
+    
+    <set name="objectProperties" 
+         table="JBPM_DEPLOYPROPS" 
+         cascade="all">
+      <key column="DEPLOYMENT_" />
+      <one-to-many class="org.jbpm.pvm.internal.repository.DeploymentProperty" />
+    </set>
+
+  </class>
+
+  <class name="org.jbpm.pvm.internal.repository.DeploymentProperty" table="JBPM_DEPLOYPROP">
+    <id name="dbid" column="DBID_">
+      <generator class="native" />
+    </id>
+    <many-to-one name="deployment" 
+                 class="org.jbpm.pvm.internal.repository.DeploymentImpl" 
+                 column="DEPLOYMENT_"
+                 foreign-key="FK_DEPLPROP_DEPL"
+                 index="IDX_DEPLPROP_DEPL" />
+    <property name="objectName" column="OBJNAME_" />
+    <property name="key" column="KEY_" />
+    <property name="value" column="VALUE_" />
+  </class> 
+
+</hibernate-mapping>
\ No newline at end of file


Property changes on: jbpm4/branches/tbaeyens/modules/distro/src/main/resources/config-tool/hibernate/mapping.files/jbpm.repository.hbm.xml
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: jbpm4/branches/tbaeyens/modules/examples/src/test/resources/jbpm.repository.hbm.xml
===================================================================
--- jbpm4/branches/tbaeyens/modules/examples/src/test/resources/jbpm.repository.hbm.xml	                        (rev 0)
+++ jbpm4/branches/tbaeyens/modules/examples/src/test/resources/jbpm.repository.hbm.xml	2009-03-26 19:16:56 UTC (rev 4336)
@@ -0,0 +1,49 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping default-access="field">
+
+  <!-- ### Deployment ##################################################### -->
+  <class name="org.jbpm.pvm.internal.repository.DeploymentImpl" 
+         table="JBPM_DEPLOYMENT">
+
+    <!-- ProcessElementImpl part ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+    <id name="dbid" column="DBID_">
+      <generator class="native" />
+    </id>
+
+    <property name="name" column="NAME_" />
+    <property name="timestamp" column="TIMESTAMP_" />
+
+    <map name="resources" cascade="all-delete-orphan">
+      <key foreign-key="FK_LOB_DEPLOYMENT">
+        <column name="DEPLOYMENT_" index="IDX_LOB_DEPLOYMENT" />
+      </key>
+      <map-key type="string" column="NAME_" />
+      <one-to-many class="org.jbpm.pvm.internal.lob.Lob"/>
+    </map>
+    
+    <set name="objectProperties" 
+         table="JBPM_DEPLOYPROPS" 
+         cascade="all">
+      <key column="DEPLOYMENT_" />
+      <one-to-many class="org.jbpm.pvm.internal.repository.DeploymentProperty" />
+    </set>
+
+  </class>
+
+  <class name="org.jbpm.pvm.internal.repository.DeploymentProperty" table="JBPM_DEPLOYPROP">
+    <id name="dbid" column="DBID_">
+      <generator class="native" />
+    </id>
+    <many-to-one name="deployment" 
+                 class="org.jbpm.pvm.internal.repository.DeploymentImpl" 
+                 column="DEPLOYMENT_"
+                 foreign-key="FK_DEPLPROP_DEPL"
+                 index="IDX_DEPLPROP_DEPL" />
+    <property name="objectName" column="OBJNAME_" />
+    <property name="key" column="KEY_" />
+    <property name="value" column="VALUE_" />
+  </class> 
+
+</hibernate-mapping>
\ No newline at end of file


Property changes on: jbpm4/branches/tbaeyens/modules/examples/src/test/resources/jbpm.repository.hbm.xml
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: jbpm4/branches/tbaeyens/modules/integration/spi/src/main/java/org/jbpm/integration/spi/DeploymentRef.java
===================================================================
--- jbpm4/branches/tbaeyens/modules/integration/spi/src/main/java/org/jbpm/integration/spi/DeploymentRef.java	                        (rev 0)
+++ jbpm4/branches/tbaeyens/modules/integration/spi/src/main/java/org/jbpm/integration/spi/DeploymentRef.java	2009-03-26 19:16:56 UTC (rev 4336)
@@ -0,0 +1,54 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.spi;
+
+/**
+ * Retains with a deployer for undeployment calls.
+ * 
+ * @author Heiko.Braun <heiko.braun at jboss.com>
+ */
+public final class DeploymentRef
+{
+  private long deploymentDbid;
+  private String location;
+
+  public DeploymentRef(long deploymentDbid, String location)
+  {
+    this.deploymentDbid = deploymentDbid;
+    this.location = location;
+  }
+
+  public String toString()
+  {
+    return "DeploymentRef {dbid="+deploymentDbid+", location="+location+"}";
+  }
+
+  public long getDeploymentDbid() 
+  {
+    return deploymentDbid;
+  }
+
+  public String getLocation()
+  {
+    return location;
+  }
+}


Property changes on: jbpm4/branches/tbaeyens/modules/integration/spi/src/main/java/org/jbpm/integration/spi/DeploymentRef.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Deleted: jbpm4/branches/tbaeyens/modules/integration/spi/src/main/java/org/jbpm/integration/spi/ProcessDeploymentRef.java
===================================================================
--- jbpm4/branches/tbaeyens/modules/integration/spi/src/main/java/org/jbpm/integration/spi/ProcessDeploymentRef.java	2009-03-26 16:05:51 UTC (rev 4335)
+++ jbpm4/branches/tbaeyens/modules/integration/spi/src/main/java/org/jbpm/integration/spi/ProcessDeploymentRef.java	2009-03-26 19:16:56 UTC (rev 4336)
@@ -1,61 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.spi;
-
-/**
- * Retains with a deployer for undeployment calls.
- * 
- * @author Heiko.Braun <heiko.braun at jboss.com>
- */
-public final class ProcessDeploymentRef
-{
-  private String processId;
-  private int version;
-  private String location;
-
-  public ProcessDeploymentRef(String processId, int version, String location)
-  {
-    this.processId = processId;
-    this.version = version;
-    this.location = location;
-  }
-
-  public String toString()
-  {
-    return "ProcessDeploymentRef {id="+processId+", version="+version+", location="+location+"}";
-  }
-
-  public String getProcessId()
-  {
-    return processId;
-  }
-
-  public int getVersion()
-  {
-    return version;
-  }
-
-  public String getLocation()
-  {
-    return location;
-  }
-}

Deleted: jbpm4/branches/tbaeyens/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/deploy/ParseJpdlDeployer.java
===================================================================
--- jbpm4/branches/tbaeyens/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/deploy/ParseJpdlDeployer.java	2009-03-26 16:05:51 UTC (rev 4335)
+++ jbpm4/branches/tbaeyens/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/deploy/ParseJpdlDeployer.java	2009-03-26 19:16:56 UTC (rev 4336)
@@ -1,57 +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.jpdl.internal.deploy;
-
-import org.jbpm.ProcessDefinition;
-import org.jbpm.jpdl.internal.xml.JpdlParser;
-import org.jbpm.pvm.internal.deploy.Deployer;
-import org.jbpm.pvm.internal.svc.DeploymentImpl;
-import org.jbpm.pvm.internal.xml.Parse;
-
-
-/**
- * @author Tom Baeyens
- */
-public class ParseJpdlDeployer implements Deployer {
-
-  static JpdlParser jpdlParser = new JpdlParser();
-
-  public void deploy(DeploymentImpl deployment) {
-    for (String fileName: deployment.getFileNamesForType("jpdl")) {
-      // parse them 
-      Parse parse = jpdlParser.createParse();
-      parse.setProblems(deployment.getProblems());
-      parse.setInputStream(deployment.getFile(fileName));
-      parse.execute();
-      
-      // add the parsed xml dom to the deployment documents
-      // so that other subsequent deployers can just use the dom
-      // instead of reparsing the whole jpdl.xml file
-      deployment.addDocument(fileName, parse.getDocument());
-
-      // add the parsed process definition to the processDefinitions
-      // this is where the save process deployer will find it
-      ProcessDefinition processDefinition = (ProcessDefinition) parse.getDocumentObject();
-      deployment.addProcessDefinition(processDefinition);
-    }
-  }
-}

Added: jbpm4/branches/tbaeyens/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/xml/JpdlDeployerBinding.java
===================================================================
--- jbpm4/branches/tbaeyens/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/xml/JpdlDeployerBinding.java	                        (rev 0)
+++ jbpm4/branches/tbaeyens/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/xml/JpdlDeployerBinding.java	2009-03-26 19:16:56 UTC (rev 4336)
@@ -0,0 +1,44 @@
+/*
+ * 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.jpdl.internal.xml;
+
+import org.jbpm.jpdl.internal.repository.JpdlDeployer;
+import org.jbpm.pvm.internal.wire.binding.WireDescriptorBinding;
+import org.jbpm.pvm.internal.wire.descriptor.ObjectDescriptor;
+import org.jbpm.pvm.internal.xml.Parse;
+import org.jbpm.pvm.internal.xml.Parser;
+import org.w3c.dom.Element;
+
+/**
+ * @author Tom Baeyens
+ */
+public class JpdlDeployerBinding extends WireDescriptorBinding {
+
+  public JpdlDeployerBinding() {
+    super("jpdl-deployer");
+  }
+
+  public Object parse(Element element, Parse parse, Parser parser) {
+    return new ObjectDescriptor(JpdlDeployer.class);
+  }
+
+}


Property changes on: jbpm4/branches/tbaeyens/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/xml/JpdlDeployerBinding.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Deleted: jbpm4/branches/tbaeyens/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/xml/ParseJpdlBinding.java
===================================================================
--- jbpm4/branches/tbaeyens/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/xml/ParseJpdlBinding.java	2009-03-26 16:05:51 UTC (rev 4335)
+++ jbpm4/branches/tbaeyens/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/xml/ParseJpdlBinding.java	2009-03-26 19:16:56 UTC (rev 4336)
@@ -1,45 +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.jpdl.internal.xml;
-
-import org.jbpm.jpdl.internal.deploy.ParseJpdlDeployer;
-import org.jbpm.pvm.internal.wire.binding.WireDescriptorBinding;
-import org.jbpm.pvm.internal.wire.descriptor.ObjectDescriptor;
-import org.jbpm.pvm.internal.xml.Parse;
-import org.jbpm.pvm.internal.xml.Parser;
-import org.w3c.dom.Element;
-
-
-/**
- * @author Tom Baeyens
- */
-public class ParseJpdlBinding extends WireDescriptorBinding {
-
-  public ParseJpdlBinding() {
-    super("parse-jpdl");
-  }
-
-  public Object parse(Element element, Parse parse, Parser parser) {
-    return new ObjectDescriptor(ParseJpdlDeployer.class);
-  }
-
-}

Deleted: jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/deploy/AssignFileTypeDeployer.java
===================================================================
--- jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/deploy/AssignFileTypeDeployer.java	2009-03-26 16:05:51 UTC (rev 4335)
+++ jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/deploy/AssignFileTypeDeployer.java	2009-03-26 19:16:56 UTC (rev 4336)
@@ -1,59 +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.pvm.internal.deploy;
-
-import java.io.Serializable;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.jbpm.pvm.internal.svc.DeploymentImpl;
-
-/**
- * @author Tom Baeyens
- */
-public class AssignFileTypeDeployer implements Deployer, Serializable {
-  
-  /* maps extensions to file types */
-  Map<String, String> fileTypes = new HashMap<String, String>();
-
-  private static final long serialVersionUID = 1L;
-
-  public void deploy(DeploymentImpl deployment) {
-    for (String fileName: deployment.getFileNames()) {
-      for (String extension: fileTypes.keySet()) {
-        if (fileName.endsWith(extension)) {
-          String fileType = fileTypes.get(extension);
-          deployment.setFileType(fileName, fileType);
-          break;
-        }
-      }
-    }
-  }
-
-  public void addFileType(String extension, String fileType) {
-    fileTypes.put(extension, fileType);  
-  }
-
-  public String toString() {
-    return "assign-file-type";
-  }
-}

Deleted: jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/deploy/CheckProblemsDeployer.java
===================================================================
--- jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/deploy/CheckProblemsDeployer.java	2009-03-26 16:05:51 UTC (rev 4335)
+++ jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/deploy/CheckProblemsDeployer.java	2009-03-26 19:16:56 UTC (rev 4336)
@@ -1,55 +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.pvm.internal.deploy;
-
-import java.io.Serializable;
-
-import org.jbpm.JbpmException;
-import org.jbpm.Problem;
-import org.jbpm.internal.log.Log;
-import org.jbpm.pvm.internal.svc.DeploymentImpl;
-
-
-/**
- * @author Tom Baeyens
- */
-public class CheckProblemsDeployer implements Deployer, Serializable {
-  
-  private static final Log log = Log.getLog(CheckProblemsDeployer.class.getName());
-  private static final long serialVersionUID = 1L;
-
-  public void deploy(DeploymentImpl deployment) {
-    if (deployment.hasProblems()) {
-      for (Problem problem: deployment.getProblems()) {
-        Throwable cause = problem.getCause();
-        if (cause!=null) {
-          log.debug("deployment exception", cause);
-        }
-      }
-      throw new JbpmException("problems during deployment: "+deployment.getProblemsText());
-    }
-  }
-
-  public String toString() {
-    return "check-problems";
-  }
-}

Deleted: jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/deploy/CheckProcessDeployer.java
===================================================================
--- jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/deploy/CheckProcessDeployer.java	2009-03-26 16:05:51 UTC (rev 4335)
+++ jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/deploy/CheckProcessDeployer.java	2009-03-26 19:16:56 UTC (rev 4336)
@@ -1,152 +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.pvm.internal.deploy;
-
-import java.io.Serializable;
-
-import org.jbpm.ProcessDefinition;
-import org.jbpm.client.ClientProcessDefinition;
-import org.jbpm.env.Environment;
-import org.jbpm.internal.log.Log;
-import org.jbpm.pvm.internal.model.ProcessDefinitionImpl;
-import org.jbpm.pvm.internal.svc.DeploymentImpl;
-import org.jbpm.pvm.internal.wire.binding.CheckProcessBinding;
-import org.jbpm.session.PvmDbSession;
-
-/**
- * @author Tom Baeyens
- */
-public class CheckProcessDeployer implements Deployer, Serializable {
- 
-  private static final long serialVersionUID = 1L;
-  private static final Log log = Log.getLog(CheckProcessDeployer.class.getName());
-  
-  protected boolean assignVersion = true;
-  protected boolean assignKey = true;
-
-  public void deploy(DeploymentImpl deployment) {
-    Environment environment = Environment.getCurrent();
-    if (environment==null) {
-      deployment.addProblem("environment is required by deployer "+CheckProcessBinding.TAG);
-      return;
-    }
-
-    PvmDbSession pvmDbSession = environment.get(PvmDbSession.class);
-    if (pvmDbSession==null) {
-      deployment.addProblem(PvmDbSession.class.getName()+" is required in the environment by deployer "+CheckProcessBinding.TAG);
-      return;
-    }
-    
-    for (ProcessDefinition processDefinition : deployment.getProcessDefinitions()) {
-      checkProcessDefinition(processDefinition, deployment, pvmDbSession);
-    }
-  }
-
-  public void checkProcessDefinition(ProcessDefinition processDefinition, DeploymentImpl deployment, PvmDbSession pvmDbSession) {
-    if ( (processDefinition.getName()==null)
-          || ("".equals(processDefinition.getName()))
-       ) {
-      // A problem was already added by the JpdlParser
-      return;
-    }
-
-    checkKey((ProcessDefinitionImpl)processDefinition, deployment, pvmDbSession);
-    checkVersion((ProcessDefinitionImpl)processDefinition, deployment, pvmDbSession);
-    checkId((ProcessDefinitionImpl)processDefinition, deployment, pvmDbSession);
-  }
-
-  protected void checkKey(ProcessDefinitionImpl processDefinition, DeploymentImpl deployment, PvmDbSession pvmDbSession) {
-    String name = processDefinition.getName();
-    String key = processDefinition.getKey();
-    if ( (key==null)
-         && assignKey
-       ) {
-      // replace any non-word character with an underscore
-      key = name.replaceAll("\\W", "_");
-
-      processDefinition.setKey(key);
-    }
-    
-    String existingKey = pvmDbSession.findProcessDefinitionKeyByName(name);
-    if ( (existingKey!=null)
-         && (!existingKey.equals(key))
-       ) {
-      deployment.addProblem("invalid key '"+key+"' in process "+processDefinition.getName()+".  Existing process has name '"+name+"' and key '"+existingKey+"'");
-    }
-
-    String existingName = pvmDbSession.findProcessDefinitionNameByKey(key);
-    if ( (existingName!=null)
-         && (!existingName.equals(name))
-       ) {
-      deployment.addProblem("invalid name '"+name+"' in process "+processDefinition.getName()+".  Existing process has name '"+existingName+"' and key '"+key+"'");
-    }
-  }
-
-  protected void checkVersion(ProcessDefinitionImpl processDefinition, DeploymentImpl deployment, PvmDbSession pvmDbSession) {
-    int version = processDefinition.getVersion();
-    String key = processDefinition.getKey();
-    if ( (version==ProcessDefinitionImpl.UNASSIGNED_VERSION)
-         && ! assignVersion
-       ) {
-      deployment.addProblem("no version specified in process definition "+key);
-    }
-      
-    if ( (version==ProcessDefinitionImpl.UNASSIGNED_VERSION)
-        && assignVersion
-       ) {
-      ClientProcessDefinition latestDeployedVersion = pvmDbSession.findLatestProcessDefinitionByKey(key);
-      if (latestDeployedVersion!=null) {
-        version = latestDeployedVersion.getVersion() + 1;
-      } else {
-        version = 1;
-      }
-      log.debug("assigning version "+version+" to process definition "+key);
-      processDefinition.setVersion(version);
-
-    }
-  }
-
-  protected void checkId(ProcessDefinitionImpl processDefinition, DeploymentImpl deployment, PvmDbSession pvmDbSession) {
-    String id = processDefinition.getId();
-    if (id==null) {
-      id = processDefinition.getKey()+"-"+processDefinition.getVersion();
-      log.trace("created id '"+id+"' for "+processDefinition);
-      processDefinition.setId(id);
-    }
-    
-    if (pvmDbSession.findProcessDefinitionById(id) != null) {
-      deployment.addProblem("process '" + id + "' already exists");
-    }
-  }
-
-  public void setAssignVersion(boolean assignVersion) {
-    this.assignVersion = assignVersion;
-  }
-
-  public void setAssignKey(boolean assignKey) {
-    this.assignKey = assignKey;
-  }
-
-  public String toString() {
-    return "check-process";
-  }
-}

Deleted: jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/deploy/Deployer.java
===================================================================
--- jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/deploy/Deployer.java	2009-03-26 16:05:51 UTC (rev 4335)
+++ jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/deploy/Deployer.java	2009-03-26 19:16:56 UTC (rev 4336)
@@ -1,35 +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.pvm.internal.deploy;
-
-import org.jbpm.pvm.internal.svc.DeploymentImpl;
-
-
-
-/**
- * @author Tom Baeyens
- */
-public interface Deployer {
-
-  void deploy(DeploymentImpl deployment);
-
-}

Deleted: jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/deploy/DeployerManager.java
===================================================================
--- jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/deploy/DeployerManager.java	2009-03-26 16:05:51 UTC (rev 4335)
+++ jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/deploy/DeployerManager.java	2009-03-26 19:16:56 UTC (rev 4336)
@@ -1,68 +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.pvm.internal.deploy;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.jbpm.JbpmException;
-import org.jbpm.internal.log.Log;
-import org.jbpm.pvm.internal.svc.DeploymentImpl;
-
-
-
-/** manages sequences of deployers for multiple process languages.
- * 
- * <p>Each process language has a language-id.  In a deployment a language-id can 
- * be given.  This deployer manager will be able to find a sequence of deployers
- * based on the language-id.
- * </p>
- * 
- * <p>Also, an extension can be associated to a process language.  In that case 
- * the deployer manager can find the deployer sequence based on the 
- * extension of the deployed file name.
- * </p>
- *  
- * @author Tom Baeyens
- */
-public class DeployerManager {
-  
-  private static final Log log = Log.getLog(DeployerManager.class.getName());
-  
-  /** configurable list of deployers */
-  protected List<Deployer> deployers = new ArrayList<Deployer>();
-
-  public void deploy(DeploymentImpl deployment) {
-    if (deployment==null) {
-      throw new JbpmException("deployment is null");
-    }
-    
-    for (Deployer deployer: deployers) {
-      if (log.isTraceEnabled()) log.trace("applying deployer "+deployer+" to "+deployment);
-      deployer.deploy(deployment);
-    }
-  }
-  
-  public void setDeployers(List<Deployer> deployers) {
-    this.deployers = deployers;
-  }
-}

Deleted: jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/deploy/SaveDeployer.java
===================================================================
--- jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/deploy/SaveDeployer.java	2009-03-26 16:05:51 UTC (rev 4335)
+++ jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/deploy/SaveDeployer.java	2009-03-26 19:16:56 UTC (rev 4336)
@@ -1,77 +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.pvm.internal.deploy;
-
-import java.io.InputStream;
-import java.io.Serializable;
-import java.util.List;
-
-import org.jbpm.env.Environment;
-import org.jbpm.internal.log.Log;
-import org.jbpm.pvm.internal.model.ProcessDefinitionImpl;
-import org.jbpm.pvm.internal.svc.DeploymentImpl;
-import org.jbpm.session.PvmDbSession;
-
-/**
- * @author Tom Baeyens
- */
-public class SaveDeployer implements Deployer, Serializable {
-
-  private static final long serialVersionUID = 1L;
-  private static Log log = Log.getLog(SaveDeployer.class.getName());
-  
-  public void deploy(DeploymentImpl deployment) {
-    Environment environment = Environment.getCurrent();
-    if (environment==null) {
-      deployment.addProblem("environment is required by "+getClass().getName());
-      return;
-    }
-
-    PvmDbSession pvmDbSession = environment.get(PvmDbSession.class);
-    if (pvmDbSession==null) {
-      deployment.addProblem(PvmDbSession.class.getName()+" is required in the environment by "+getClass().getName());
-      return;
-    }
-    
-    boolean deployedProcess = false;
-    
-    List<ProcessDefinitionImpl> processDefinitions = (List)deployment.getProcessDefinitions();
-    
-    for (ProcessDefinitionImpl processDefinition : processDefinitions) {
-      log.debug("saving process definition "+processDefinition);
-      deployedProcess = true;
-      pvmDbSession.save(processDefinition);
-      for (String fileName : deployment.getFileNames()) {
-        InputStream inputStream = deployment.getFile(fileName);
-        processDefinition.addAttachment(fileName, inputStream);
-      }
-    }
-
-    if (!deployedProcess) {
-      log.info("no process definition in "+deployment);
-    }
-  }
-
-  public String toString() {
-    return "save";
-  }
-}

Deleted: jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/repository/DeployExecutionService.java
===================================================================
--- jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/repository/DeployExecutionService.java	2009-03-26 16:05:51 UTC (rev 4335)
+++ jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/repository/DeployExecutionService.java	2009-03-26 19:16:56 UTC (rev 4336)
@@ -1,36 +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.pvm.internal.repository;
-
-import org.jbpm.Execution;
-import org.jbpm.pvm.internal.svc.ExecutionServiceImpl;
-
-
-/**
- * @author Tom Baeyens
- */
-public class DeployExecutionService extends ExecutionServiceImpl {
-
-  public Execution startProcessInstanceByKey(String processDefinitionKey) {
-    return commandService.execute(new StartExecutionInLatestCmd(processDefinitionKey, null, null));
-  }
-}

Deleted: jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/repository/StartExecutionInLatestCmd.java
===================================================================
--- jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/repository/StartExecutionInLatestCmd.java	2009-03-26 16:05:51 UTC (rev 4335)
+++ jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/repository/StartExecutionInLatestCmd.java	2009-03-26 19:16:56 UTC (rev 4336)
@@ -1,81 +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.pvm.internal.repository;
-
-import java.util.Map;
-
-import org.hibernate.Session;
-import org.jbpm.Execution;
-import org.jbpm.JbpmException;
-import org.jbpm.client.ClientProcessDefinition;
-import org.jbpm.client.ClientProcessInstance;
-import org.jbpm.env.Environment;
-import org.jbpm.pvm.internal.cmd.VariablesCmd;
-import org.jbpm.pvm.internal.repository.api.RepositorySession;
-
-
-/**
- * @author Tom Baeyens
- */
-public class StartExecutionInLatestCmd extends VariablesCmd<Execution> {
-
-  private static final long serialVersionUID = 1L;
-
-  protected String processDefinitionKey;
-  protected String executionKey;
-
-  public StartExecutionInLatestCmd(String processDefinitionKey, Map<String, Object> variables, String executionKey) {
-    if (processDefinitionKey==null) {
-      throw new JbpmException("processDefinitionKey is null");
-    }
-    this.processDefinitionKey = processDefinitionKey;
-    this.variables = variables;
-    this.executionKey = executionKey;
-  }
-  
-  public Execution execute(Environment environment) throws Exception {
-    ClientProcessDefinition processDefinition = null;
-    
-    RepositorySession repositorySession = environment.get(RepositorySession.class);
-    processDefinition = (ClientProcessDefinition) repositorySession
-          .findObjectByPropertyValue("jpdl.key", processDefinitionKey);
-
-    if (processDefinition==null) {
-      throw new JbpmException("no process definition with key '"+processDefinitionKey+"'");
-    }
-    
-    ClientProcessInstance processInstance = processDefinition.createProcessInstance(executionKey);
-    processInstance.setVariables(variables);
-    processInstance.start();
-    
-    Session session = Environment.getFromCurrent(Session.class);
-    session.save(processInstance);
-    return processInstance;
-  }
-
-  public String getExecutionKey() {
-    return executionKey;
-  }
-  public void setExecutionKey(String executionKey) {
-    this.executionKey = executionKey;
-  }
-}

Deleted: jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/repository/api/Deployment.java
===================================================================
--- jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/repository/api/Deployment.java	2009-03-26 16:05:51 UTC (rev 4335)
+++ jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/repository/api/Deployment.java	2009-03-26 19:16:56 UTC (rev 4336)
@@ -1,40 +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.pvm.internal.repository.api;
-
-import java.util.zip.ZipInputStream;
-
-import org.jbpm.pvm.internal.stream.StreamInput;
-
-/**
- * @author Tom Baeyens
- */
-public interface Deployment {
-
-  void setName(String name);
-  
-  Deployment addStreamInput(String name, StreamInput streamInput);
-  Deployment addZipInputStream(ZipInputStream zipInputStream);
-  
-  /** @return deploymentId */
-  long deploy();
-}

Deleted: jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/repository/api/RepositoryService.java
===================================================================
--- jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/repository/api/RepositoryService.java	2009-03-26 16:05:51 UTC (rev 4335)
+++ jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/repository/api/RepositoryService.java	2009-03-26 19:16:56 UTC (rev 4336)
@@ -1,38 +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.pvm.internal.repository.api;
-
-import java.io.InputStream;
-
-
-/**
- * @author Tom Baeyens
- */
-public interface RepositoryService {
-
-  public abstract Deployment createDeployment();
-
-  public abstract void deleteDeployment(long deploymentDbid);
-
-  public abstract InputStream getResource(String deploymentId, String resource);
-
-}
\ No newline at end of file

Deleted: jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/repository/api/RepositorySession.java
===================================================================
--- jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/repository/api/RepositorySession.java	2009-03-26 16:05:51 UTC (rev 4335)
+++ jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/repository/api/RepositorySession.java	2009-03-26 19:16:56 UTC (rev 4336)
@@ -1,41 +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.pvm.internal.repository.api;
-
-import java.util.List;
-
-import org.jbpm.pvm.internal.repository.DeploymentImpl;
-
-
-/**
- * @author Tom Baeyens
- */
-public interface RepositorySession {
-
-  Object getObject(long deploymentDbid, String objectName);
-
-  long deploy(DeploymentImpl deployment);
-
-  List<String> findObjectNames(String propertyKey, String propertyValue);
-  List<String> findObjectPropertyValues(String objectName, String propertyKey);
-  Object findObjectByPropertyValue(String propertyKey, String propertyValue);
-}

Deleted: jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/DeploymentImpl.java
===================================================================
--- jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/DeploymentImpl.java	2009-03-26 16:05:51 UTC (rev 4335)
+++ jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/DeploymentImpl.java	2009-03-26 19:16:56 UTC (rev 4336)
@@ -1,365 +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.pvm.internal.svc;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.ObjectStreamException;
-import java.io.Serializable;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipInputStream;
-
-import org.jbpm.Deployment;
-import org.jbpm.JbpmException;
-import org.jbpm.ProcessDefinition;
-import org.jbpm.internal.log.Log;
-import org.jbpm.pvm.internal.stream.ByteArrayStreamInput;
-import org.jbpm.pvm.internal.stream.FileStreamInput;
-import org.jbpm.pvm.internal.stream.InputStreamInput;
-import org.jbpm.pvm.internal.stream.ResourceStreamInput;
-import org.jbpm.pvm.internal.stream.StreamInput;
-import org.jbpm.pvm.internal.stream.StringStreamInput;
-import org.jbpm.pvm.internal.stream.UrlStreamInput;
-import org.jbpm.pvm.internal.util.IoUtil;
-import org.jbpm.pvm.internal.xml.Parse;
-import org.jbpm.pvm.internal.xml.Parser;
-import org.jbpm.pvm.internal.xml.ProblemImpl;
-import org.jbpm.pvm.internal.xml.ProblemList;
-import org.w3c.dom.Document;
-
-
-/** a deployment unit, containing all information in source format from which 
- * a process definition will be created and stored in the process repository.
- * 
- * For more info, see Deployment.
- * 
- * @author Tom Baeyens
- */
-public class DeploymentImpl extends ProblemList implements Deployment, Serializable {
-
-  private static final long serialVersionUID = 1L;
-  
-  private static final Log log = Log.getLog(DeploymentImpl.class.getName());
-
-  private static final Parser parser = new Parser();
-  
-  protected ProcessServiceImpl processServiceImpl;
-
-  protected String name;
-  protected long timestamp;
-
-  /** maps file names to stream source */
-  protected Map<String, StreamInput> files = new HashMap<String,StreamInput>();
-  /** maps file names to dom so that duplicate xml parsing can be avoided. */
-  protected Map<String, Document> fileDocuments = new HashMap<String, Document>();
-  /** maps file names to file types */
-  protected Map<String, String> fileTypes = new HashMap<String,String>();
-  /** process definitions */
-  protected List<ProcessDefinition> processDefinitions = new ArrayList<ProcessDefinition>();
-
-  public DeploymentImpl(ProcessServiceImpl processServiceImpl) {
-    this.processServiceImpl = processServiceImpl;
-    this.problems = new ArrayList<ProblemImpl>();
-  }
-
-  public Deployment addResource(String resource) {
-    addStreamSource(resource, new ResourceStreamInput(resource));
-    return this;
-  }
-  
-  public Deployment addFile(File file) {
-    addStreamSource(file.getAbsolutePath(), new FileStreamInput(file));
-    return this;
-  }
-  
-  public Deployment addUrl(URL url) {
-    addStreamSource(url.toString(), new UrlStreamInput(url));
-    return this;
-  }
-  
-  public Deployment addInputStream(String name, InputStream inputStream) {
-    addStreamSource(name, new InputStreamInput(inputStream));
-    return this;
-  }
-  
-  public Deployment addString(String name, String string) {
-    addStreamSource(name, new StringStreamInput(string));
-    return this;
-  }
-  
-  public Deployment addArchiveResource(String resource) {
-    this.name = resource;
-    ResourceStreamInput streamSource = new ResourceStreamInput(resource);
-    addStreamSource(resource, streamSource);
-    return this;
-  }
-  
-  public Deployment addArchiveFile(File file) {
-    addStreamSource(file.getAbsolutePath(), new FileStreamInput(file));
-    return this;
-  }
-  
-  public Deployment addArchiveUrl(URL url) {
-    addStreamSource(url.toString(), new UrlStreamInput(url));
-    return this;
-  }
-  
-  public Deployment addArchive(ZipInputStream zipInputStream) {
-    try {
-      ZipEntry zipEntry = zipInputStream.getNextEntry();
-      while(zipEntry!=null) {
-        String entryName = zipEntry.getName();
-        byte[] bytes = IoUtil.readBytes(zipInputStream);
-        if (bytes!=null) {
-          addStreamSource(entryName, new ByteArrayStreamInput(bytes));
-        }
-        zipEntry = zipInputStream.getNextEntry();
-      }
-    } catch (Exception e) {
-      throw new JbpmException("couldn't read zip archive", e);
-    }
-    return this;
-  }
-  
-  /** recursively adds all files in a directory using the relative file names */
-  public Deployment addDirectory(String directory) {
-    if (directory==null) {
-      throw new JbpmException("directory is null");
-    }
-    addDirectory(new File(directory), "", false); 
-    return this;
-  }
-  
-  /** recursively adds all files in a directory using the canonical file names */
-  public Deployment addDirectoryCanonical(String directory) {
-    if (directory==null) {
-      throw new JbpmException("directory is null");
-    }
-    addDirectory(new File(directory), "", true); 
-    return this;
-  }
-  
-  /** recursively adds all files in a directory using the relative file names */
-  public Deployment addDirectory(File directory) {
-    addDirectory(directory, "", false); 
-    return this;
-  }
-  
-  /** recursively adds all files in a directory using the canonical file names */
-  public Deployment addDirectoryCanonical(File directory) {
-    addDirectory(directory, "", true); 
-    return this;
-  }
-  
-  protected Deployment addDirectory(File directory, String relativeDirectoryName, boolean canonicalPathNames) {
-    if (directory==null) {
-      throw new JbpmException("directory is null");
-    }
-    if (!directory.isDirectory()) {
-      throw new JbpmException(directory.getAbsolutePath()+" is not a directory");
-    }
-
-    File[] files = directory.listFiles();
-    if (files!=null) {
-      for (File file: files) {
-        String relativeFileName = (canonicalPathNames ? null : relativeDirectoryName+"/"+file.getName());
-        if (file.isFile()) {
-          if (canonicalPathNames) {
-            try {
-              addStreamSource(file.getCanonicalPath(), new FileStreamInput(file));
-            } catch (IOException e) {
-              throw new JbpmException("can't get canonical path name for "+file);
-            }
-          } else {
-            addStreamSource(relativeFileName, new FileStreamInput(file));
-          }
-        } else if (file.isDirectory()) {
-          addDirectory(file, relativeFileName, canonicalPathNames);
-        }
-      }
-    }
-    return this;
-  }
-
-  protected Deployment addStreamSource(String name, StreamInput streamSource) {
-    if (this.name==null) {
-      this.name = name;
-    }
-    if (files==null) {
-      files = new HashMap<String, StreamInput>();
-    }
-    files.put(name, streamSource);
-    return this;
-  }
-  
-  public InputStream getFile(String name) {
-    if (files==null) {
-      return null;
-    }
-    StreamInput streamSource = files.get(name);
-    return (streamSource!=null ? streamSource.openStream() : null);
-  }
-  
-  public Set<String> getFileNames() {
-    if (files==null) {
-      return Collections.EMPTY_SET;
-    }
-    return files.keySet();
-  }
-  
-  public Document getDocument(String name) {
-    if ( (fileDocuments!=null)
-         && (fileDocuments.containsKey(name))
-       ) {
-      return fileDocuments.get(name);
-    }
-    if ( (files!=null)
-         && (files.containsKey(name))
-       ) {
-      InputStream fileStream = getFile(name);
-      return parser.createParse()
-                   .setInputStream(fileStream)
-                   .execute()
-                   .checkProblems("deployment file "+name)
-                   .getDocument();
-    }
-    return null;
-  }
-  
-  public String getName() {
-    return name;
-  }
-  public Deployment setName(String name) {
-    this.name = name;
-    return this;
-  }
-  
-  public long getTimestamp() {
-    return timestamp;
-  }
-  
-  public Deployment setTimestamp(long timestamp) {
-    this.timestamp = timestamp;
-    return this;
-  }
-
-  public Deployment addProcessDefinition(ProcessDefinition processDefinition) {
-    processDefinitions.add(processDefinition);
-    return this;
-  }
-
-  public Deployment deploy() {
-    processDefinitions = processServiceImpl.deploy(this);
-    return this;
-  }
-  
-  public List<ProcessDefinition> getProcessDefinitions() {
-    return processDefinitions;
-  }
-
-  // error logging ////////////////////////////////////////////////////////////
-  
-  public class DeploymentParse {
-    String name;
-    Parse parse;
-    public DeploymentParse(String name, Parse parse) {
-      this.name = name;
-      this.parse = parse;
-    }
-  }
-  
-  public String toString() {
-    if (name!=null) {
-      return "deployment("+name+")";
-    }
-    return "deployment";
-  }
-
-  public void addDocument(String name, Document document) {
-    if (fileDocuments==null) {
-      fileDocuments = new HashMap<String, Document>();
-    }
-    fileDocuments.put(name, document);
-  }
-
-  /** throws an exception with appropriate message in case the parse contains 
-   * errors or fatal errors.  This method also logs the problems with severity
-   * 'warning'. */
-  public Deployment checkProblems() {
-    if (hasProblems()) {
-      String problemsText = getProblemsText();
-      if (problemsText!=null) {
-        String errorMsg = "problems during deployment of "+this+":"+problemsText;
-        log.info(errorMsg);
-        throw new JbpmException(errorMsg);
-      }
-    }
-    return this;
-  }
-
-  public Deployment setFileType(String fileName, String fileType) {
-    if (fileTypes==null) {
-      fileTypes = new HashMap<String, String>(); 
-    }
-    fileTypes.put(fileName, fileType);
-    return this;
-  }
-
-  public List<String> getFileNamesForType(String type) {
-    if (type==null) {
-      throw new JbpmException("type is null");
-    }
-    List<String> fileNames = new ArrayList<String>();
-    for (String fileName: fileTypes.keySet()) {
-      if (fileTypes.get(fileName).equals(type)) {
-        fileNames.add(fileName);
-      }
-    }
-    return fileNames;
-  }
-  
-  protected Object writeReplace() throws ObjectStreamException {
-    if (files!=null) {
-      Map<String, StreamInput> replacedFiles = new HashMap<String, StreamInput>();
-      for (Map.Entry<String, StreamInput> entry: files.entrySet()) {
-        if (! (entry.getValue() instanceof ByteArrayStreamInput)) {
-          byte[] bytes = IoUtil.readBytes(entry.getValue().openStream());
-          replacedFiles.put(entry.getKey(), new ByteArrayStreamInput(bytes));
-        }
-      }
-      files = replacedFiles;
-    }
-    
-    processServiceImpl = null;
-    
-    return this;
-  }
-
-}

Deleted: jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/AssignFileTypesBinding.java
===================================================================
--- jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/AssignFileTypesBinding.java	2009-03-26 16:05:51 UTC (rev 4335)
+++ jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/AssignFileTypesBinding.java	2009-03-26 19:16:56 UTC (rev 4336)
@@ -1,67 +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.pvm.internal.wire.binding;
-
-import java.util.List;
-
-import org.jbpm.pvm.internal.deploy.AssignFileTypeDeployer;
-import org.jbpm.pvm.internal.util.XmlUtil;
-import org.jbpm.pvm.internal.wire.descriptor.ProvidedObjectDescriptor;
-import org.jbpm.pvm.internal.xml.Parse;
-import org.jbpm.pvm.internal.xml.Parser;
-import org.w3c.dom.Element;
-
-
-/**
- * @author Tom Baeyens
- */
-public class AssignFileTypesBinding extends WireDescriptorBinding {
-
-  private static final String ASSIGN_FILE_TYPE = "assign-file-type";
-
-  public AssignFileTypesBinding() {
-    super(ASSIGN_FILE_TYPE);
-  }
-
-  public Object parse(Element element, Parse parse, Parser parser) {
-    AssignFileTypeDeployer assignFileTypeDeployer = new AssignFileTypeDeployer();
-    
-    List<Element> fileElements = XmlUtil.elements(element, "file");
-    if (fileElements.isEmpty()) {
-      parse.addProblem("no files in "+ASSIGN_FILE_TYPE);
-    } else {
-      for(Element fileTypeElement : fileElements) {
-        String extension = XmlUtil.attribute(fileTypeElement, "extension", true, parse);
-        String type = XmlUtil.attribute(fileTypeElement, "type", true, parse);
-        if ( (extension!=null)
-             && (type!=null)
-           ) {
-          assignFileTypeDeployer.addFileType(extension, type);
-        }
-      }
-    }
-    
-    ProvidedObjectDescriptor providedObjectDescriptor = new ProvidedObjectDescriptor(assignFileTypeDeployer);
-
-    return providedObjectDescriptor;
-  }
-}

Deleted: jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/CheckProblemsBinding.java
===================================================================
--- jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/CheckProblemsBinding.java	2009-03-26 16:05:51 UTC (rev 4335)
+++ jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/CheckProblemsBinding.java	2009-03-26 19:16:56 UTC (rev 4336)
@@ -1,45 +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.pvm.internal.wire.binding;
-
-import org.jbpm.pvm.internal.deploy.CheckProblemsDeployer;
-import org.jbpm.pvm.internal.wire.descriptor.ProvidedObjectDescriptor;
-import org.jbpm.pvm.internal.xml.Parse;
-import org.jbpm.pvm.internal.xml.Parser;
-import org.w3c.dom.Element;
-
-
-/**
- * @author Tom Baeyens
- */
-public class CheckProblemsBinding extends WireDescriptorBinding {
-
-  public CheckProblemsBinding() {
-    super("check-problems");
-  }
-
-  public Object parse(Element element, Parse parse, Parser parser) {
-    CheckProblemsDeployer checkProblemsDeployer = new CheckProblemsDeployer();
-    return new ProvidedObjectDescriptor(checkProblemsDeployer);
-  }
-
-}

Deleted: jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/CheckProcessBinding.java
===================================================================
--- jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/CheckProcessBinding.java	2009-03-26 16:05:51 UTC (rev 4335)
+++ jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/CheckProcessBinding.java	2009-03-26 19:16:56 UTC (rev 4336)
@@ -1,61 +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.pvm.internal.wire.binding;
-
-import org.jbpm.pvm.internal.deploy.CheckProcessDeployer;
-import org.jbpm.pvm.internal.util.XmlUtil;
-import org.jbpm.pvm.internal.wire.descriptor.ProvidedObjectDescriptor;
-import org.jbpm.pvm.internal.xml.Parse;
-import org.jbpm.pvm.internal.xml.Parser;
-import org.w3c.dom.Element;
-
-
-/** parses a descriptor creating a {@link CheckProcessDeployer version verification deployer}.
- * 
- * See schema docs for more details.
- *
- * @author Tom Baeyens
- */
-public class CheckProcessBinding extends WireDescriptorBinding {
-
-  public static final String TAG = "check-process";
-
-  public CheckProcessBinding() {
-    super(TAG);
-  }
-
-  public Object parse(Element element, Parse parse, Parser parser) {
-    CheckProcessDeployer checkProcessDeployer = new CheckProcessDeployer();
-    
-    Boolean assignVersion = XmlUtil.attributeBoolean(element, "assign-version", false, parse, null);
-    if (assignVersion!=null) {
-      checkProcessDeployer.setAssignVersion(assignVersion);
-    }
-
-    Boolean assignKey = XmlUtil.attributeBoolean(element, "assign-key", false, parse, null);
-    if (assignKey!=null) {
-      checkProcessDeployer.setAssignKey(assignKey);
-    }
-
-    return new ProvidedObjectDescriptor(checkProcessDeployer);
-  }
-}

Added: jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/RepositoryCacheBinding.java
===================================================================
--- jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/RepositoryCacheBinding.java	                        (rev 0)
+++ jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/RepositoryCacheBinding.java	2009-03-26 19:16:56 UTC (rev 4336)
@@ -0,0 +1,45 @@
+/*
+ * 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.pvm.internal.wire.binding;
+
+import org.jbpm.pvm.internal.repository.RepositoryCacheImpl;
+import org.jbpm.pvm.internal.wire.descriptor.ObjectDescriptor;
+import org.jbpm.pvm.internal.xml.Parse;
+import org.jbpm.pvm.internal.xml.Parser;
+import org.w3c.dom.Element;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class RepositoryCacheBinding extends WireDescriptorBinding {
+
+  public RepositoryCacheBinding() {
+    super("repository-cache");
+  }
+
+  public Object parse(Element element, Parse parse, Parser parser) {
+    ObjectDescriptor objectDescriptor = new ObjectDescriptor(RepositoryCacheImpl.class);
+    objectDescriptor.setAutoWireEnabled(true);
+    return objectDescriptor;
+  }
+}


Property changes on: jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/RepositoryCacheBinding.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/RepositoryServiceBinding.java
===================================================================
--- jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/RepositoryServiceBinding.java	                        (rev 0)
+++ jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/RepositoryServiceBinding.java	2009-03-26 19:16:56 UTC (rev 4336)
@@ -0,0 +1,45 @@
+/*
+ * 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.pvm.internal.wire.binding;
+
+import org.jbpm.pvm.internal.repository.RepositoryServiceImpl;
+import org.jbpm.pvm.internal.wire.descriptor.ObjectDescriptor;
+import org.jbpm.pvm.internal.xml.Parse;
+import org.jbpm.pvm.internal.xml.Parser;
+import org.w3c.dom.Element;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class RepositoryServiceBinding extends WireDescriptorBinding {
+
+  public RepositoryServiceBinding() {
+    super("repository-service");
+  }
+
+  public Object parse(Element element, Parse parse, Parser parser) {
+    ObjectDescriptor objectDescriptor = new ObjectDescriptor(RepositoryServiceImpl.class);
+    objectDescriptor.setAutoWireEnabled(true);
+    return objectDescriptor;
+  }
+}


Property changes on: jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/RepositoryServiceBinding.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/RepositorySessionBinding.java
===================================================================
--- jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/RepositorySessionBinding.java	                        (rev 0)
+++ jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/RepositorySessionBinding.java	2009-03-26 19:16:56 UTC (rev 4336)
@@ -0,0 +1,46 @@
+/*
+ * 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.pvm.internal.wire.binding;
+
+import org.jbpm.pvm.internal.repository.RepositorySessionImpl;
+import org.jbpm.pvm.internal.wire.descriptor.ObjectDescriptor;
+import org.jbpm.pvm.internal.xml.Parse;
+import org.jbpm.pvm.internal.xml.Parser;
+import org.w3c.dom.Element;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class RepositorySessionBinding extends WireDescriptorBinding {
+
+  public RepositorySessionBinding() {
+    super("repository-session");
+  }
+
+  public Object parse(Element element, Parse parse, Parser parser) {
+    ObjectDescriptor objectDescriptor = new ObjectDescriptor(RepositorySessionImpl.class);
+    objectDescriptor.setAutoWireEnabled(true);
+    return objectDescriptor;
+  }
+
+}


Property changes on: jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/RepositorySessionBinding.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Deleted: jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/SaveBinding.java
===================================================================
--- jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/SaveBinding.java	2009-03-26 16:05:51 UTC (rev 4335)
+++ jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/SaveBinding.java	2009-03-26 19:16:56 UTC (rev 4336)
@@ -1,47 +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.pvm.internal.wire.binding;
-
-import org.jbpm.pvm.internal.deploy.SaveDeployer;
-import org.jbpm.pvm.internal.wire.descriptor.ProvidedObjectDescriptor;
-import org.jbpm.pvm.internal.xml.Parse;
-import org.jbpm.pvm.internal.xml.Parser;
-import org.w3c.dom.Element;
-
-
-/** parses a descriptor for creating a {@link SaveDeployer} deployer.
- * 
- * See schema docs for more details.
- *
- * @author Tom Baeyens
- */
-public class SaveBinding extends WireDescriptorBinding {
-
-  public SaveBinding() {
-    super("save");
-  }
-
-  public Object parse(Element element, Parse parse, Parser parser) {
-    SaveDeployer saveDeployer = new SaveDeployer();
-    return new ProvidedObjectDescriptor(saveDeployer);
-  }
-}

Deleted: jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/descriptor/DeployerManagerDescriptor.java
===================================================================
--- jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/descriptor/DeployerManagerDescriptor.java	2009-03-26 16:05:51 UTC (rev 4335)
+++ jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/descriptor/DeployerManagerDescriptor.java	2009-03-26 19:16:56 UTC (rev 4336)
@@ -1,67 +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.pvm.internal.wire.descriptor;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.jbpm.pvm.internal.deploy.Deployer;
-import org.jbpm.pvm.internal.deploy.DeployerManager;
-import org.jbpm.pvm.internal.wire.Descriptor;
-import org.jbpm.pvm.internal.wire.WireContext;
-import org.jbpm.pvm.internal.wire.WireDefinition;
-
-
-/**
- * @author Tom Baeyens
- */
-public class DeployerManagerDescriptor extends AbstractDescriptor {
-
-  private static final long serialVersionUID = 1L;
-  
-  /** the list of descriptors for building the list of deployers */
-  protected List<Descriptor> deployerDescriptors = new ArrayList<Descriptor>();
-
-  public Object construct(WireContext wireContext) {
-    return new DeployerManager();
-  }
-  
-  public void initialize(Object object, WireContext wireContext) {
-    DeployerManager deployerManager = (DeployerManager) object;
-    
-    List<Deployer> deployers = new ArrayList<Deployer>();
-    for (Descriptor deployerDescriptor: deployerDescriptors) {
-      Deployer deployer = (Deployer) wireContext.create(deployerDescriptor, true);
-      deployers.add(deployer);
-    }
-    
-    deployerManager.setDeployers(deployers);
-  }
-
-  public Class< ? > getType(WireDefinition wireDefinition) {
-    return DeployerManager.class;
-  }
-
-  public void setDeployerDescriptors(List<Descriptor> deployerDescriptors) {
-    this.deployerDescriptors = deployerDescriptors;
-  }
-}




More information about the jbpm-commits mailing list