diff options
| author | Andrew Branson <andrew.branson@cern.ch> | 2014-10-03 17:30:41 +0200 |
|---|---|---|
| committer | Andrew Branson <andrew.branson@cern.ch> | 2014-10-03 17:30:41 +0200 |
| commit | 275d0bbf555c8917be82ce4cc21eb4cabb00f4c5 (patch) | |
| tree | ddcc6b14077d90d1b970b67829f07120547dbb62 /src/main/java/com/c2kernel/collection/AggregationInstance.java | |
| parent | a139f95bfeca603333b8c0310ae09c6805e58584 (diff) | |
Huge exception overhaul: Merged ClusterStorageException with
PersistencyException. Replaced MembershipException with
InvalidCollectionModification CORBA Exception. Made all predef steps
throw more accurate exceptions when they go wrong, and let more
exceptions bubble through from underneath.
Diffstat (limited to 'src/main/java/com/c2kernel/collection/AggregationInstance.java')
| -rw-r--r-- | src/main/java/com/c2kernel/collection/AggregationInstance.java | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/main/java/com/c2kernel/collection/AggregationInstance.java b/src/main/java/com/c2kernel/collection/AggregationInstance.java index e01fe12..2de6b7f 100644 --- a/src/main/java/com/c2kernel/collection/AggregationInstance.java +++ b/src/main/java/com/c2kernel/collection/AggregationInstance.java @@ -21,10 +21,12 @@ package com.c2kernel.collection;
/**
- * @version $Revision: 1.30 $ $Date: 2003/06/04 13:21:24 $
- * @author $Author: abranson $
+ * Instance of an Aggregation. Unlike in the description, Items may only be
+ * assigned to one slot.
*/
+import com.c2kernel.common.InvalidCollectionModification;
+import com.c2kernel.common.ObjectAlreadyExists;
import com.c2kernel.graph.model.GraphPoint;
import com.c2kernel.lookup.ItemPath;
import com.c2kernel.utils.CastorHashMap;
@@ -45,20 +47,20 @@ public class AggregationInstance extends Aggregation @Override
public AggregationMember addMember(ItemPath itemPath, CastorHashMap props, String classProps)
- throws MembershipException
+ throws InvalidCollectionModification, ObjectAlreadyExists
{
if( itemPath != null && exists(itemPath))
- throw new MembershipException(itemPath+" already exists in this collection.");
+ throw new ObjectAlreadyExists(itemPath+" already exists in this collection.");
else
return super.addMember(itemPath, props, classProps);
}
- @Override
+ @Override
public AggregationMember addMember(ItemPath itemPath, CastorHashMap props, String classProps, GraphPoint location, int w, int h)
- throws MembershipException
+ throws InvalidCollectionModification, ObjectAlreadyExists
{
if( itemPath != null && exists(itemPath))
- throw new MembershipException(itemPath+" already exists in this collection.");
+ throw new ObjectAlreadyExists(itemPath+" already exists in this collection.");
else
return super.addMember(itemPath, props, classProps, location, w, h);
}
|
