summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Pielmann2012-09-14 05:06:55 (EDT)
committer Stephan Born2012-09-14 05:06:55 (EDT)
commit34ca1f6e2d46b457fdcd339cf1383760a5a16e4e (patch)
tree6a0df42e96a07702e3c5dc336f93c2c81c1d9dcc
parent4c47f5144ea71918596e9c7ebc3a4862cfcf3cb7 (diff)
downloadorg.eclipse.stardust.ui.web-34ca1f6e2d46b457fdcd339cf1383760a5a16e4e.zip
org.eclipse.stardust.ui.web-34ca1f6e2d46b457fdcd339cf1383760a5a16e4e.tar.gz
org.eclipse.stardust.ui.web-34ca1f6e2d46b457fdcd339cf1383760a5a16e4e.tar.bz2
CamelApplication and WebserviceApplication can now be created with ModelBuilderFacade.createApplication(...)
git-svn-id: http://emeafrazerg/svn/ipp/product/trunk/stardust/ui.web@59207 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b
-rw-r--r--web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/model/element/ApplicationTypeChangeCommandHandler.java26
1 files changed, 8 insertions, 18 deletions
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 d5e4a38..ebb6238 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
@@ -68,28 +68,18 @@ public class ApplicationTypeChangeCommandHandler
}
@OnCommand(commandId = "camelApplication.create")
- public void createCamelApp(EObject targetElement, JsonObject request)
+ public void createCamelApp(ModelType model, JsonObject request)
{
- ModelType model = (ModelType) targetElement;
- ApplicationType applicationType = AbstractElementBuilder.F_CWM.createApplicationType();
-
- //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));
+ String applicationID = extractString(request, ModelerConstants.ID_PROPERTY);
+ String applicationName = extractString(request, ModelerConstants.NAME_PROPERTY);
- // TODO - check if needed
- AttributeUtil.setAttribute(applicationType,
- ModelerConstants.APPLICATION_TYPE_PROPERTY,
+ ApplicationType applicationType = getModelBuilderFacade().createApplication(model,
+ applicationID, applicationName,
ModelerConstants.CAMEL_APPLICATION_TYPE_ID);
- // TODO
- // applicationType.setType(getModelBuilderFacade().findApplicationTypeType(model,
- // ModelerConstants.MESSAGE_TRANSFORMATION_APPLICATION_TYPE_ID));
+ // Map newly created application to a UUID
+ EObjectUUIDMapper mapper = modelService().uuidMapper();
+ mapper.map(applicationType);
}
@OnCommand(commandId = "uiMashupApplication.create")