summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Pielmann2012-09-13 10:35:41 (EDT)
committerStephan Born2012-09-13 10:35:41 (EDT)
commitcf0730534dea0d4b6abad0f36bad69552943d670 (patch)
treead42891f34fcc827b5c92c4d9725e28164c1ef60
parentf74205146457c94c22494a2e4590a19d38f4a609 (diff)
downloadorg.eclipse.stardust.ui.web-cf0730534dea0d4b6abad0f36bad69552943d670.zip
org.eclipse.stardust.ui.web-cf0730534dea0d4b6abad0f36bad69552943d670.tar.gz
org.eclipse.stardust.ui.web-cf0730534dea0d4b6abad0f36bad69552943d670.tar.bz2
CRNT-26125, CRNT-26126
git-svn-id: http://emeafrazerg/svn/ipp/product/trunk/stardust/ui.web@59180 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b
-rw-r--r--web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/marshaling/ModelElementMarshaller.java12
-rw-r--r--web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/marshaling/ModelElementUnmarshaller.java10
2 files changed, 13 insertions, 9 deletions
diff --git a/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/marshaling/ModelElementMarshaller.java b/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/marshaling/ModelElementMarshaller.java
index f8b7c64..4a7c11e 100644
--- a/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/marshaling/ModelElementMarshaller.java
+++ b/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/marshaling/ModelElementMarshaller.java
@@ -259,16 +259,16 @@ public abstract class ModelElementMarshaller implements ModelMarshaller
formalParameterJson.addProperty(ModelerConstants.DIRECTION_PROPERTY, ModelerConstants.OUT_PARAMETER_KEY);
}
- DataTypeType dataTypeType = formalParameter.getDataType();
+ DataTypeType dataType = formalParameter.getDataType();
ModelType model = ModelUtils.findContainingModel(formalParameter);
- if (dataTypeType.getCarnotType().equals(
+ if (dataType.getCarnotType().equals(
ModelerConstants.STRUCTURED_DATA_TYPE_KEY))
{
formalParameterJson.addProperty(ModelerConstants.DATA_TYPE_PROPERTY,
ModelerConstants.STRUCTURED_DATA_TYPE_KEY);
- String typeDeclarationId = dataTypeType.getDeclaredType().getId();
+ String typeDeclarationId = dataType.getDeclaredType().getId();
TypeDeclarationType typeDeclaration = model.getTypeDeclarations()
.getTypeDeclaration(typeDeclarationId);
@@ -279,13 +279,13 @@ public abstract class ModelElementMarshaller implements ModelMarshaller
formalParameterJson.addProperty(
ModelerConstants.STRUCTURED_DATA_TYPE_FULL_ID_PROPERTY, fullId);
}
- else if (dataTypeType.getCarnotType().equals(
+ else if (dataType.getCarnotType().equals(
ModelerConstants.DOCUMENT_DATA_TYPE_KEY))
{
formalParameterJson.addProperty(ModelerConstants.DATA_TYPE_PROPERTY,
ModelerConstants.DOCUMENT_DATA_TYPE_KEY);
- String typeDeclarationId = dataTypeType.getDeclaredType().getId();
+ String typeDeclarationId = dataType.getDeclaredType().getId();
TypeDeclarationType typeDeclaration = model.getTypeDeclarations()
.getTypeDeclaration(typeDeclarationId);
@@ -296,7 +296,7 @@ public abstract class ModelElementMarshaller implements ModelMarshaller
formalParameterJson.addProperty(
ModelerConstants.STRUCTURED_DATA_TYPE_FULL_ID_PROPERTY, fullId);
}
- else if (dataTypeType.getCarnotType().equals(
+ else if (dataType.getCarnotType().equals(
ModelerConstants.PRIMITIVE_DATA_TYPE_KEY))
{
formalParameterJson.addProperty(ModelerConstants.DATA_TYPE_PROPERTY,
diff --git a/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/marshaling/ModelElementUnmarshaller.java b/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/marshaling/ModelElementUnmarshaller.java
index 9663a45..554a8d9 100644
--- a/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/marshaling/ModelElementUnmarshaller.java
+++ b/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/marshaling/ModelElementUnmarshaller.java
@@ -31,6 +31,7 @@ import org.eclipse.stardust.model.xpdl.builder.utils.ModelerConstants;
import org.eclipse.stardust.model.xpdl.carnot.*;
import org.eclipse.stardust.model.xpdl.carnot.util.AttributeUtil;
import org.eclipse.stardust.model.xpdl.carnot.util.ModelUtils;
+import org.eclipse.stardust.model.xpdl.xpdl2.FormalParameterType;
import org.eclipse.stardust.model.xpdl.xpdl2.ModeType;
import org.eclipse.stardust.model.xpdl.xpdl2.SchemaTypeType;
import org.eclipse.stardust.model.xpdl.xpdl2.TypeDeclarationType;
@@ -461,10 +462,12 @@ public abstract class ModelElementUnmarshaller implements ModelUnmarshaller
mode = ModeType.OUT;
}
+ FormalParameterType formalParameter = null;
+
if (formalParameterJson.get(ModelerConstants.DATA_TYPE_PROPERTY).equals(
ModelerConstants.PRIMITIVE_DATA_TYPE_KEY))
{
- getModelBuilderFacade().createPrimitiveParameter(
+ formalParameter = getModelBuilderFacade().createPrimitiveParameter(
processDefinition,
getModelBuilderFacade().findData(
formalParameterJson.get(
@@ -482,7 +485,7 @@ public abstract class ModelElementUnmarshaller implements ModelUnmarshaller
else if (formalParameterJson.get(ModelerConstants.DATA_TYPE_PROPERTY)
.equals(ModelerConstants.STRUCTURED_DATA_TYPE_KEY))
{
- getModelBuilderFacade().createStructuredParameter(
+ formalParameter = getModelBuilderFacade().createStructuredParameter(
processDefinition,
getModelBuilderFacade().findData(
formalParameterJson.get(
@@ -737,7 +740,8 @@ public abstract class ModelElementUnmarshaller implements ModelUnmarshaller
}
else if (dataType.equals(ModelerConstants.STRUCTURED_DATA_TYPE_KEY))
{
- // accessPoint.setType(getModelBuilderFacade().findDataType(accessPointJson.get(ModelerConstants.STRUCTURED_DATA_TYPE_FULL_ID).getAsString()));
+ String structTypeFullID = accessPointJson.get(ModelerConstants.STRUCTURED_DATA_TYPE_FULL_ID_PROPERTY).getAsString();
+ accessPoint = getModelBuilderFacade().createStructuredAccessPoint(application, id, name, structTypeFullID, direction);
}
else if (dataType.equals(ModelerConstants.DOCUMENT_DATA_TYPE_KEY))
{