summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Pielmann2012-09-17 04:15:56 (EDT)
committer Stephan Born2012-09-17 04:15:56 (EDT)
commiteb02807e104261e03478b73a421ec5b194e5bcb8 (patch)
treeed58d926413756cb8c42c3db6b0ba1353ec00ca6
parent2aff4eb915714091f58ecb6aa7b28db2b93faf8f (diff)
downloadorg.eclipse.stardust.ide-eb02807e104261e03478b73a421ec5b194e5bcb8.zip
org.eclipse.stardust.ide-eb02807e104261e03478b73a421ec5b194e5bcb8.tar.gz
org.eclipse.stardust.ide-eb02807e104261e03478b73a421ec5b194e5bcb8.tar.bz2
CRNT-26235 Pepper: Further enhancements of ModelBuilder API
git-svn-id: http://emeafrazerg/svn/ipp/product/trunk/stardust/ide@59253 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.java47
1 files changed, 31 insertions, 16 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 f3d1577..9964191 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
@@ -12,6 +12,7 @@ package org.eclipse.stardust.model.xpdl.builder.utils;
import static org.eclipse.stardust.engine.api.model.PredefinedConstants.ADMINISTRATOR_ROLE;
import static org.eclipse.stardust.model.xpdl.builder.BpmModelBuilder.newApplicationActivity;
+import static org.eclipse.stardust.model.xpdl.builder.BpmModelBuilder.newCamelApplication;
import static org.eclipse.stardust.model.xpdl.builder.BpmModelBuilder.newConditionalPerformer;
import static org.eclipse.stardust.model.xpdl.builder.BpmModelBuilder.newDocumentVariable;
import static org.eclipse.stardust.model.xpdl.builder.BpmModelBuilder.newExternalWebApplication;
@@ -28,7 +29,6 @@ import static org.eclipse.stardust.model.xpdl.builder.BpmModelBuilder.newStructV
import static org.eclipse.stardust.model.xpdl.builder.BpmModelBuilder.newStructuredAccessPoint;
import static org.eclipse.stardust.model.xpdl.builder.BpmModelBuilder.newSubProcessActivity;
import static org.eclipse.stardust.model.xpdl.builder.BpmModelBuilder.newWebserviceApplication;
-import static org.eclipse.stardust.model.xpdl.builder.BpmModelBuilder.newCamelApplication;
import java.util.ArrayList;
import java.util.Calendar;
@@ -251,8 +251,9 @@ public class ModelBuilderFacade
return structuredDataType;
}
- public FormalParameterType createPrimitiveParameter(ProcessDefinitionType processInterface,
- DataType data, String id, String name, String primitiveTypeID, ModeType mode)
+ public FormalParameterType createPrimitiveParameter(
+ ProcessDefinitionType processInterface, DataType data, String id, String name,
+ String primitiveTypeID, ModeType mode)
{
XpdlFactory xpdlFactory = XpdlPackage.eINSTANCE.getXpdlFactory();
FormalParameterType parameterType = xpdlFactory.createFormalParameterType();
@@ -260,15 +261,6 @@ public class ModelBuilderFacade
parameterType.setName(name);
parameterType.setMode(mode);
- org.eclipse.stardust.model.xpdl.xpdl2.DataTypeType dataTypeType = XpdlFactory.eINSTANCE
- .createDataTypeType();
- BasicTypeType basicType = xpdlFactory.createBasicTypeType();
- basicType.setType(getPrimitiveType(primitiveTypeID));
- dataTypeType.setBasicType(basicType);
- parameterType.setDataType(dataTypeType);
- String typeId = data.getType().getId();
- dataTypeType.setCarnotType(typeId);
-
FormalParametersType parametersType = processInterface.getFormalParameters();
if (parametersType == null)
@@ -288,11 +280,36 @@ public class ModelBuilderFacade
.createFormalParameterMappingsType();
}
- parameterMappingsType.setMappedData(parameterType, data);
+ org.eclipse.stardust.model.xpdl.xpdl2.DataTypeType dataTypeType = XpdlFactory.eINSTANCE
+ .createDataTypeType();
+ BasicTypeType basicType = xpdlFactory.createBasicTypeType();
+ basicType.setType(getPrimitiveType(primitiveTypeID));
+ dataTypeType.setBasicType(basicType);
+ parameterType.setDataType(dataTypeType);
+ String typeId = PredefinedConstants.PRIMITIVE_DATA;
+ dataTypeType.setCarnotType(typeId);
+
+ if (data != null)
+ {
+ parameterMappingsType.setMappedData(parameterType, data);
+ }
+
+
processInterface.setFormalParameterMappings(parameterMappingsType);
return parameterType;
}
+ public void setDataForFormalParameter(ProcessDefinitionType processInterface,
+ String parameterID, DataType data)
+ {
+ FormalParameterType parameterType = processInterface.getFormalParameters()
+ .getFormalParameter(parameterID);
+ if (parameterType != null)
+ {
+ processInterface.getFormalParameterMappings().setMappedData(parameterType, data);
+ }
+ }
+
public FormalParameterType createStructuredParameter(ProcessDefinitionType processInterface,
DataType data, String id, String name, String structTypeFullID, ModeType mode)
{
@@ -1576,6 +1593,7 @@ public class ModelBuilderFacade
return null;
}
+
/**
*
* @param laneSymbol
@@ -2263,7 +2281,4 @@ public class ModelBuilderFacade
}
-
-
-
}