[jboss-svn-commits] JBL Code SVN: r9617 - in labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/util: jbpm and 1 other directory.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Mon Feb 19 16:01:27 EST 2007


Author: estebanschifman
Date: 2007-02-19 16:01:27 -0500 (Mon, 19 Feb 2007)
New Revision: 9617

Added:
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/util/jbpm/
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/util/jbpm/CommandVehicle.java
Removed:
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/util/JbpmCommandVehicle.java
Modified:
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/util/AbstractCommandVehicle.java
Log:
Move jbpm classes to new packages

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/util/AbstractCommandVehicle.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/util/AbstractCommandVehicle.java	2007-02-19 19:23:32 UTC (rev 9616)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/util/AbstractCommandVehicle.java	2007-02-19 21:01:27 UTC (rev 9617)
@@ -27,7 +27,7 @@
 
 import org.jboss.soa.esb.message.Message;
 import org.jboss.soa.esb.message.format.MessageFactory;
-import org.jboss.soa.esb.util.JbpmCommandVehicle.Operation;
+import org.jboss.soa.esb.util.jbpm.CommandVehicle.Operation;
 /**
  * Auxiliary class that deals with implementation details of event messages handled by ESB aware applications.
  * <p/>The '_command' enumeration is inteded to contain all accepted command codes, and should be provided 
@@ -54,7 +54,8 @@
 	protected Map<String,Object>_values = new HashMap<String,Object>();
 
 	protected Enum	_operator;
-	public 	  Enum 	getOperator()		{ return _operator; }
+	public 	  Enum 	getOperator()				{ return _operator; }
+	protected void 	setOperator(Enum operator)	{ _operator = operator; }
 	
 	protected AbstractCommandVehicle(Enum command)
 	{

Deleted: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/util/JbpmCommandVehicle.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/util/JbpmCommandVehicle.java	2007-02-19 19:23:32 UTC (rev 9616)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/util/JbpmCommandVehicle.java	2007-02-19 21:01:27 UTC (rev 9617)
@@ -1,122 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, 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.soa.esb.util;
-
-import java.util.Map;
-import java.util.Set;
-
-import org.jboss.soa.esb.message.Message;
-import org.jbpm.graph.def.ProcessDefinition;
-import org.jbpm.jpdl.JpdlException;
-
-/**
- * 
- * Base class to use when a jBPM command should go through the wire to a jBPM aware ESB action class.
- * 
- * <p/>When more commands are added to the 'Command' enumeration, corresponding action class 
- * (org.jboss.soa.esb.actions.JbpmCommandInterpreter) should be modified accordingly in order to 
- * execute new commands
- * 
- * @author <a href="mailto:schifest at heuristica.com.ar">schifest at heuristica.com.ar</a> 
- *
- */
-public class JbpmCommandVehicle extends AbstractCommandVehicle 
-{
-	private static final long serialVersionUID = 1L;
-
-	@Override
-	public String getCommandValuesTag() { return "jBPMCommandValues"; }
-	@Override
-	public String getCommandOpcodeKey() { return "jBPMOpCode";}
-	
-	public static final String PROCESS_DEFINITION			="processDefinition";
-	public static final String PROCESS_DEFINITION_NAME		="processDefName";
-	public static final String PROCESS_DEFINITION_VERSION	="processDefVersion";
-	public static final String PROCESS_INSTANCE_ID			="instanceId";
-	public static final String TOKEN_ID						="tokenId";
-	public static final String TRANSITION_NAME				="transitionName";
-	public static final String VARIABLE_NAMES_LIST			="variableNamesList";
-	public static final String VARIABLE_VALUES				="variableValuesMap";
-	public static final String EXCEPTION     				="jbpmException";
-	public static final String ERROR_MESSAGE   				="errorMsg";
-
-	public static final String RETURN_CODE					="returnCode";
-	
-	public static final String RETCODE_OK					="OK";
-	public static final String RETCODE_INVALID_OPCODE		="invalidOpCode";
-	public static final String RETCODE_EXCEPTION			="exceptionThrown";
-	public static final String RETCODE_ERROR				="error";
-	
-
-	public enum Operation
-	{
-		deployProcessDefinition
-		,newProcessInstance
-		,signalProcess
-		,signalToken
-		,getProcessInstanceVariables
-		,setProcessInstanceVariables
-		,getTokenVariables
-		,setTokenVariables
-	}
-	
-	public JbpmCommandVehicle(Enum command) 	 { super(command); }
-	public JbpmCommandVehicle(Message message){ super(message); }
-
-	public Object getReturnCode		()			{ return			_values.get(RETURN_CODE); }
-	public ProcessDefinition getProcessDefinition()	{ return (ProcessDefinition)_values.get(PROCESS_DEFINITION); }
-	public String getProcessDefinitionName	()	{ return (String)	_values.get(PROCESS_DEFINITION_NAME); }
-	public int	  getProcessVersion	() 			{ return (Integer)	_values.get(PROCESS_DEFINITION_VERSION); }
-	public long	  getInstanceId		() 			{ return (Long)		_values.get(PROCESS_INSTANCE_ID); }
-	public long   getTokenId		() 			{ return (Long)		_values.get(TOKEN_ID); }
-	public String getTransitionName	() 			{ return (String)	_values.get(TRANSITION_NAME); }
-	@SuppressWarnings("unchecked")
-	public Set<String> getVariableNames	()		{ return (Set<String>)_values.get(VARIABLE_NAMES_LIST); }
-	@SuppressWarnings("unchecked")
-	public Map<String,Object>getVariableValues()
-	{ 
-		return (Map)_values.get(VARIABLE_VALUES); 
-	}
-	public Exception getException		()		{ return (Exception)_values.get(EXCEPTION); }
-	public String	getErrorMessage		()		{ return (String)	_values.get(ERROR_MESSAGE); }
-
-	public void	setReturnCode		(Object obj){ super.setValue(RETURN_CODE			,obj); }
-	public void	setProcessDefinition(ProcessDefinition obj) 
-		{ super.setValue(PROCESS_DEFINITION	,obj); }
-	public void	setProcessDefinition(String xmlString) throws JpdlException 
-	{ 
-		super.setValue(PROCESS_DEFINITION	,ProcessDefinition.parseXmlString(xmlString)); 
-	}
-	public void	setProcessDefinitionName(String obj){ super.setValue(PROCESS_DEFINITION_NAME,obj); }
-	public void	setProcessVersion	(int	obj){ super.setValue(PROCESS_DEFINITION_VERSION,obj); }
-	public void	setInstanceId		(long	obj){ super.setValue(PROCESS_INSTANCE_ID	,obj); }
-	public void	setTokenId			(long	obj){ super.setValue(TOKEN_ID				,obj); }
-	public void	setTransitionName 	(String	obj){ super.setValue(TRANSITION_NAME		,obj); }
-	public void setVariableNames	(Set<String> obj){ super.setValue(VARIABLE_NAMES_LIST,obj); }
-	public void setVariableValues(Map<String,Object>obj)
-	{ 
-		super.setValue(VARIABLE_VALUES,obj); 
-	}
-	public void	  setException		(Exception obj) { super.setValue(EXCEPTION, obj); }
-	public void	  setErrorMessage	(String	  obj) { super.setValue(ERROR_MESSAGE, obj); }
-
-}

