summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Pielmann2012-08-17 06:32:06 (EDT)
committer Manik Kishore2012-08-17 06:32:06 (EDT)
commitf6159e48e4f6a456e4515654433c9a1d46f5c236 (patch)
tree178b71892b4441c809685ed274831f8c70fe78a7
parent1d4e496d6f368ea9474fddb1475ea11e1d5f7b55 (diff)
downloadorg.eclipse.stardust.ui.web-f6159e48e4f6a456e4515654433c9a1d46f5c236.zip
org.eclipse.stardust.ui.web-f6159e48e4f6a456e4515654433c9a1d46f5c236.tar.gz
org.eclipse.stardust.ui.web-f6159e48e4f6a456e4515654433c9a1d46f5c236.tar.bz2
CRNT-25760 Refactor/Clean up MB Facade: Message Transformation Application now creatable in Facade
git-svn-id: http://emeafrazerg/svn/ipp/product/trunk/stardust/ui.web@58472 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b
-rw-r--r--web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/diagram/node/ActivityCommandHandler.java15
-rw-r--r--web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/model/element/ApplicationTypeChangeCommandHandler.java24
2 files changed, 16 insertions, 23 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 fa6cf94..0b8d440 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
@@ -78,15 +78,16 @@ public class ActivityCommandHandler
int heightProperty = extractInt(request, HEIGHT_PROPERTY);
synchronized (model)
{
- long maxOid = XpdlModelUtils.getMaxUsedOid(model);
+ ActivityType activity = facade().createActivity(model, processDefinition,
+ activityType, participantFullID, activityId, activityName,
+ applicationFullID, subProcessID);
- ActivityType activity = facade().createActivity(model, processDefinition, activityType, participantFullID,
- activityId, activityName, applicationFullID, subProcessID);
+ ModelService.setDescription(activity,
+ request.getAsJsonObject(ModelerConstants.MODEL_ELEMENT_PROPERTY));
- ModelService.setDescription(activity, request.getAsJsonObject(ModelerConstants.MODEL_ELEMENT_PROPERTY));
-
- ActivitySymbolType activitySymbol = facade().createActivitySymbol(processDefinition, parentLaneSymbol.getId(),
- xProperty, yProperty, widthProperty, heightProperty, maxOid, activity);
+ ActivitySymbolType activitySymbol = facade().createActivitySymbol(model,
+ processDefinition, parentLaneSymbol.getId(), xProperty, yProperty,
+ widthProperty, heightProperty, activity);
}
}
diff --git a/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/model/element/ApplicationTypeChangeCommandHandler.java b/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/model/element/ApplicationTypeChangeCommandHandler.java
index aa71832..9932db0 100644
--- a/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/model/element/ApplicationTypeChangeCommandHandler.java
+++ b/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/model/element/ApplicationTypeChangeCommandHandler.java
@@ -47,32 +47,24 @@ public class ApplicationTypeChangeCommandHandler
// Map newly created application to a UUID
EObjectUUIDMapper mapper = modelService().uuidMapper();
mapper.map(applicationType);
-
}
@OnCommand(commandId = "messageTransformationApplication.create")
public void createMessageTransformationApp(EObject targetElement, JsonObject request)
{
ModelType model = (ModelType) targetElement;
- ApplicationType applicationType = AbstractElementBuilder.F_CWM.createApplicationType();
+
+ String applicationID = extractString(request, ModelerConstants.ID_PROPERTY);
+ String applicationName = extractString(request, ModelerConstants.NAME_PROPERTY);
- //Map newly created application to a UUID
+ ApplicationType applicationType = facade().createApplication(model,
+ applicationID, applicationName,
+ ModelerConstants.MESSAGE_TRANSFORMATION_APPLICATION_TYPE_ID);
+
+ // Map newly created application to a UUID
EObjectUUIDMapper mapper = modelService().uuidMapper();
mapper.map(applicationType);
- model.getApplication().add(applicationType);
-
- applicationType.setId(extractString(request, ModelerConstants.ID_PROPERTY));
- applicationType.setName(extractString(request, ModelerConstants.NAME_PROPERTY));
-
- // TODO - check if needed
- AttributeUtil.setAttribute(applicationType,
- ModelerConstants.APPLICATION_TYPE_PROPERTY,
- ModelerConstants.MESSAGE_TRANSFORMATION_APPLICATION_TYPE_ID);
-
- // TODO
- // applicationType.setType(facade().findApplicationTypeType(model,
- // ModelerConstants.MESSAGE_TRANSFORMATION_APPLICATION_TYPE_ID));
}
@OnCommand(commandId = "camelApplication.create")