summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSidharth Singh2012-11-20 08:30:13 (EST)
committer Sven Rottstock2012-11-20 08:30:13 (EST)
commita70aa26cfa173b1190b4d05ca59aaf9c5246fc43 (patch)
tree0ede19e4bacf53d84e5deafe8732fab13097022c
parent6d4e4c61785ba6c5a8272af8327d46c386f57e02 (diff)
downloadorg.eclipse.stardust.ui.web-a70aa26cfa173b1190b4d05ca59aaf9c5246fc43.zip
org.eclipse.stardust.ui.web-a70aa26cfa173b1190b4d05ca59aaf9c5246fc43.tar.gz
org.eclipse.stardust.ui.web-a70aa26cfa173b1190b4d05ca59aaf9c5246fc43.tar.bz2
CRNT-25840
Added code to DataCommandHandler when data is not present. git-svn-id: http://emeafrazerg/svn/ipp/product/trunk/stardust/ui.web@60958 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b
-rw-r--r--web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/diagram/node/DataCommandHandler.java12
1 files changed, 10 insertions, 2 deletions
diff --git a/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/diagram/node/DataCommandHandler.java b/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/diagram/node/DataCommandHandler.java
index 44b318b..7f5f3d1 100644
--- a/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/diagram/node/DataCommandHandler.java
+++ b/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/diagram/node/DataCommandHandler.java
@@ -77,13 +77,21 @@ public class DataCommandHandler
try
{
data = getModelBuilderFacade().importData(model, dataFullID);
+ if (null == data)
+ {
+ data = getModelBuilderFacade().createPrimitiveData(model, dataID,
+ dataName, ModelerConstants.STRING_PRIMITIVE_DATA_TYPE);
+ mapper.map(data);
+ }
}
catch (ObjectNotFoundException x)
{
+ // TODO - Remove this (Earlier exception was thrown when no data exist , now
+ // null returned from MBFacade),analyse and remove if exception is never thrown
if (true)
{
- data = getModelBuilderFacade().createPrimitiveData(model, dataID, dataName,
- ModelerConstants.STRING_PRIMITIVE_DATA_TYPE);
+ data = getModelBuilderFacade().createPrimitiveData(model, dataID,
+ dataName, ModelerConstants.STRING_PRIMITIVE_DATA_TYPE);
mapper.map(data);
}
}