From b68ea0f2b12c4c5189c5fc7c182a1b242dc63579 Mon Sep 17 00:00:00 2001 From: Andrew Branson Date: Fri, 3 Oct 2014 23:18:47 +0200 Subject: Rolled back the renaming of existing exceptions. --- .../com/c2kernel/lifecycle/instance/Workflow.java | 42 +++++++++++----------- 1 file changed, 21 insertions(+), 21 deletions(-) (limited to 'src/main/java/com/c2kernel/lifecycle/instance/Workflow.java') diff --git a/src/main/java/com/c2kernel/lifecycle/instance/Workflow.java b/src/main/java/com/c2kernel/lifecycle/instance/Workflow.java index f1719f6..f152adc 100644 --- a/src/main/java/com/c2kernel/lifecycle/instance/Workflow.java +++ b/src/main/java/com/c2kernel/lifecycle/instance/Workflow.java @@ -22,13 +22,13 @@ package com.c2kernel.lifecycle.instance; import java.util.ArrayList; import com.c2kernel.common.AccessRightsException; -import com.c2kernel.common.CannotManage; +import com.c2kernel.common.CannotManageException; import com.c2kernel.common.InvalidCollectionModification; -import com.c2kernel.common.InvalidData; -import com.c2kernel.common.InvalidTransition; -import com.c2kernel.common.ObjectAlreadyExists; +import com.c2kernel.common.InvalidDataException; +import com.c2kernel.common.InvalidTransitionException; +import com.c2kernel.common.ObjectAlreadyExistsException; import com.c2kernel.common.ObjectCannotBeUpdated; -import com.c2kernel.common.ObjectNotFound; +import com.c2kernel.common.ObjectNotFoundException; import com.c2kernel.common.PersistencyException; import com.c2kernel.entity.C2KLocalObject; import com.c2kernel.entity.agent.Job; @@ -81,10 +81,10 @@ public class Workflow extends CompositeActivity implements C2KLocalObject addChild(predef, new GraphPoint(300, 100)); } - public History getHistory() throws InvalidData { + public History getHistory() throws InvalidDataException { if (history == null) { if (itemPath == null) - throw new InvalidData("Workflow not initialized."); + throw new InvalidDataException("Workflow not initialized."); history = new History(itemPath, this); } return history; @@ -117,24 +117,24 @@ public class Workflow extends CompositeActivity implements C2KLocalObject * @param stepPath * @param transitionID * @param reguestData - * @throws ObjectNotFound + * @throws ObjectNotFoundException * @throws AccessRightsException - * @throws InvalidTransition - * @throws InvalidData + * @throws InvalidTransitionException + * @throws InvalidDataException * @throws PersistencyException * @throws ObjectCannotBeUpdated - * @throws CannotManage + * @throws CannotManageException * @throws InvalidCollectionModification */ //requestData is xmlstring public String requestAction(AgentPath agent, String stepPath, ItemPath itemPath, int transitionID, String requestData) - throws ObjectNotFound, AccessRightsException, InvalidTransition, InvalidData, ObjectAlreadyExists, PersistencyException, ObjectCannotBeUpdated, CannotManage, InvalidCollectionModification + throws ObjectNotFoundException, AccessRightsException, InvalidTransitionException, InvalidDataException, ObjectAlreadyExistsException, PersistencyException, ObjectCannotBeUpdated, CannotManageException, InvalidCollectionModification { Logger.msg(3, "Action: " + transitionID + " " + stepPath + " by " + agent); if (search(stepPath) != null) return ((Activity) search(stepPath)).request(agent, itemPath, transitionID, requestData); else - throw new ObjectNotFound(stepPath + " not found"); + throw new ObjectNotFoundException(stepPath + " not found"); } /** @@ -196,14 +196,14 @@ public class Workflow extends CompositeActivity implements C2KLocalObject * Method initialise. * * @param systemKey - * @throws InvalidData - * @throws ObjectNotFound + * @throws InvalidDataException + * @throws ObjectNotFoundException * @throws AccessRightsException - * @throws InvalidTransition - * @throws ObjectAlreadyExists + * @throws InvalidTransitionException + * @throws ObjectAlreadyExistsException * @throws ObjectCannotBeUpdated */ - public void initialise(ItemPath itemPath, AgentPath agent) throws InvalidData + public void initialise(ItemPath itemPath, AgentPath agent) throws InvalidDataException { setItemPath(itemPath); runFirst(agent, itemPath); @@ -232,11 +232,11 @@ public class Workflow extends CompositeActivity implements C2KLocalObject * @param itemSysKey * @param type * @return - * @throws ObjectNotFound - * @throws InvalidData + * @throws ObjectNotFoundException + * @throws InvalidDataException * @throws InvalidAgentPathException */ - public ArrayList calculateJobs(AgentPath agent, ItemPath itemPath, int type) throws InvalidAgentPathException, ObjectNotFound, InvalidData + public ArrayList calculateJobs(AgentPath agent, ItemPath itemPath, int type) throws InvalidAgentPathException, ObjectNotFoundException, InvalidDataException { ArrayList jobs = new ArrayList(); if (type != 1) -- cgit v1.2.3