diff options
| author | Andrew Branson <andrew.branson@cern.ch> | 2014-05-07 17:33:13 +0200 |
|---|---|---|
| committer | Andrew Branson <andrew.branson@cern.ch> | 2014-05-08 16:37:39 +0200 |
| commit | a1f0ecbb6a2bea6aa214322c412af2f3c5ce124b (patch) | |
| tree | 4d74229b6dd9cfd7ce054e06bf740b9a63a578d6 /src/main/java/com/c2kernel/collection/Aggregation.java | |
| parent | 6dfa1bbe05a712174e937af89d5223e98d9d7d06 (diff) | |
Agent now extends Item, so they can have workflows. All traces of the
old 'Entity' superclasses should be removed, including proxies and
paths. Very large change, breaks API compatibility with CRISTAL 2.x.
Fixes #135
Diffstat (limited to 'src/main/java/com/c2kernel/collection/Aggregation.java')
| -rw-r--r-- | src/main/java/com/c2kernel/collection/Aggregation.java | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/main/java/com/c2kernel/collection/Aggregation.java b/src/main/java/com/c2kernel/collection/Aggregation.java index 063eb77..f2ef710 100644 --- a/src/main/java/com/c2kernel/collection/Aggregation.java +++ b/src/main/java/com/c2kernel/collection/Aggregation.java @@ -6,8 +6,8 @@ import com.c2kernel.common.ObjectNotFoundException; import com.c2kernel.graph.model.GraphModel;
import com.c2kernel.graph.model.GraphPoint;
import com.c2kernel.graph.model.TypeNameAndConstructionInfo;
-import com.c2kernel.lookup.EntityPath;
-import com.c2kernel.lookup.InvalidEntityPathException;
+import com.c2kernel.lookup.ItemPath;
+import com.c2kernel.lookup.InvalidItemPathException;
import com.c2kernel.persistency.ClusterStorage;
import com.c2kernel.process.Gateway;
import com.c2kernel.utils.CastorHashMap;
@@ -50,12 +50,12 @@ abstract public class Aggregation extends Parent2ChildCollection<AggregationMemb return mVertexTypeNameAndConstructionInfo;
}
- public boolean exists(int entityKey)
+ public boolean exists(int sysKey)
{
for (int i=0; i<size(); i++)
{
AggregationMember element = mMembers.list.get(i);
- if (element.getEntityKey() == entityKey)
+ if (element.getSystemKey() == sysKey)
return true;
}
return false;
@@ -96,15 +96,15 @@ abstract public class Aggregation extends Parent2ChildCollection<AggregationMemb Logger.msg(8, "AggregationDescription::addSlot new slot linked to vertexid " + vertex.getID());
return aggMem;
}
- public AggregationMember addMember(int entityKey, CastorHashMap props, String classProps, GraphPoint location, int w, int h)
+ public AggregationMember addMember(int sysKey, CastorHashMap props, String classProps, GraphPoint location, int w, int h)
throws MembershipException
{
AggregationMember aggMem = addSlot(props, classProps, location, w, h);
- if (entityKey > -1) { // some clients use this method when not setting a member
- aggMem.assignEntity(entityKey);
- aggMem.setIsComposite( getIsComposite(entityKey, getName()) );
+ if (sysKey > -1) { // some clients use this method when not setting a member
+ aggMem.assignItem(sysKey);
+ aggMem.setIsComposite( getIsComposite(sysKey, getName()) );
}
- Logger.msg(8, "AggregationDescription::addMember(" + entityKey + ") assigned to new slot " + aggMem.getID());
+ Logger.msg(8, "AggregationDescription::addMember(" + sysKey + ") assigned to new slot " + aggMem.getID());
return aggMem;
}
@@ -130,7 +130,7 @@ abstract public class Aggregation extends Parent2ChildCollection<AggregationMemb public void removeMember(int memberId) throws MembershipException {
for (AggregationMember element : mMembers.list) {
if (element.getID() == memberId) {
- element.clearEntity();
+ element.clearItem();
mLayout.removeVertex(getLayout().getVertexById(memberId));
return;
}
@@ -142,11 +142,11 @@ abstract public class Aggregation extends Parent2ChildCollection<AggregationMemb {
if (entityKey == -1) return false;
try {
- for(String collName: Gateway.getProxyManager().getProxy(new EntityPath(entityKey)).getContents(ClusterStorage.COLLECTION) )
+ for(String collName: Gateway.getProxyManager().getProxy(new ItemPath(entityKey)).getContents(ClusterStorage.COLLECTION) )
if (name == null || name.equals(collName)) return true;
} catch (ObjectNotFoundException e) {
return false;
- } catch (InvalidEntityPathException e) {
+ } catch (InvalidItemPathException e) {
return false;
}
return false;
|
