Author: thomas.diesler(a)jboss.com
Date: 2008-07-16 10:32:05 -0400 (Wed, 16 Jul 2008)
New Revision: 1652
Added:
api/branches/tdiesler/modules/dialects/jaxb/src/main/java/org/jboss/bpm/dialect/jaxb/ProcessManagerImpl.java
api/branches/tdiesler/modules/dialects/jaxb/src/main/java/org/jboss/bpm/dialect/jaxb/ProcessMarshaller.java
api/branches/tdiesler/modules/dialects/jaxb/src/main/java/org/jboss/bpm/dialect/jaxb/ProcessUnmarshaller.java
Removed:
api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/client/internal/ProcessManagerImpl.java
api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/ProcessDialect.java
api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/ProcessDialectFactory.java
api/branches/tdiesler/modules/dialects/jaxb/src/main/java/org/jboss/bpm/dialect/jaxb/model/ProcessMarshaller.java
api/branches/tdiesler/modules/dialects/jaxb/src/main/java/org/jboss/bpm/dialect/jaxb/model/ProcessUnmarshaller.java
Log:
Deleted:
api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/client/internal/ProcessManagerImpl.java
===================================================================
---
api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/client/internal/ProcessManagerImpl.java 2008-07-16
14:28:51 UTC (rev 1651)
+++
api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/client/internal/ProcessManagerImpl.java 2008-07-16
14:32:05 UTC (rev 1652)
@@ -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.jboss.bpm.client.internal;
-
-// $Id$
-
-import java.io.IOException;
-import java.net.URL;
-
-import org.jboss.bpm.client.ProcessEngine;
-import org.jboss.bpm.client.ProcessManager;
-import org.jboss.bpm.model.Process;
-import org.jboss.bpm.model.ProcessDialectFactory;
-
-/**
- * The process manager is the entry point to create, find and otherwise manage
processes.
- *
- * @author thomas.diesler(a)jboss.com
- * @since 18-Jun-2008
- */
-public class ProcessManagerImpl extends ProcessManager
-{
- public void setProcessEngine(ProcessEngine engine)
- {
- this.engine = engine;
- }
-
- /**
- * Override to implement process definition creation
- */
- public Process createProcessOverride(String pXML)
- {
- ProcessDialectFactory.
-// ProcessUnmarshaller unmarschaller = new ProcessUnmarshaller();
-// Process proc = unmarschaller.unmarshallProcess(new StringReader(pXML));
- return null;
- }
-
- /**
- * Override to implement process definition creation
- */
- public Process createProcessOverride(URL pURL) throws IOException
- {
-// ProcessUnmarshaller unmarschaller = new ProcessUnmarshaller();
-// Process proc = unmarschaller.unmarshallProcess(new
InputStreamReader(pURL.openStream()));
- return null;
- }
-}
\ No newline at end of file
Deleted:
api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/ProcessDialect.java
===================================================================
---
api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/ProcessDialect.java 2008-07-16
14:28:51 UTC (rev 1651)
+++
api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/ProcessDialect.java 2008-07-16
14:32:05 UTC (rev 1652)
@@ -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.jboss.bpm.model;
-
-
-//$Id$
-
-/**
- * A Factory for the {@link ProcessBuilder}.
- *
- * @author thomas.diesler(a)jboss.com
- * @since 08-Jul-2008
- */
-public interface ProcessDialect
-{
- /**
- * Get a {@link Process} from a dialect specific model.
- */
- Process buildProcess(Object processModel);
-
-}
\ No newline at end of file
Deleted:
api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/ProcessDialectFactory.java
===================================================================
---
api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/ProcessDialectFactory.java 2008-07-16
14:28:51 UTC (rev 1651)
+++
api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/ProcessDialectFactory.java 2008-07-16
14:32:05 UTC (rev 1652)
@@ -1,48 +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.jboss.bpm.model;
-
-
-//$Id$
-
-/**
- * A Factory for the {@link ProcessBuilder}.
- *
- * @author thomas.diesler(a)jboss.com
- * @since 08-Jul-2008
- */
-public class ProcessDialectFactory
-{
- // Hide the constructor
- private ProcessDialectFactory()
- {
- }
-
- /**
- * Get a {@link ProcessBuilder} for a given process name.
- */
- public static ProcessDialect newInstance()
- {
- return null;
- }
-
-}
\ No newline at end of file
Copied:
api/branches/tdiesler/modules/dialects/jaxb/src/main/java/org/jboss/bpm/dialect/jaxb/ProcessManagerImpl.java
(from rev 1648,
api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/client/internal/ProcessManagerImpl.java)
===================================================================
---
api/branches/tdiesler/modules/dialects/jaxb/src/main/java/org/jboss/bpm/dialect/jaxb/ProcessManagerImpl.java
(rev 0)
+++
api/branches/tdiesler/modules/dialects/jaxb/src/main/java/org/jboss/bpm/dialect/jaxb/ProcessManagerImpl.java 2008-07-16
14:32:05 UTC (rev 1652)
@@ -0,0 +1,67 @@
+/*
+ * 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.jboss.bpm.dialect.jaxb;
+
+// $Id$
+
+import java.io.IOException;
+import java.io.StringReader;
+import java.net.URL;
+
+import org.jboss.bpm.client.ProcessEngine;
+import org.jboss.bpm.client.ProcessManager;
+import org.jboss.bpm.dialect.jaxb.model.JAXBProcess;
+import org.jboss.bpm.model.Process;
+
+/**
+ * The process manager is the entry point to create, find and otherwise manage
processes.
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 18-Jun-2008
+ */
+public class ProcessManagerImpl extends ProcessManager
+{
+ public void setProcessEngine(ProcessEngine engine)
+ {
+ this.engine = engine;
+ }
+
+ /**
+ * Override to implement process definition creation
+ */
+ public Process createProcessOverride(String pXML)
+ {
+ ProcessUnmarshaller unmarschaller = new ProcessUnmarshaller();
+ JAXBProcess proc = unmarschaller.unmarshallProcess(new StringReader(pXML));
+ return null;
+ }
+
+ /**
+ * Override to implement process definition creation
+ */
+ public Process createProcessOverride(URL pURL) throws IOException
+ {
+// ProcessUnmarshaller unmarschaller = new ProcessUnmarshaller();
+// Process proc = unmarschaller.unmarshallProcess(new
InputStreamReader(pURL.openStream()));
+ return null;
+ }
+}
\ No newline at end of file
Copied:
api/branches/tdiesler/modules/dialects/jaxb/src/main/java/org/jboss/bpm/dialect/jaxb/ProcessMarshaller.java
(from rev 1651,
api/branches/tdiesler/modules/dialects/jaxb/src/main/java/org/jboss/bpm/dialect/jaxb/model/ProcessMarshaller.java)
===================================================================
---
api/branches/tdiesler/modules/dialects/jaxb/src/main/java/org/jboss/bpm/dialect/jaxb/ProcessMarshaller.java
(rev 0)
+++
api/branches/tdiesler/modules/dialects/jaxb/src/main/java/org/jboss/bpm/dialect/jaxb/ProcessMarshaller.java 2008-07-16
14:32:05 UTC (rev 1652)
@@ -0,0 +1,62 @@
+/*
+ * 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.jboss.bpm.dialect.jaxb;
+
+// $Id$
+
+import java.io.IOException;
+import java.io.Writer;
+
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBException;
+import javax.xml.bind.Marshaller;
+
+import org.jboss.bpm.dialect.jaxb.model.JAXBProcess;
+import org.jboss.bpm.dialect.jaxb.model.ObjectFactory;
+
+
+/**
+ * A JAXB marshaller for a Process
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 08-Jul-2008
+ */
+public class ProcessMarshaller
+{
+ public void marshallProcess(JAXBProcess proc, Writer out) throws JAXBException,
IOException
+ {
+ JAXBContext jaxbContext = JAXBContext.newInstance(ObjectFactory.class);
+ Marshaller marshaller = jaxbContext.createMarshaller();
+ marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
+ marshaller.setProperty(Marshaller.JAXB_FRAGMENT, true);
+
+ marshaller.marshal(proc, out);
+
+ // Add xmlns:xsi to the top level element and remove it from all others
+ // StringWriter strwr = new StringWriter();
+ // marshaller.marshal(proc, strwr);
+ // String str = strwr.toString();
+ // String xsi = "
xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"";
+ // str = new StringBuilder(str.replace(xsi,
"")).insert(str.indexOf(">"), xsi).toString();
+ // out.write(str);
+ }
+}
Copied:
api/branches/tdiesler/modules/dialects/jaxb/src/main/java/org/jboss/bpm/dialect/jaxb/ProcessUnmarshaller.java
(from rev 1651,
api/branches/tdiesler/modules/dialects/jaxb/src/main/java/org/jboss/bpm/dialect/jaxb/model/ProcessUnmarshaller.java)
===================================================================
---
api/branches/tdiesler/modules/dialects/jaxb/src/main/java/org/jboss/bpm/dialect/jaxb/ProcessUnmarshaller.java
(rev 0)
+++
api/branches/tdiesler/modules/dialects/jaxb/src/main/java/org/jboss/bpm/dialect/jaxb/ProcessUnmarshaller.java 2008-07-16
14:32:05 UTC (rev 1652)
@@ -0,0 +1,52 @@
+/*
+ * 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.jboss.bpm.dialect.jaxb;
+
+// $Id$
+
+import java.io.Reader;
+
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBException;
+import javax.xml.bind.Unmarshaller;
+
+import org.jboss.bpm.dialect.jaxb.model.JAXBProcess;
+import org.jboss.bpm.dialect.jaxb.model.ObjectFactory;
+
+
+/**
+ * A JAXB unmarshaller for a Process
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 08-Jul-2008
+ */
+public class ProcessUnmarshaller
+{
+ public JAXBProcess unmarshallProcess(Reader xml) throws JAXBException
+ {
+ JAXBContext jaxbContext = JAXBContext.newInstance(ObjectFactory.class);
+ Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
+ unmarshaller.setProperty("com.sun.xml.bind.ObjectFactory",new
ObjectFactory());
+ JAXBProcess proc = (JAXBProcess)unmarshaller.unmarshal(xml);
+ return proc;
+ }
+}
Deleted:
api/branches/tdiesler/modules/dialects/jaxb/src/main/java/org/jboss/bpm/dialect/jaxb/model/ProcessMarshaller.java
===================================================================
---
api/branches/tdiesler/modules/dialects/jaxb/src/main/java/org/jboss/bpm/dialect/jaxb/model/ProcessMarshaller.java 2008-07-16
14:28:51 UTC (rev 1651)
+++
api/branches/tdiesler/modules/dialects/jaxb/src/main/java/org/jboss/bpm/dialect/jaxb/model/ProcessMarshaller.java 2008-07-16
14:32:05 UTC (rev 1652)
@@ -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.jboss.bpm.dialect.jaxb.model;
-
-// $Id$
-
-import java.io.IOException;
-import java.io.Writer;
-
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Marshaller;
-
-
-/**
- * A JAXB marshaller for a Process
- *
- * @author thomas.diesler(a)jboss.com
- * @since 08-Jul-2008
- */
-public class ProcessMarshaller
-{
- public void marshallProcess(JAXBProcess proc, Writer out) throws JAXBException,
IOException
- {
- JAXBContext jaxbContext = JAXBContext.newInstance(ObjectFactory.class);
- Marshaller marshaller = jaxbContext.createMarshaller();
- marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
- marshaller.setProperty(Marshaller.JAXB_FRAGMENT, true);
-
- marshaller.marshal(proc, out);
-
- // Add xmlns:xsi to the top level element and remove it from all others
- // StringWriter strwr = new StringWriter();
- // marshaller.marshal(proc, strwr);
- // String str = strwr.toString();
- // String xsi = "
xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"";
- // str = new StringBuilder(str.replace(xsi,
"")).insert(str.indexOf(">"), xsi).toString();
- // out.write(str);
- }
-}
Deleted:
api/branches/tdiesler/modules/dialects/jaxb/src/main/java/org/jboss/bpm/dialect/jaxb/model/ProcessUnmarshaller.java
===================================================================
---
api/branches/tdiesler/modules/dialects/jaxb/src/main/java/org/jboss/bpm/dialect/jaxb/model/ProcessUnmarshaller.java 2008-07-16
14:28:51 UTC (rev 1651)
+++
api/branches/tdiesler/modules/dialects/jaxb/src/main/java/org/jboss/bpm/dialect/jaxb/model/ProcessUnmarshaller.java 2008-07-16
14:32:05 UTC (rev 1652)
@@ -1,49 +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.jboss.bpm.dialect.jaxb.model;
-
-// $Id$
-
-import java.io.Reader;
-
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Unmarshaller;
-
-
-/**
- * A JAXB unmarshaller for a Process
- *
- * @author thomas.diesler(a)jboss.com
- * @since 08-Jul-2008
- */
-public class ProcessUnmarshaller
-{
- public JAXBProcess unmarshallProcess(Reader xml) throws JAXBException
- {
- JAXBContext jaxbContext = JAXBContext.newInstance(ObjectFactory.class);
- Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
- unmarshaller.setProperty("com.sun.xml.bind.ObjectFactory",new
ObjectFactory());
- JAXBProcess proc = (JAXBProcess)unmarshaller.unmarshal(xml);
- return proc;
- }
-}