diff options
Diffstat (limited to 'src/main/java/com/c2kernel/lifecycle/instance/predefined/RemoveSlotFromCollection.java')
| -rw-r--r-- | src/main/java/com/c2kernel/lifecycle/instance/predefined/RemoveSlotFromCollection.java | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/main/java/com/c2kernel/lifecycle/instance/predefined/RemoveSlotFromCollection.java b/src/main/java/com/c2kernel/lifecycle/instance/predefined/RemoveSlotFromCollection.java index 061202d..7bd921b 100644 --- a/src/main/java/com/c2kernel/lifecycle/instance/predefined/RemoveSlotFromCollection.java +++ b/src/main/java/com/c2kernel/lifecycle/instance/predefined/RemoveSlotFromCollection.java @@ -25,8 +25,8 @@ import java.util.Arrays; import com.c2kernel.collection.Collection;
import com.c2kernel.collection.CollectionMember;
-import com.c2kernel.common.InvalidData;
-import com.c2kernel.common.ObjectNotFound;
+import com.c2kernel.common.InvalidDataException;
+import com.c2kernel.common.ObjectNotFoundException;
import com.c2kernel.common.PersistencyException;
import com.c2kernel.lookup.AgentPath;
import com.c2kernel.lookup.ItemPath;
@@ -55,12 +55,12 @@ public class RemoveSlotFromCollection extends PredefinedStep * 0 - collection name
* 1 - slot number OR if null:
* 2 - target entity key
- * @throws ObjectNotFound
+ * @throws ObjectNotFoundException
* @throws PersistencyException
*/
@Override
protected String runActivityLogic(AgentPath agent, ItemPath item,
- int transitionID, String requestData) throws InvalidData, ObjectNotFound, PersistencyException {
+ int transitionID, String requestData) throws InvalidDataException, ObjectNotFoundException, PersistencyException {
String collName;
int slotNo = -1;
@@ -76,11 +76,11 @@ public class RemoveSlotFromCollection extends PredefinedStep if (params.length>1 && params[1].length()>0) slotNo = Integer.parseInt(params[1]);
if (params.length>2 && params[2].length()>0) currentChild = new ItemPath(params[2]);
} catch (Exception e) {
- throw new InvalidData("RemoveSlotFromCollection: Invalid parameters "+Arrays.toString(params));
+ throw new InvalidDataException("RemoveSlotFromCollection: Invalid parameters "+Arrays.toString(params));
}
if (slotNo == -1 && currentChild == null)
- throw new InvalidData("RemoveSlotFromCollection: Must give either slot number or entity key");
+ throw new InvalidDataException("RemoveSlotFromCollection: Must give either slot number or entity key");
// load collection
try {
@@ -98,7 +98,7 @@ public class RemoveSlotFromCollection extends PredefinedStep // if both parameters are supplied, check the given item is actually in that slot
if (slot != null && currentChild != null && !slot.getItemPath().equals(currentChild)) {
- throw new ObjectNotFound("RemoveSlotFromCollection: Item "+currentChild+" was not in slot "+slotNo);
+ throw new ObjectNotFoundException("RemoveSlotFromCollection: Item "+currentChild+" was not in slot "+slotNo);
}
if (slotNo == -1) { // find slot from entity key
@@ -110,7 +110,7 @@ public class RemoveSlotFromCollection extends PredefinedStep }
}
if (slotNo == -1) {
- throw new ObjectNotFound("Could not find "+currentChild+" in collection "+coll.getName());
+ throw new ObjectNotFoundException("Could not find "+currentChild+" in collection "+coll.getName());
}
// Remove the slot
|
