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/AggregationDescription.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/AggregationDescription.java')
| -rw-r--r-- | src/main/java/com/c2kernel/collection/AggregationDescription.java | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/main/java/com/c2kernel/collection/AggregationDescription.java b/src/main/java/com/c2kernel/collection/AggregationDescription.java index ec58cc1..400a91d 100644 --- a/src/main/java/com/c2kernel/collection/AggregationDescription.java +++ b/src/main/java/com/c2kernel/collection/AggregationDescription.java @@ -21,11 +21,14 @@ package com.c2kernel.collection;
/**
- * @version $Revision: 1.34 $ $Date: 2004/03/23 09:29:41 $
- * @author $Author: abranson $
+ * The description of a Collection with a graph layout. Each slot is
+ * instantiated empty in the resulting Aggregation, with ClassProps taken from
+ * the PropertyDescription outcome of the description slot's referenced Item.
*/
-import com.c2kernel.common.ObjectNotFoundException;
+import com.c2kernel.common.InvalidCollectionModification;
+import com.c2kernel.common.ObjectAlreadyExists;
+import com.c2kernel.common.ObjectNotFound;
import com.c2kernel.graph.model.Vertex;
import com.c2kernel.property.PropertyDescriptionList;
import com.c2kernel.property.PropertyUtility;
@@ -45,7 +48,7 @@ public class AggregationDescription extends Aggregation implements CollectionDes }
@Override
- public Aggregation newInstance() throws ObjectNotFoundException
+ public Aggregation newInstance() throws ObjectNotFound
{
AggregationInstance newInstance = new AggregationInstance(getName());
//for each desc member
@@ -61,9 +64,8 @@ public class AggregationDescription extends Aggregation implements CollectionDes try {
Vertex v = getLayout().getVertexById(mem.getID());
newInstance.addMember(null, PropertyUtility.createProperty(pdList), pdList.getClassProps(),v.getCentrePoint(),v.getWidth(),v.getHeight());
- } catch (MembershipException e) {
- // won't happen as we're not assigning an entity
- }
+ } catch (InvalidCollectionModification e) {
+ } catch (ObjectAlreadyExists e) { }
}
else
{
|
