From 0ec8481c10cd8277d84c7c1a785483a0a739e5a0 Mon Sep 17 00:00:00 2001 From: abranson Date: Thu, 4 Aug 2011 00:42:34 +0200 Subject: More code cleanup: Refactored Entity Proxy Subscription to handle generics better Rewrote RemoteMap to use TreeMap instead of the internal array for order. It now sorts its keys by number if they parse, else as strings. Removed a no-longer-in-progress outcome form class --- .../c2kernel/lifecycle/CompositeActivityDef.java | 26 ++++++++++++---------- 1 file changed, 14 insertions(+), 12 deletions(-) mode change 100755 => 100644 source/com/c2kernel/lifecycle/CompositeActivityDef.java (limited to 'source/com/c2kernel/lifecycle/CompositeActivityDef.java') diff --git a/source/com/c2kernel/lifecycle/CompositeActivityDef.java b/source/com/c2kernel/lifecycle/CompositeActivityDef.java old mode 100755 new mode 100644 index a46cc50..86b6f88 --- a/source/com/c2kernel/lifecycle/CompositeActivityDef.java +++ b/source/com/c2kernel/lifecycle/CompositeActivityDef.java @@ -51,7 +51,7 @@ public class CompositeActivityDef extends ActivityDef /** * Method addNextDef. - * + * * @param origin * @param terminus * @return NextDef @@ -64,7 +64,7 @@ public class CompositeActivityDef extends ActivityDef } /** * Method addExistingActivityDef. - * + * * @param actDef * @param point */ @@ -78,7 +78,7 @@ public class CompositeActivityDef extends ActivityDef } /** * Method newChild. - * + * * @param Name * @param Type * @param location @@ -149,13 +149,15 @@ public class CompositeActivityDef extends ActivityDef } /** * Method instantiateAct. - * + * * @return CompositeActivity */ + @Override public WfVertex instantiate() throws ObjectNotFoundException, InvalidDataException { return instantiate(getName()); } - + + @Override public WfVertex instantiate(String name) throws ObjectNotFoundException, InvalidDataException { CompositeActivity cAct = new CompositeActivity(); @@ -186,18 +188,17 @@ public class CompositeActivityDef extends ActivityDef /** * Method hasGoodNumberOfActivity. - * + * * @return boolean */ - + public boolean hasGoodNumberOfActivity() { int endingAct = 0; GraphableVertex[] graphableVertices = this.getLayoutableChildren(); if (graphableVertices != null) - for (int i = 0; i < graphableVertices.length; i++) - { - WfVertexDef vertex = (WfVertexDef) graphableVertices[i]; + for (GraphableVertex graphableVertice : graphableVertices) { + WfVertexDef vertex = (WfVertexDef) graphableVertice; if (getChildrenGraphModel().getOutEdges(vertex).length == 0) endingAct++; } @@ -209,17 +210,18 @@ public class CompositeActivityDef extends ActivityDef /** * @see com.c2kernel.graph.model.GraphableVertex#getPath() */ + @Override public String getPath() { if (getParent() == null) return getName(); return super.getPath(); } - + //deprecated public String[] getCastorNonLayoutableChildren() { return new String[0]; } - + public void setCastorNonLayoutableChildren(String[] dummy) { } } -- cgit v1.2.3