[jbpm-commits] JBoss JBPM SVN: r6766 - in jbpm4/trunk/modules: pvm/src/main/java/org/jbpm/pvm/internal/history/events and 4 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Sun Oct 17 11:31:47 EDT 2010


Author: rebody
Date: 2010-10-17 11:31:46 -0400 (Sun, 17 Oct 2010)
New Revision: 6766

Added:
   jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/events/SubTaskComplete.java
Modified:
   jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/model/Event.java
   jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/repository/DeploymentImpl.java
   jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/task/TaskImpl.java
   jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/util/ReflectUtil.java
   jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/xml/Parser.java
Log:
JBPM-2416 add more task audit feature:
 task-completed
 task-skiped
 subTaskComplete

Modified: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/model/Event.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/model/Event.java	2010-10-17 14:44:27 UTC (rev 6765)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/model/Event.java	2010-10-17 15:31:46 UTC (rev 6766)
@@ -30,17 +30,28 @@
 
   /** fired when a transition is being taken */
   String TAKE = "take";
+
   /** fired when a process or an activity starts */
   String START = "start";
+
   /** fired when a process or an activity ends */
   String END = "end";
+
   /** fired when a task is assigned */
   String ASSIGN = "assign";
+
   /** fired when an assignee is reminded of a task */
   String REMIND = "remind";
+
   /** fired when a task is created */
   String TASK_CREATED = "task-created";
 
+  /** fired when a task is completed. */
+  String TASK_COMPLETED = "task-completed";
+
+  /** fired when a task is skiped. */
+  String TASK_SKIPED = "task-skiped";
+
   /** get the name of event. */
   String getName();
 }

Added: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/events/SubTaskComplete.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/events/SubTaskComplete.java	                        (rev 0)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/events/SubTaskComplete.java	2010-10-17 15:31:46 UTC (rev 6766)
@@ -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.jbpm.pvm.internal.history.events;
+
+import org.hibernate.Session;
+
+import org.jbpm.api.history.HistoryTask;
+
+import org.jbpm.pvm.internal.env.EnvironmentImpl;
+import org.jbpm.pvm.internal.history.HistoryEvent;
+import org.jbpm.pvm.internal.history.model.HistoryTaskImpl;
+import org.jbpm.pvm.internal.history.model.HistoryTaskInstanceImpl;
+import org.jbpm.pvm.internal.task.TaskImpl;
+import org.jbpm.pvm.internal.util.Clock;
+
+
+/**
+ * @author Huisheng Xu
+ */
+public class SubTaskComplete extends HistoryEvent {
+    private static final long serialVersionUID = 1L;
+    protected String outcome;
+    protected TaskImpl task;
+
+    public SubTaskComplete(TaskImpl task, String outcome) {
+        this.task = task;
+        this.outcome = outcome;
+    }
+
+    public void process() {
+        Session session = EnvironmentImpl.getFromCurrent(Session.class);
+        HistoryTaskImpl historyTask = (HistoryTaskImpl) session.load(HistoryTaskImpl.class,
+                task.getDbid());
+        historyTask.setOutcome(outcome);
+        historyTask.setEndTime(Clock.getTime());
+        historyTask.setState(HistoryTask.STATE_COMPLETED);
+
+        session.update(historyTask);
+    }
+
+    public String getOutcome() {
+        return outcome;
+    }
+
+    public TaskImpl getTask() {
+        return task;
+    }
+}

Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/repository/DeploymentImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/repository/DeploymentImpl.java	2010-10-17 14:44:27 UTC (rev 6765)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/repository/DeploymentImpl.java	2010-10-17 15:31:46 UTC (rev 6766)
@@ -166,10 +166,14 @@
     return resources.keySet();
   }
 
