[jboss-svn-commits] JBL Code SVN: r38232 - in labs/jbossesb/branches/JBESB_4_11_CP/product/services/jbpm5: src/main/java/org/jboss/soa/esb/services/jbpm5/actions and 1 other directories.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Fri Oct 19 12:49:14 EDT 2012
Author: tcunning
Date: 2012-10-19 12:49:14 -0400 (Fri, 19 Oct 2012)
New Revision: 38232
Modified:
labs/jbossesb/branches/JBESB_4_11_CP/product/services/jbpm5/build.xml
labs/jbossesb/branches/JBESB_4_11_CP/product/services/jbpm5/src/main/java/org/jboss/soa/esb/services/jbpm5/actions/AbstractBpm5Action.java
labs/jbossesb/branches/JBESB_4_11_CP/product/services/jbpm5/src/main/java/org/jboss/soa/esb/services/jbpm5/actions/Bpm5Callback.java
labs/jbossesb/branches/JBESB_4_11_CP/product/services/jbpm5/src/main/java/org/jboss/soa/esb/services/jbpm5/actions/Bpm5Processor.java
labs/jbossesb/branches/JBESB_4_11_CP/product/services/jbpm5/src/main/java/org/jboss/soa/esb/services/jbpm5/actions/BpmParameterMapper.java
labs/jbossesb/branches/JBESB_4_11_CP/product/services/jbpm5/src/main/java/org/jboss/soa/esb/workitem/esb/ESBActionWorkItemHandler.java
Log:
JBESB-3863
Clean up javadoc warnings in source and create a javadoc JAR for the jbpm5 integration classes.
Modified: labs/jbossesb/branches/JBESB_4_11_CP/product/services/jbpm5/build.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_11_CP/product/services/jbpm5/build.xml 2012-10-18 20:07:43 UTC (rev 38231)
+++ labs/jbossesb/branches/JBESB_4_11_CP/product/services/jbpm5/build.xml 2012-10-19 16:49:14 UTC (rev 38232)
@@ -6,7 +6,29 @@
<target name="service-prepare">
</target>
+
+ <target name="service-dist" depends="javadoc">
+ </target>
- <target name="test" depends="base.test"/>
+ <target name="test" depends="base.test, javadoc"/>
+ <target name="javadoc">
+ <mkdir dir="build/javadoc"/>
+ <path id="javadocs.path">
+ <pathelement path="src/main/java"/>
+ </path>
+ <javadoc
+ sourcepathref="javadocs.path"
+ destdir="build/javadoc"
+ packagenames="org.jboss.soa.*">
+ <classpath>
+ <path refid="base-classpath"/>
+ </classpath>
+ </javadoc>
+
+ <zip zipfile="build/jbossesb-jbpm5-javadoc.zip">
+ <zipfileset dir="build/javadoc" includes="**"/>
+ </zip>
+ </target>
+
</project>
Modified: labs/jbossesb/branches/JBESB_4_11_CP/product/services/jbpm5/src/main/java/org/jboss/soa/esb/services/jbpm5/actions/AbstractBpm5Action.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_11_CP/product/services/jbpm5/src/main/java/org/jboss/soa/esb/services/jbpm5/actions/AbstractBpm5Action.java 2012-10-18 20:07:43 UTC (rev 38231)
+++ labs/jbossesb/branches/JBESB_4_11_CP/product/services/jbpm5/src/main/java/org/jboss/soa/esb/services/jbpm5/actions/AbstractBpm5Action.java 2012-10-19 16:49:14 UTC (rev 38232)
@@ -130,7 +130,15 @@
WorkItemHandler wih = (WorkItemHandler) handlerKlass.getDeclaredConstructor(KnowledgeRuntime.class).newInstance(session);
return wih;
}
-
+
+ /**
+ * @param wih
+ * @throws ClassNotFoundException
+ * @throws InstantiationException
+ * @throws NoSuchMethodException
+ * @throws IllegalAccessException
+ * @throws InvocationTargetException
+ */
public void connectHandler(WorkItemHandler wih)
throws ClassNotFoundException, InstantiationException, NoSuchMethodException, IllegalAccessException,
InvocationTargetException {
@@ -142,8 +150,14 @@
connectMethod.invoke(wih);
}
+ /**
+ * Get the StatefulKnowledgeSession - using an ID from the message - or create a new one.
+ * @param message Message to search for session information
+ * @return StatefulKnowledgeSession, either loaded or new
+ * @throws ActionProcessingException
+ */
public StatefulKnowledgeSession getSession(Message message) throws ActionProcessingException {
- StatefulKnowledgeSession ksession ;
+ StatefulKnowledgeSession ksession;
WorkItemHandler khandler;
int sessionId = getSessionId(message);
@@ -158,7 +172,7 @@
throw new ActionProcessingException(e);
}
- // Register ESB WorkItemHandler as well
+ // Register ESB WorkItemHandler as well
ESBServiceWorkItemHandler esbhandler = new ESBServiceWorkItemHandler();
ESBActionWorkItemHandler actionhandler = new ESBActionWorkItemHandler();
ksession.getWorkItemManager().registerWorkItemHandler("JBossESB", esbhandler);
@@ -182,7 +196,7 @@
/**
* Return a knowledge session configuration.
* @param props
- * @return
+ * @return session configuration
*/
public static KnowledgeSessionConfiguration getSessionConfiguration(Properties props) {
KnowledgeSessionConfiguration ksess = KnowledgeBaseFactory.newKnowledgeSessionConfiguration(props);
@@ -193,8 +207,8 @@
/**
* Returns an environment with an entity manager factory, transaction manager, and user
* transaction configured.
- * @param overrides
- * @return
+ * @param overrides map of override properties
+ * @return environment with transaction settings
*/
public Environment getEnvironment(Map<String, Object> overrides) {
Environment env = KnowledgeBaseFactory.newEnvironment();
@@ -213,7 +227,7 @@
/**
* Gets the user transaction from JNDI.
- * @return
+ * @return the user transaction from JNDI
*/
public static UserTransaction getUserTransaction() {
UserTransaction ut = null;
@@ -230,7 +244,7 @@
/**
* Gets the transaction manager from JNDI.
- * @return
+ * @return the transaction manager from JNDI
*/
public static TransactionManager getTransactionManager() {
TransactionManager tm = null;
Modified: labs/jbossesb/branches/JBESB_4_11_CP/product/services/jbpm5/src/main/java/org/jboss/soa/esb/services/jbpm5/actions/Bpm5Callback.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_11_CP/product/services/jbpm5/src/main/java/org/jboss/soa/esb/services/jbpm5/actions/Bpm5Callback.java 2012-10-18 20:07:43 UTC (rev 38231)
+++ labs/jbossesb/branches/JBESB_4_11_CP/product/services/jbpm5/src/main/java/org/jboss/soa/esb/services/jbpm5/actions/Bpm5Callback.java 2012-10-19 16:49:14 UTC (rev 38232)
@@ -24,15 +24,27 @@
import org.drools.runtime.StatefulKnowledgeSession;
+/**
+ * @author tcunning
+ *
+ */
public class Bpm5Callback extends AbstractBpm5Action {
protected static Logger logger = Logger.getLogger(Bpm5Callback.class);
public static final String JBPM_CALL_BACK_SERVICE_NAME = "JBpm5CallbackService";
- public Bpm5Callback(ConfigTree configTree) throws ConfigurationException {
+ /**
+ * Constructor.
+ * @param configTree
+ * @throws ConfigurationException
+ */
+ public Bpm5Callback(ConfigTree configTree) throws ConfigurationException {
super(configTree, logger) ;
}
+ /* (non-Javadoc)
+ * @see org.jboss.soa.esb.actions.ActionPipelineProcessor#process(org.jboss.soa.esb.message.Message)
+ */
public Message process(Message message) throws ActionProcessingException {
// Retriever workItemId / processInstanceId from the EPR
EPR toEpr = message.getHeader().getCall().getTo();
@@ -68,8 +80,8 @@
/**
* Return the session id from the context id.
- * @param msg
- * @return
+ * @param msg message to get the session id from
+ * @return session id
*/
public int getSessionId(Message msg) {
int id = -1;
Modified: labs/jbossesb/branches/JBESB_4_11_CP/product/services/jbpm5/src/main/java/org/jboss/soa/esb/services/jbpm5/actions/Bpm5Processor.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_11_CP/product/services/jbpm5/src/main/java/org/jboss/soa/esb/services/jbpm5/actions/Bpm5Processor.java 2012-10-18 20:07:43 UTC (rev 38231)
+++ labs/jbossesb/branches/JBESB_4_11_CP/product/services/jbpm5/src/main/java/org/jboss/soa/esb/services/jbpm5/actions/Bpm5Processor.java 2012-10-19 16:49:14 UTC (rev 38232)
@@ -58,6 +58,11 @@
protected String processId;
protected String processAction;
+ /**
+ * Constructor
+ * @param configTree
+ * @throws ConfigurationException
+ */
public Bpm5Processor(ConfigTree configTree) throws ConfigurationException
{
super(configTree, logger) ;
@@ -89,6 +94,9 @@
}
+ /* (non-Javadoc)
+ * @see org.jboss.soa.esb.actions.ActionPipelineProcessor#process(org.jboss.soa.esb.message.Message)
+ */
public Message process(Message message) throws ActionProcessingException {
// Add security context to message context.
addSecurityContext(message);
@@ -169,8 +177,8 @@
/**
* Return the session id from the context id.
- * @param msg
- * @return
+ * @param msg message to get the session Id from
+ * @return session id
*/
public int getSessionId(Message msg) {
int id = -1;
@@ -183,8 +191,8 @@
/**
* Return the process instance id from the message context.
- * @param msg
- * @return
+ * @param msg message to get the process instance id from
+ * @return process instance id
*/
public Long getProcessInstanceId(Message msg) {
Long id = null;
Modified: labs/jbossesb/branches/JBESB_4_11_CP/product/services/jbpm5/src/main/java/org/jboss/soa/esb/services/jbpm5/actions/BpmParameterMapper.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_11_CP/product/services/jbpm5/src/main/java/org/jboss/soa/esb/services/jbpm5/actions/BpmParameterMapper.java 2012-10-18 20:07:43 UTC (rev 38231)
+++ labs/jbossesb/branches/JBESB_4_11_CP/product/services/jbpm5/src/main/java/org/jboss/soa/esb/services/jbpm5/actions/BpmParameterMapper.java 2012-10-19 16:49:14 UTC (rev 38232)
@@ -48,7 +48,7 @@
* BPM property.
* @param msg message
* @param tree ConfigTree
- * @return
+ * @return map of properties retrieved from the Message and ConfigTree
*/
public static Map<String,Object> mapPropertiesToParams(Message msg,
ConfigTree tree) {
Modified: labs/jbossesb/branches/JBESB_4_11_CP/product/services/jbpm5/src/main/java/org/jboss/soa/esb/workitem/esb/ESBActionWorkItemHandler.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_11_CP/product/services/jbpm5/src/main/java/org/jboss/soa/esb/workitem/esb/ESBActionWorkItemHandler.java 2012-10-18 20:07:43 UTC (rev 38231)
+++ labs/jbossesb/branches/JBESB_4_11_CP/product/services/jbpm5/src/main/java/org/jboss/soa/esb/workitem/esb/ESBActionWorkItemHandler.java 2012-10-19 16:49:14 UTC (rev 38232)
@@ -73,6 +73,12 @@
private transient Logger logger = Logger.getLogger(ESBActionWorkItemHandler.class);
private static transient LRUCache<String, ServiceInvoker> siCache = new LRUCache<String, ServiceInvoker>(20);
+ /**
+ * Retrieve category/service/session ID information from the workItem - as well as the
+ * callback category and service information - and
+ * @param workItem
+ * @param manager
+ */
public void executeWorkItem(WorkItem workItem, WorkItemManager manager) {
esbCategoryName = (String) workItem.getParameter("ServiceCategory");
@@ -177,6 +183,11 @@
logger.debug("Message send successfully");
}
+ /**
+ * Empty abortWorkItem implementation.
+ * @param workItem work item
+ * @param manager manager
+ */
public void abortWorkItem(WorkItem workItem, WorkItemManager manager) {
}
@@ -211,9 +222,8 @@
* EsbMessage before it is passed onto the ESB. Other parameters added
* are the returnVariable mapping, the nodeId and the tokenId.
*
- * @param returnVars - XML fragment from the processdefinition.xml describing
- * the mapping of ESB Message objects to the jBPM variableMap.
- * @param executionContext of the currently invoked EsbActionHandler.
+ * @param workItem the work item
+ * @param manager the work item manager
* @return the replyTo EPR of the JBpmCallbackService.
*/
protected EPR createReplyTo(WorkItem workItem, WorkItemManager manager)
@@ -234,9 +244,8 @@
/**
* Sets the faultTo EPR. This way jBPM can handle a failure in the ESB service by taking a
* exception (faultTo) transition.
- * @param returnVars - XML fragment from the processdefinition.xml describing
- * the mapping of ESB Message objects to the jBPM variableMap.
- * @param executionContext of the currently invoked EsbActionHandler.
+ * @param workItem the work item
+ * @param manager the work item manager
* @return the faultTo EPR of the JBpmCallbackService.
*/
protected EPR createFaultTo(WorkItem workItem, WorkItemManager manager)
@@ -253,11 +262,21 @@
return faultTo;
}
+ /**
+ * Returns true/false whether the REPLY_TO or FAULT_TO parameters are set on the workItem.
+ * @param workItem work item
+ * @return whether the either reply_to or fault_to are set
+ */
public static boolean isReplyToOrFaultToSet(final WorkItem workItem)
{
return workItem.getParameter(REPLY_TO) != null || workItem.getParameter(FAULT_TO) != null;
}
+ /**
+ * Sets the relates to message ID in the header.
+ * @param workItem work item
+ * @param message message
+ */
public static void setRelatesToMessageId(final WorkItem workItem, final Message message)
{
final URI esbMessageId = (URI) workItem.getParameter(ESB_MESSAGE_ID);
More information about the jboss-svn-commits
mailing list