[jboss-svn-commits] JBL Code SVN: r11187 - labs/jbossesb/trunk/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/actions.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Sat Apr 21 10:02:45 EDT 2007


Author: estebanschifman
Date: 2007-04-21 10:02:45 -0400 (Sat, 21 Apr 2007)
New Revision: 11187

Added:
   labs/jbossesb/trunk/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/actions/SingleCommandProcessor.java
Log:
oops - put SingleCommandProcessor back

Added: labs/jbossesb/trunk/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/actions/SingleCommandProcessor.java
===================================================================
--- labs/jbossesb/trunk/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/actions/SingleCommandProcessor.java	                        (rev 0)
+++ labs/jbossesb/trunk/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/actions/SingleCommandProcessor.java	2007-04-21 14:02:45 UTC (rev 11187)
@@ -0,0 +1,71 @@
+/*
+ * 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.services.jbpm.actions;
+
+import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.actions.ActionProcessingException;
+import org.jboss.soa.esb.addressing.MalformedEPRException;
+import org.jboss.soa.esb.couriers.CourierException;
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.services.jbpm.Constants;
+
+/**
+*
+* Extend CommandInterpreter by specializing it to a single jBPM command.
+* Part of the message content will be taken from constructor time configuration
+* (from the action configuration XML)
+* 
+* @author <a href="mailto:schifest at heuristica.com.ar">schifest at heuristica.com.ar</a> 
+*/
+public class SingleCommandProcessor extends CommandInterpreter
+{
+
+	public static final String COMMAND_ATTRIBUTE_TAG	= "command";
+
+	public SingleCommandProcessor(ConfigTree config) throws ConfigurationException
+	{ 
+		super(config); 
+	}
+	public Constants.OpCode getOpCode() { return _prepro.getOpCode(); }
+	@Override
+	protected void checkMyParms() throws ConfigurationException
+	{
+		_prepro	= MessagePreprocessorFactory.getInstance().getPreProcessor(_config);
+	} // _______________________________
+	
+	@Override
+	public Message process(Message message)
+		throws MalformedEPRException, CourierException, ActionProcessingException
+	{
+		_prepro.preFormat(message);
+		return super.process(message);
+	} // _______________________________
+	
+	protected MessagePreprocessor _prepro;
+	public interface MessagePreprocessor
+	{
+		public Constants.OpCode getOpCode();
+		public void preFormat(Message message);
+	}
+}


Property changes on: labs/jbossesb/trunk/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/actions/SingleCommandProcessor.java
___________________________________________________________________
Name: svn:eol-style
   + native




More information about the jboss-svn-commits mailing list