summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Pielmann2012-09-10 08:53:52 (EDT)
committerStephan Born2012-09-28 06:32:19 (EDT)
commite8b101126360ff8443001859f3778f6ea9d1d399 (patch)
tree930a8177887e6d0b5922c049aaba8ddb77720703
parentbfc52373c71d7007ba882ba2f44c83ec3ffce520 (diff)
downloadorg.eclipse.stardust.ide-e8b101126360ff8443001859f3778f6ea9d1d399.zip
org.eclipse.stardust.ide-e8b101126360ff8443001859f3778f6ea9d1d399.tar.gz
org.eclipse.stardust.ide-e8b101126360ff8443001859f3778f6ea9d1d399.tar.bz2
CRNT-26125 Pepper: ModelBuilder API - Create accesspoints for MTA / UI Mashup (Create application by using the facade)
git-svn-id: http://emeafrazerg/svn/ipp/product/trunk/stardust/ide@59044 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b
-rw-r--r--model/org.eclipse.stardust.model.xpdl.builder/src/main/java/org/eclipse/stardust/model/xpdl/builder/utils/ModelBuilderFacade.java24
1 files changed, 23 insertions, 1 deletions
diff --git a/model/org.eclipse.stardust.model.xpdl.builder/src/main/java/org/eclipse/stardust/model/xpdl/builder/utils/ModelBuilderFacade.java b/model/org.eclipse.stardust.model.xpdl.builder/src/main/java/org/eclipse/stardust/model/xpdl/builder/utils/ModelBuilderFacade.java
index 25983ab..fbadfb3 100644
--- a/model/org.eclipse.stardust.model.xpdl.builder/src/main/java/org/eclipse/stardust/model/xpdl/builder/utils/ModelBuilderFacade.java
+++ b/model/org.eclipse.stardust.model.xpdl.builder/src/main/java/org/eclipse/stardust/model/xpdl/builder/utils/ModelBuilderFacade.java
@@ -54,6 +54,7 @@ import org.eclipse.stardust.model.xpdl.carnot.ApplicationType;
import org.eclipse.stardust.model.xpdl.carnot.ApplicationTypeType;
import org.eclipse.stardust.model.xpdl.carnot.CarnotWorkflowModelFactory;
import org.eclipse.stardust.model.xpdl.carnot.ConditionalPerformerType;
+import org.eclipse.stardust.model.xpdl.carnot.ContextType;
import org.eclipse.stardust.model.xpdl.carnot.DataMappingConnectionType;
import org.eclipse.stardust.model.xpdl.carnot.DataPathType;
import org.eclipse.stardust.model.xpdl.carnot.DataSymbolType;
@@ -885,12 +886,33 @@ public class ModelBuilderFacade
applicationTypeType = AbstractElementBuilder.F_CWM
.createApplicationTypeType();
applicationTypeType.setId(applicationTypeID);
- applicationTypeType.setName("Message Transformation Application");
+ applicationTypeType.setName(applicationName);
applicationTypeType.setIsPredefined(true);
long maxElementOid = XpdlModelUtils.getMaxUsedOid(model);
applicationTypeType.setElementOid(++maxElementOid);
model.getApplicationType().add(applicationTypeType);
}
+ if (applicationTypeID.equalsIgnoreCase(ModelerConstants.EXTERNAL_WEB_APP_CONTEXT_TYPE_KEY)) {
+ applicationTypeType = AbstractElementBuilder.F_CWM.createApplicationTypeType();
+ applicationTypeType.setId(applicationTypeID);
+ applicationTypeType.setName(applicationName);
+ applicationTypeType.setIsPredefined(true);
+ long maxElementOid = XpdlModelUtils.getMaxUsedOid(model);
+ applicationTypeType.setElementOid(++maxElementOid);
+ model.getApplicationType().add(applicationTypeType);
+ application.setInteractive(true);
+ CarnotWorkflowModelFactory factory = CarnotWorkflowModelFactory.eINSTANCE;
+ ContextType context = factory.createContextType();
+ ApplicationContextTypeType contextTypeType = AbstractElementBuilder.F_CWM.createApplicationContextTypeType();
+ contextTypeType.setName("External Web Application");
+ contextTypeType.setId("externalWebApp");
+ contextTypeType.setIsPredefined(true);
+ XpdlModelUtils.getMaxUsedOid(model);
+ contextTypeType.setElementOid(++maxElementOid);
+ model.getApplicationContextType().add(contextTypeType);
+ context.setType(contextTypeType); //TODO Add this context type to the model
+ application.getContext().add(context);
+ }
}
application.setType(applicationTypeType);
model.getApplication().add(application);