summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Branson <andrew.branson@cern.ch>2014-10-09 11:45:27 +0200
committerAndrew Branson <andrew.branson@cern.ch>2014-10-09 11:45:27 +0200
commitc634673bbf70f92a40abf29740664945981015f8 (patch)
treef05b1ce6fbfc292b08a4b3527dde063c71b8eb64
parent4c7fd676b145af3c74be374f878892bbb1168784 (diff)
Add abstract runActivityLogic to PredefinedStep, to insist that the
subclasses implement it.
-rw-r--r--src/main/java/org/cristalise/kernel/lifecycle/instance/predefined/PredefinedStep.java23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/main/java/org/cristalise/kernel/lifecycle/instance/predefined/PredefinedStep.java b/src/main/java/org/cristalise/kernel/lifecycle/instance/predefined/PredefinedStep.java
index c8a293e..6e98c60 100644
--- a/src/main/java/org/cristalise/kernel/lifecycle/instance/predefined/PredefinedStep.java
+++ b/src/main/java/org/cristalise/kernel/lifecycle/instance/predefined/PredefinedStep.java
@@ -24,10 +24,19 @@ import java.io.StringReader;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
+import org.cristalise.kernel.common.CannotManageException;
+import org.cristalise.kernel.common.InvalidCollectionModification;
+import org.cristalise.kernel.common.InvalidDataException;
+import org.cristalise.kernel.common.ObjectAlreadyExistsException;
+import org.cristalise.kernel.common.ObjectCannotBeUpdated;
+import org.cristalise.kernel.common.ObjectNotFoundException;
+import org.cristalise.kernel.common.PersistencyException;
import org.cristalise.kernel.lifecycle.instance.Activity;
import org.cristalise.kernel.lifecycle.instance.predefined.agent.AgentPredefinedStepContainer;
import org.cristalise.kernel.lifecycle.instance.predefined.item.ItemPredefinedStepContainer;
import org.cristalise.kernel.lifecycle.instance.predefined.server.ServerPredefinedStepContainer;
+import org.cristalise.kernel.lookup.AgentPath;
+import org.cristalise.kernel.lookup.ItemPath;
import org.cristalise.kernel.persistency.outcome.Outcome;
import org.cristalise.kernel.utils.Logger;
import org.w3c.dom.CDATASection;
@@ -127,6 +136,20 @@ public abstract class PredefinedStep extends Activity
return "PredefinedStepOutcome"; // default to standard if not found - server may be a newer version
}
+ /**
+ * All predefined steps must override this to implement their action
+ */
+ @Override
+ protected abstract String runActivityLogic(AgentPath agent, ItemPath itemPath,
+ int transitionID, String requestData) throws
+ InvalidDataException,
+ InvalidCollectionModification,
+ ObjectAlreadyExistsException,
+ ObjectCannotBeUpdated,
+ ObjectNotFoundException,
+ PersistencyException,
+ CannotManageException;
+
// generic bundling of parameters
static public String bundleData(String[] data)
{