Added: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/util/jbpm/CommandVehicle.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/util/jbpm/CommandVehicle.java	                        (rev 0)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/util/jbpm/CommandVehicle.java	2007-02-19 21:01:27 UTC (rev 9617)
@@ -0,0 +1,131 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, 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.soa.esb.util.jbpm;
+
+import java.util.Map;
+import java.util.Set;
+
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.util.AbstractCommandVehicle;
+import org.jbpm.graph.def.ProcessDefinition;
+import org.jbpm.jpdl.JpdlException;
+
+/**
+ * 
+ * Base class to use when a jBPM command should go through the wire to a jBPM aware ESB action class.
+ * 
+ * <p/>When more commands are added to the 'Command' enumeration, corresponding action class 
+ * (org.jboss.soa.esb.actions.JbpmCommandInterpreter) should be modified accordingly in order to 
+ * execute new commands
+ * 
+ * @author <a href="mailto:schifest at heuristica.com.ar">schifest at heuristica.com.ar</a> 
+ *
+ */
+public class CommandVehicle extends AbstractCommandVehicle 
+{
+	private static final long serialVersionUID = 1L;
+
+	@Override
+	public String getCommandValuesTag() { return "jBPMCommandValues"; }
+	@Override
+	public String getCommandOpcodeKey() { return "jBPMOpCode";}
+	
+	public static final String PROCESS_DEFINITION			="processDefinition";
+	public static final String PROCESS_DEFINITION_NAME		="processDefName";
+	public static final String PROCESS_DEFINITION_VERSION	="processDefVersion";
+	public static final String PROCESS_INSTANCE_ID			="instanceId";
+	public static final String TOKEN_ID						="tokenId";
+	public static final String TRANSITION_NAME				="transitionName";
+	public static final String VARIABLE_NAMES_LIST			="variableNamesList";
+	public static final String VARIABLE_VALUES				="variableValuesMap";
+	public static final String USER_OBJECT					="userObject";
+	public static final String EXCEPTION     				="jbpmException";
+	public static final String ERROR_MESSAGE   				="errorMsg";
+
+	public static final String RETURN_CODE					="returnCode";
+	
+	public static final String RETCODE_OK					="OK";
+	public static final String RETCODE_INVALID_OPCODE		="invalidOpCode";
+	public static final String RETCODE_EXCEPTION			="exceptionThrown";
+	public static final String RETCODE_ERROR				="error";
+	
+
+	public enum Operation
+	{
+		// Operations that the CommandInterpreter can perform
+		deployProcessDefinition
+		,newProcessInstance
+		,signalProcess
+		,signalToken
+		,getProcessInstanceVariables
+		,setProcessInstanceVariables
+		,getTokenVariables
+		,setTokenVariables
+		
+		// Operations originated in jBPM ActionHandlers
+		,responseToRequest
+		,sendMessageToEsb
+	}
+	
+	public CommandVehicle(Enum command) 	 { super(command); }
+	public CommandVehicle(Message message){ super(message); }
+
+	public Object getReturnCode		()			{ return			_values.get(RETURN_CODE); }
+	public ProcessDefinition getProcessDefinition()	{ return (ProcessDefinition)_values.get(PROCESS_DEFINITION); }
+	public String getProcessDefinitionName	()	{ return (String)	_values.get(PROCESS_DEFINITION_NAME); }
+	public int	  getProcessVersion	() 			{ return (Integer)	_values.get(PROCESS_DEFINITION_VERSION); }
+	public long	  getInstanceId		() 			{ return (Long)		_values.get(PROCESS_INSTANCE_ID); }
+	public long   getTokenId		() 			{ return (Long)		_values.get(TOKEN_ID); }
+	public String getTransitionName	() 			{ return (String)	_values.get(TRANSITION_NAME); }
+	@SuppressWarnings("unchecked")
+	public Set<String> getVariableNames	()		{ return (Set<String>)_values.get(VARIABLE_NAMES_LIST); }
+	@SuppressWarnings("unchecked")
+	public Map<String,Object>getVariableValues()
+	{ 
+		return (Map)_values.get(VARIABLE_VALUES); 
+	}
+	public Object getUserObject			()		{ return _values.get(USER_OBJECT); }
+	public Exception getException		()		{ return (Exception)_values.get(EXCEPTION); }
+	public String	getErrorMessage		()		{ return (String)	_values.get(ERROR_MESSAGE); }
+
+	public void	setReturnCode		(Object obj){ super.setValue(RETURN_CODE			,obj); }
+	public void	setProcessDefinition(ProcessDefinition obj) 
+		{ super.setValue(PROCESS_DEFINITION	,obj); }
+	public void	setProcessDefinition(String xmlString) throws JpdlException 
+	{ 
+		super.setValue(PROCESS_DEFINITION	,ProcessDefinition.parseXmlString(xmlString)); 
+	}
+	public void	setProcessDefinitionName(String obj){ super.setValue(PROCESS_DEFINITION_NAME,obj); }
+	public void	setProcessVersion	(int	obj){ super.setValue(PROCESS_DEFINITION_VERSION,obj); }
+	public void	setInstanceId		(long	obj){ super.setValue(PROCESS_INSTANCE_ID	,obj); }
+	public void	setTokenId			(long	obj){ super.setValue(TOKEN_ID				,obj); }
+	public void	setTransitionName 	(String	obj){ super.setValue(TRANSITION_NAME		,obj); }
+	public void setVariableNames	(Set<String> obj){ super.setValue(VARIABLE_NAMES_LIST,obj); }
+	public void setVariableValues(Map<String,Object>obj)
+	{ 
+		super.setValue(VARIABLE_VALUES,obj); 
+	}
+	public void	setUserObject	(Object obj)	{ super.setValue(USER_OBJECT,obj); }
+	public void	setException	(Exception obj) { super.setValue(EXCEPTION, obj); }
+	public void	setErrorMessage	(String	  obj)	{ super.setValue(ERROR_MESSAGE, obj); }
+
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/util/jbpm/CommandVehicle.java
___________________________________________________________________
Name: svn:eol-style
   + native




More information about the jboss-svn-commits mailing list