summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Pielmann2012-08-15 08:49:39 (EDT)
committer Manik Kishore2012-08-15 08:49:39 (EDT)
commitad11721c67c901dd3f4679509aa15f1da60571ca (patch)
tree0095ce9f7354137585162339f2c03da99a12d0fe
parentb57d10656d9e8cd671c78ce5caf619299659efa0 (diff)
downloadorg.eclipse.stardust.ui.web-ad11721c67c901dd3f4679509aa15f1da60571ca.zip
org.eclipse.stardust.ui.web-ad11721c67c901dd3f4679509aa15f1da60571ca.tar.gz
org.eclipse.stardust.ui.web-ad11721c67c901dd3f4679509aa15f1da60571ca.tar.bz2
CRNT-25760 Refactor/Clean up MB Facade: Added createApplicationMethod to fascade
git-svn-id: http://emeafrazerg/svn/ipp/product/trunk/stardust/ui.web@58431 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b
-rw-r--r--web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/diagram/node/ActivityCommandHandler.java5
-rw-r--r--web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/model/element/ApplicationTypeChangeCommandHandler.java12
2 files changed, 6 insertions, 11 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 4b27a48..f24cfa9 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
@@ -77,10 +77,9 @@ public class ActivityCommandHandler
synchronized (model)
{
long maxOid = XpdlModelUtils.getMaxUsedOid(model);
- String modelId = model.getId();
- ActivityType activity = MBFacade.getInstance().createActivity(modelId, processDefinition, activityType, participantFullID,
- activityId, activityName, applicationFullID, subProcessID, maxOid++);
+ ActivityType activity = MBFacade.getInstance().createActivity(model, processDefinition, activityType, participantFullID,
+ activityId, activityName, applicationFullID, subProcessID);
ModelService.setDescription(activity, request.getAsJsonObject(ModelerConstants.MODEL_ELEMENT_PROPERTY));
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 ac79167..6526d2e 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
@@ -36,19 +36,15 @@ public class ApplicationTypeChangeCommandHandler
@OnCommand(commandId = "webServiceApplication.create")
public void createWebServiceApp(ModelType model, JsonObject request)
{
- ApplicationType applicationType = AbstractElementBuilder.F_CWM.createApplicationType();
+ String applicationID = extractString(request, ModelerConstants.ID_PROPERTY);
+ String applicationName = extractString(request, ModelerConstants.NAME_PROPERTY);
+
+ ApplicationType applicationType = MBFacade.getInstance().createApplication(model, applicationID, applicationName, ModelerConstants.WEB_SERVICE_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));
-
- applicationType.setType(MBFacade.getInstance().findApplicationTypeType(model,
- ModelerConstants.WEB_SERVICE_APPLICATION_TYPE_ID));
}
@OnCommand(commandId = "messageTransformationApplication.create")