+  public Lob getLob(String resourceName) {
+    return resources.get(resourceName);
+  }
+
   /**
    * This method should be called before saving the deployment. It will assign a generated dbid
    * to the resource Lobs.
-   * 
+   *
    * Note: when using a database, this method must be called within an environment block!
    */
   public void initResourceLobDbids() {

Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/task/TaskImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/task/TaskImpl.java	2010-10-17 14:44:27 UTC (rev 6765)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/task/TaskImpl.java	2010-10-17 15:31:46 UTC (rev 6766)
@@ -36,6 +36,7 @@
 import org.jbpm.pvm.internal.client.ClientExecution;
 import org.jbpm.pvm.internal.env.EnvironmentImpl;
 import org.jbpm.pvm.internal.history.HistoryEvent;
+import org.jbpm.pvm.internal.history.events.SubTaskComplete;
 import org.jbpm.pvm.internal.history.events.TaskSkip;
 import org.jbpm.pvm.internal.history.events.TaskComplete;
 import org.jbpm.pvm.internal.history.events.TaskDelete;
@@ -49,7 +50,7 @@
 /**
  * is one task instance that can be assigned to an actor (read: put in someone's task list) and that
  * can trigger the continuation of execution of the token upon completion.
- * 
+ *
  * @author Tom Baeyens
  * @author Ronald van Kuijk
  */
@@ -77,13 +78,13 @@
 
   protected ExecutionImpl execution;
   protected ExecutionImpl processInstance;
-  
+
   // local storage of the execution id such that it
   // can be lazily loaded when not needed.
   protected String executionId;
-  
+
   protected String activityName;
-  
+
   protected SwimlaneImpl swimlane;
 
   protected TaskImpl superTask;
@@ -93,16 +94,16 @@
   protected Long superTaskDbid;
 
   public TaskImpl() {
-	this.state = Task.STATE_OPEN;
+    this.state = Task.STATE_OPEN;
   }
 
-  // parent for variable lookup /////////////////////////////////////////////// 
+  // parent for variable lookup ///////////////////////////////////////////////
 
   @Override
   public ScopeInstanceImpl getParentVariableScope() {
     return execution;
   }
-  
+
   @Override
   public TaskImpl getTask() {
     return this;
@@ -183,30 +184,36 @@
   }
 
   // completion ///////////////////////////////////////////////////////////////
-  
+
   public void complete() {
     complete(TaskConstants.NO_TASK_OUTCOME_SPECIFIED);
-  } 
+  }
 
   public void complete(String outcome) {
     historyTaskComplete(outcome);
-    
+
     DbSession dbSession = EnvironmentImpl.getFromCurrent(DbSession.class, false);
-    if (dbSession!=null){
+    if (dbSession != null) {
       dbSession.delete(this);
     }
 
     if (isSignalling()) {
-      ClientExecution execution = getExecution();
+      ExecutionImpl execution = getExecution();
+      execution.fire(Event.TASK_COMPLETED, execution.getActivity());
       execution.signal(outcome);
     }
-    
+
     if (superTask != null) {
       superTask.subTaskComplete(this, outcome);
     }
   }
 
   protected void subTaskComplete(TaskImpl subTask, String outcome) {
+    TaskImpl superTask = subTask.getSuperTask();
+
+    if (superTask.getExecution() != null) {
+      HistoryEvent.fire(new SubTaskComplete(subTask, outcome), execution);
+    }
   }
 
   public void delete(String reason) {
@@ -217,11 +224,15 @@
     if (outcome == null || outcome.equals("")) {
       outcome = TaskConstants.NO_TASK_OUTCOME_SPECIFIED;
     }
-    
+
+    ExecutionImpl execution = getExecution();
+    if (execution != null) {
+      execution.fire(Event.TASK_SKIPED, execution.getActivity());
+    }
     historyTaskSkip(outcome);
-    
+
     DbSession dbSession = EnvironmentImpl.getFromCurrent(DbSession.class, false);
-    if (dbSession!=null){
+    if (dbSession != null) {
       dbSession.delete(this);
     }
   }
@@ -253,7 +264,7 @@
   }
 
   public TaskImpl createSubTask(String name) {
-    // TODO look up the task definition in the current task's 
+    // TODO look up the task definition in the current task's
     // subtask definitions and in the process's task definitions
     TaskImpl subtask = createSubTask();
     subtask.setName(name);
@@ -347,7 +358,7 @@
   }
 
   // customized getters and setters //////////////////////////////////////////
-  
+
   public String getId() {
     return Long.toString(dbid);
   }
@@ -461,7 +472,7 @@
   public String getExecutionId() {
     return executionId;
   }
-  
+
   public String getActivityName() {
     return activityName;
   }

Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/util/ReflectUtil.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/util/ReflectUtil.java	2010-10-17 14:44:27 UTC (rev 6765)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/util/ReflectUtil.java	2010-10-17 15:31:46 UTC (rev 6766)
@@ -4,6 +4,7 @@
 import java.lang.reflect.Field;
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
+import java.net.URL;
 import java.util.Arrays;
 import java.util.HashMap;
 import java.util.List;
@@ -22,10 +23,6 @@
 
 public class ReflectUtil {
 
-  private ReflectUtil() {
-    // hide default constructor to prevent instantiation
-  }
-
   private static final Log log = Log.getLog(ReflectUtil.class.getName());
 
   /**
@@ -33,6 +30,10 @@
    */
   private static final Map<Class<?>, Class<?>> wrapperPrimitiveMap = createWrapperPrimitiveMap();
 
+  private ReflectUtil() {
+    // hide default constructor to prevent instantiation
+  }
+
   private static Map<Class<?>, Class<?>> createWrapperPrimitiveMap() {
     Map<Class<?>, Class<?>> map = new HashMap<Class<?>, Class<?>>();
     map.put(Boolean.class, boolean.class);
@@ -79,13 +80,16 @@
     try {
       method = clazz.getDeclaredMethod(methodName, parameterTypes);
 
-      if (log.isTraceEnabled()) log.trace("found method "+clazz.getName()+"."+methodName+"("+Arrays.toString(parameterTypes)+")");
+      if (log.isTraceEnabled()) {
+        log.trace("found method " + clazz.getName() + "." + methodName + "(" + Arrays.toString(parameterTypes) + ")");
+      }
 
     } catch (NoSuchMethodException e) {
-      if (clazz.getSuperclass()!=null) {
+      if (clazz.getSuperclass() != null) {
         return getMethod(clazz.getSuperclass(), methodName, parameterTypes, original);
       } else {
-        throw new JbpmException("couldn't find method '"+original.getName()+"."+methodName+"("+getParameterTypesText(parameterTypes)+")'", e);
+        throw new JbpmException("couldn't find method '" + original.getName() + "." + methodName
+          + "(" + getParameterTypesText(parameterTypes) + ")'", e);
       }
     }
 
@@ -93,12 +97,12 @@
   }
 
   private static String getParameterTypesText(Class<?>[] parameterTypes) {
-    if (parameterTypes==null) return "";
+    if (parameterTypes == null) return "";
     StringBuilder parameterTypesText = new StringBuilder();
-    for (int i=0; i<parameterTypes.length; i++) {
+    for (int i = 0; i < parameterTypes.length; i++) {
       Class<?> parameterType = parameterTypes[i];
       parameterTypesText.append(parameterType.getName());
-      if (i!=parameterTypes.length-1) {
+      if (i != parameterTypes.length - 1) {
         parameterTypesText.append(", ");
       }
     }
@@ -106,7 +110,7 @@
   }
 
   public static <T> T newInstance(Class<T> clazz) {
-    if (clazz==null) {
+    if (clazz == null) {
       throw new IllegalArgumentException("cannot create new instance without class");
     }
     try {
@@ -123,7 +127,9 @@
     }
 
     Class<T> clazz = constructor.getDeclaringClass();
-    if (log.isTraceEnabled()) log.trace("creating new instance for "+clazz+" with args "+Arrays.toString(args));
+    if (log.isTraceEnabled()) {
+      log.trace("creating new instance for " + clazz.getName() + " with args " + Arrays.toString(args));
+    }
     if (!constructor.isAccessible()) {
       if (log.isTraceEnabled()) log.trace("making constructor accessible");
       constructor.setAccessible(true);
@@ -148,19 +154,21 @@
     }
     try {
       Object value = field.get(object);
-      if (log.isTraceEnabled()) log.trace("got value '"+value+"' from field '"+field.getName()+"'");
+      if (log.isTraceEnabled()) {
+        log.trace("got value '" + value + "' from field '" + field.getName() + "'");
+      }
       return value;
     } catch (Exception e) {
-      throw new JbpmException("couldn't get '"+field.getName()+"'", e);
+      throw new JbpmException("couldn't get '" + field.getName() + "'", e);
     }
   }
 
   public static void set(Field field, Object object, Object value) {
-    if (field==null) {
+    if (field == null) {
       throw new NullPointerException("field is null");
     }
     try {
-      if (log.isTraceEnabled()) log.trace("setting field '"+field.getName()+"' to value '"+value+"'");
+      if (log.isTraceEnabled()) log.trace("setting field '" + field.getName() + "' to value '" + value + "'");
       if (!field.isAccessible()) {
         if (log.isTraceEnabled()) log.trace("making field accessible");
         field.setAccessible(true);
@@ -410,7 +418,7 @@
   }
 
   public static void uninstallDeploymentClassLoader(ClassLoader original) {
-    if (original!=null) {
+    if (original != null) {
       Thread.currentThread().setContextClassLoader(original);
     }
   }
@@ -446,4 +454,13 @@
     }
     return Class.forName(name);
   }
+
+  public static URL findResource(String name) {
+    ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader();
+    URL resource = contextClassLoader.getResource(name);
+    if (resource == null) {
+      resource = ReflectUtil.class.getClassLoader().getResource(name);
+    }
+    return resource;
+  }
 }

Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/xml/Parser.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/xml/Parser.java	2010-10-17 14:44:27 UTC (rev 6765)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/xml/Parser.java	2010-10-17 15:31:46 UTC (rev 6766)
@@ -40,44 +40,45 @@
 
 import org.jbpm.internal.log.Log;
 import org.jbpm.pvm.internal.stream.StreamInput;
+import org.jbpm.pvm.internal.util.ReflectUtil;
 import org.jbpm.pvm.internal.util.UrlEntity;
 import org.jbpm.pvm.internal.util.XmlUtil;
 import org.jbpm.pvm.internal.wire.Descriptor;
 import org.jbpm.pvm.internal.wire.descriptor.ArgDescriptor;
 import org.jbpm.pvm.internal.wire.xml.WireParser;
 
-/** makes typical usage of JAXP more convenient, adds a binding framework, 
+/** makes typical usage of JAXP more convenient, adds a binding framework,
  * entity resolution and error handling.
- * 
+ *
  * <h2>Purpose</h2>
  * <p>This is a base parser for the common pattern where first JAXP is used
  * to parse xml into a Document Object Model (DOM), and then, this DOM is
- * examined to build a domain model object. The main purpose of this parser 
- * is to serve as a base class for implementing such parsers and to provide 
+ * examined to build a domain model object. The main purpose of this parser
+ * is to serve as a base class for implementing such parsers and to provide
  * a more convenient API for working with JAXP.
  * </p>
- * 
- * <p>A {@link Parser} is a thread safe object.  For each parse operation, a 
- * new {@link Parse} object is created with method {@link #createParse()}.  
- * Then the parse object is used to specify the input source, execute the 
- * parse operation and extract the results. 
+ *
+ * <p>A {@link Parser} is a thread safe object.  For each parse operation, a
+ * new {@link Parse} object is created with method {@link #createParse()}.
+ * Then the parse object is used to specify the input source, execute the
+ * parse operation and extract the results.
  * </p>
- * 
+ *
  * <p>{@link Binding}s capture parsing of a certain element type. This way,
  * the parser becomes more modular and customizable.
  * </p>
- * 
- * <p>{@link Entity Entities} are schema's that specify the grammar of the 
- * XML files that are parsed by the parser. 
+ *
+ * <p>{@link Entity Entities} are schema's that specify the grammar of the
+ * XML files that are parsed by the parser.
  * </p>
- * 
+ *
  * <h2>API Usage</h2>
- * <p>Parsers can be customized by inheritance (that will be covered below), 
+ * <p>Parsers can be customized by inheritance (that will be covered below),
  * but a parser can also be used as is:
  * </p>
  *
  * <pre><i> 1 </i>|   static Parser parser = new Parser();
- *<i> 2 </i>| 
+ *<i> 2 </i>|
  *<i> 3 </i>|   void someMethod() {
  *<i> 4 </i>|     MyDomainObject mdo = (MyDomainObject) parser
  *<i> 5 </i>|             .createParse()
@@ -87,45 +88,45 @@
  *<i> 9 </i>|             .getDocumentObject();
  *<i>10 </i>|   }
  * </pre>
- * 
- * <p><b>line 1</b> shows that a single parser can be used for all threads as 
+ *
+ * <p><b>line 1</b> shows that a single parser can be used for all threads as
  * the parser is maintained in a static member field.
  * </p>
  *
- * <p><b>line 5</b> shows that a new parse operation is always started with 
- * the {@link #createParse()} operation.  The {@link Parse} object that is 
- * returned will maintain all data that is related to that single parse 
- * operation. 
+ * <p><b>line 5</b> shows that a new parse operation is always started with
+ * the {@link #createParse()} operation.  The {@link Parse} object that is
+ * returned will maintain all data that is related to that single parse
+ * operation.
  * </p>
  *
- * <p><b>line 6</b> shows how a simple XML string can be provided as the input 
- * source for the parse operation.  Alternative methods to specify the input 
- * source are {@link Parse#setFile(java.io.File)}, 
- * {@link Parse#setInputStream(java.io.InputStream)}, 
+ * <p><b>line 6</b> shows how a simple XML string can be provided as the input
+ * source for the parse operation.  Alternative methods to specify the input
+ * source are {@link Parse#setFile(java.io.File)},
+ * {@link Parse#setInputStream(java.io.InputStream)},
  * {@link Parse#setInputSource(InputSource)},
  * {@link Parse#setUrl(java.net.URL)} and
- * {@link Parse#setStreamSource(StreamInput)}. 
+ * {@link Parse#setStreamSource(StreamInput)}.
  * </p>
  *
- * <p><b>line 7</b> shows how the execution of the parse is performed.  The 
- * input source will be read, the resulting Document Object Model (DOM) will 
+ * <p><b>line 7</b> shows how the execution of the parse is performed.  The
+ * input source will be read, the resulting Document Object Model (DOM) will
  * be walked and potentially problems are produced in the parse.
  * </p>
  *
  * <p><b>line 8</b> shows how an exception can be thrown in case of an error.
- * The parse execution itself tries to keep parsing as much as possible to 
+ * The parse execution itself tries to keep parsing as much as possible to
  * provide the developer with as much feedback as possible in one parse cycle.
  * The {@link Parse#getProblems() problems} are silently captured in the parse
- * object.  If an exception is thrown by 
- * {@link Parse#checkErrors(String)}, it will contain a report of 
+ * object.  If an exception is thrown by
+ * {@link Parse#checkErrors(String)}, it will contain a report of
  * all the parsing problems.  Alternatively, the {@link Parse#getProblems() problems
- * in the parse object} could be examined directly without the need for an exception. 
+ * in the parse object} could be examined directly without the need for an exception.
  * </p>
  *
- * <p><b>line 9</b> shows how the result of the parse operation is extracted 
- * from the parse object.  
+ * <p><b>line 9</b> shows how the result of the parse operation is extracted
+ * from the parse object.
  * </p>
- * 
+ *
  * <h2 id="binding">Binding</h2>
  * <p>Bindings are the link between a certain type of element in your XML document
  * and the corresponding java object in your domain model.</p>
@@ -217,16 +218,16 @@
  * you start adding more bindings to the specialized parser.  Otherwise the
  * base parser's bindings will be updated as well.
  * </p>
- * 
+ *
  * <h2 id="buildingcustomparsers">Building custom parsers</h2>
- * 
- * <p>This parser is build for inheritance.   
- * Overriding method {@link #parseDocumentElement(Element, Parse)} can be an easy 
+ *
+ * <p>This parser is build for inheritance.
+ * Overriding method {@link #parseDocumentElement(Element, Parse)} can be an easy
  * way to start writing your own logic on walking the Document Object Model (DOM).
- * Such customizations can still be combined with the usage of 
+ * Such customizations can still be combined with the usage of
  * <a href="#binding">bindings</a>.
  * </p>
- * 
+ *
  * <h2 id="entityresolving">Entity resolving</h2>
  * <p>A parser can be configured with a set of entities with the
  * {@link #addEntity(String, Entity)} method.  The {@link UrlEntity} has
@@ -285,7 +286,7 @@
 
   // document builder methods /////////////////////////////////////////////////
 
-  /** customizable creation of a new document builder.  Used by 
+  /** customizable creation of a new document builder.  Used by
    * {@link #buildDocument(Parse)}. */
   protected DocumentBuilder createDocumentBuilder(Parse parse) {
     try {
@@ -304,12 +305,11 @@
 
   public void setSchemaResources(String... schemaResources) {
     // load resources from classpath
-    ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
     String[] schemaSources = new String[schemaResources.length];
 
     for (int i = 0; i < schemaResources.length; i++) {
       String schemaResource = schemaResources[i];
-      URL schemaLocation = classLoader.getResource(schemaResource);
+      URL schemaLocation = ReflectUtil.findResource(schemaResource);
       if (schemaLocation != null) {
         log.info("loading schema resource: " + schemaResource);
         schemaSources[i] = schemaLocation.toString();
@@ -388,15 +388,15 @@
   }
 
   // runtime parsing methods //////////////////////////////////////////////////
-  
-  /** main method to start a new parse, check {@link Parse} for specifying 
+
+  /** main method to start a new parse, check {@link Parse} for specifying
    * input, executing the parse and extracting the results. */
   public Parse createParse() {
     return new Parse(this);
   }
 
-  /** builds a dom from the importedStreamSource and appends the child elements 
-   * of the document element to the destination element.  Problems are reported 
+  /** builds a dom from the importedStreamSource and appends the child elements
+   * of the document element to the destination element.  Problems are reported
    * in the importingParse. */
   public void importStream(StreamInput importedStreamInput, Element destination, Parse importingParse) {
     try {
@@ -466,15 +466,15 @@
   // Document Object Model walking ////////////////////////////////////////////
 
   /** start of the DOM walk.
-   * 
-   * This method is used as part of 
+   *
+   * This method is used as part of
    * {@link #execute(Parse) the parse execution}.
-   * 
-   * This default implementation behaviour extracts the document element and 
+   *
+   * This default implementation behaviour extracts the document element and
    * delegates to {@link #parseDocumentElement(Element, Parse)}.
    *
    * This method can be overridden for customized behaviour.
-   * 
+   *
    * @return the object that is the result from parsing this document. */
   public Object parseDocument(Document document, Parse parse) {
     Object object = parseDocumentElement(document.getDocumentElement(), parse);
@@ -482,29 +482,29 @@
     return object;
   }
 
-  /** parses the top level element in the document and produces the object that 
-   * is the result from the parsing. 
+  /** parses the top level element in the document and produces the object that
+   * is the result from the parsing.
    *
    * @return the object that is the result from parsing this document element. */
   public Object parseDocumentElement(Element documentElement, Parse parse) {
     return parseElement(documentElement, parse);
   }
 
-  /** parses an arbitrary element in the document with the first matching 
+  /** parses an arbitrary element in the document with the first matching
    * binding found using any of the categories.
-   * 
+   *
    * @return the object that is the result from parsing this element. */
   public Object parseElement(Element element, Parse parse) {
     return parseElement(element, parse, null);
   }
 
-  /** parses an arbitrary element in the document based on the bindings in the 
+  /** parses an arbitrary element in the document based on the bindings in the
    * given category.
-   * 
-   * @param category is the category in which the tagName should be resolved to 
-   *   a {@link Binding}.  If category is null, all the categories will be 
+   *
+   * @param category is the category in which the tagName should be resolved to
+   *   a {@link Binding}.  If category is null, all the categories will be
    *   scanned for an appropriate binding in random order.
-   * 
+   *
    * @return the object that is the result from parsing this element. */
   public Object parseElement(Element element, Parse parse, String category) {
     Object object = null;



More information about the jbpm-commits mailing list