summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Pielmann2012-08-17 10:02:24 (EDT)
committerManik Kishore2012-08-17 10:02:24 (EDT)
commit648c1915320ab3707e90a085ef123b24810554f1 (patch)
treefbc4e04e7236a73b5dcec23c07f03c260760e6a4
parentd6cc4acc673fad4f55bea2cdf8dbcb4adbe2a0a7 (diff)
downloadorg.eclipse.stardust.ui.web-648c1915320ab3707e90a085ef123b24810554f1.zip
org.eclipse.stardust.ui.web-648c1915320ab3707e90a085ef123b24810554f1.tar.gz
org.eclipse.stardust.ui.web-648c1915320ab3707e90a085ef123b24810554f1.tar.bz2
CRNT-25760 Refactor/Clean up MB Facade: JavaDoc, Consolidate some method parameters for symbol creation.
git-svn-id: http://emeafrazerg/svn/ipp/product/trunk/stardust/ui.web@58494 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b
-rw-r--r--web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/diagram/node/ActivityCommandHandler.java7
-rw-r--r--web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/diagram/node/DataCommandHandler.java12
-rw-r--r--web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/diagram/node/SwimlaneCommandHandler.java6
3 files changed, 11 insertions, 14 deletions
diff --git a/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/diagram/node/ActivityCommandHandler.java b/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/diagram/node/ActivityCommandHandler.java
index 0b8d440..e65a62f 100644
--- a/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/diagram/node/ActivityCommandHandler.java
+++ b/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/diagram/node/ActivityCommandHandler.java
@@ -22,7 +22,6 @@ import javax.annotation.Resource;
import org.eclipse.stardust.model.xpdl.builder.utils.MBFacade;
import org.eclipse.stardust.model.xpdl.builder.utils.ModelerConstants;
-import org.eclipse.stardust.model.xpdl.builder.utils.XpdlModelUtils;
import org.eclipse.stardust.model.xpdl.carnot.ActivitySymbolType;
import org.eclipse.stardust.model.xpdl.carnot.ActivityType;
import org.eclipse.stardust.model.xpdl.carnot.LaneSymbol;
@@ -79,15 +78,15 @@ public class ActivityCommandHandler
synchronized (model)
{
ActivityType activity = facade().createActivity(model, processDefinition,
- activityType, participantFullID, activityId, activityName,
+ activityType, activityId, activityName, participantFullID,
applicationFullID, subProcessID);
ModelService.setDescription(activity,
request.getAsJsonObject(ModelerConstants.MODEL_ELEMENT_PROPERTY));
ActivitySymbolType activitySymbol = facade().createActivitySymbol(model,
- processDefinition, parentLaneSymbol.getId(), xProperty, yProperty,
- widthProperty, heightProperty, activity);
+ activity, processDefinition, parentLaneSymbol.getId(), xProperty,
+ yProperty, widthProperty, heightProperty);
}
}
diff --git a/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/diagram/node/DataCommandHandler.java b/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/diagram/node/DataCommandHandler.java
index b7ebaf8..23c680e 100644
--- a/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/diagram/node/DataCommandHandler.java
+++ b/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/diagram/node/DataCommandHandler.java
@@ -21,7 +21,6 @@ import org.eclipse.stardust.common.error.ObjectNotFoundException;
import org.eclipse.stardust.model.xpdl.builder.common.EObjectUUIDMapper;
import org.eclipse.stardust.model.xpdl.builder.utils.MBFacade;
import org.eclipse.stardust.model.xpdl.builder.utils.ModelerConstants;
-import org.eclipse.stardust.model.xpdl.builder.utils.XpdlModelUtils;
import org.eclipse.stardust.model.xpdl.carnot.DataSymbolType;
import org.eclipse.stardust.model.xpdl.carnot.DataType;
import org.eclipse.stardust.model.xpdl.carnot.LaneSymbol;
@@ -59,7 +58,8 @@ public class DataCommandHandler
public void createData(LaneSymbol parentLaneSymbol, JsonObject request)
{
ModelType model = ModelUtils.findContainingModel(parentLaneSymbol);
- ProcessDefinitionType processDefinition = ModelUtils.findContainingProcess(parentLaneSymbol);
+ ProcessDefinitionType processDefinition = ModelUtils
+ .findContainingProcess(parentLaneSymbol);
String dataFullID = extractString(request, ModelerConstants.DATA_FULL_ID_PROPERTY);
String dataID = extractString(request, ModelerConstants.DATA_ID_PROPERTY);
String dataName = extractString(request, ModelerConstants.DATA_NAME_PROPERTY);
@@ -71,7 +71,6 @@ public class DataCommandHandler
synchronized (model)
{
EObjectUUIDMapper mapper = modelService().uuidMapper();
- long maxOid = XpdlModelUtils.getMaxUsedOid(model);
DataType data;
@@ -86,13 +85,12 @@ public class DataCommandHandler
data = facade().createPrimitiveData(model, dataID, dataName,
ModelerConstants.STRING_PRIMITIVE_DATA_TYPE);
mapper.map(data);
- data.setElementOid(++maxOid);
}
}
- DataSymbolType dataSymbol = facade().createDataSymbol(processDefinition,
- xProperty, yProperty, widthProperty, heightProperty, parentLaneSymbol.getId(),
- maxOid, data);
+ DataSymbolType dataSymbol = facade().createDataSymbol(model, data,
+ processDefinition, parentLaneSymbol.getId(), xProperty, yProperty,
+ widthProperty, heightProperty);
mapper.map(dataSymbol);
}
}
diff --git a/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/diagram/node/SwimlaneCommandHandler.java b/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/diagram/node/SwimlaneCommandHandler.java
index 1c6668c..7fa4a24 100644
--- a/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/diagram/node/SwimlaneCommandHandler.java
+++ b/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/diagram/node/SwimlaneCommandHandler.java
@@ -66,9 +66,9 @@ public class SwimlaneCommandHandler
synchronized (model)
{
- LaneSymbol laneSymbol = facade().createLane(model.getId(), model,
- processDefinition, laneId, laneName, xPos, yPos, width, height,
- orientation, participantFullID);
+ LaneSymbol laneSymbol = facade().createLane(model,
+ processDefinition, participantFullID, laneId, laneName, orientation, xPos, yPos,
+ width, height);
parentSymbol.getLanes().add(laneSymbol);