summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Pielmann2012-08-23 09:07:10 (EDT)
committerStephan Born2012-08-23 09:07:10 (EDT)
commitc7bae2e10241ef1c24d18b25596489e7f553c045 (patch)
tree527802fa20467f540012b4b47fded87fce919156
parentc16bced07480b5628dca5e2909408f424e5ca817 (diff)
downloadorg.eclipse.stardust.ui.web-c7bae2e10241ef1c24d18b25596489e7f553c045.zip
org.eclipse.stardust.ui.web-c7bae2e10241ef1c24d18b25596489e7f553c045.tar.gz
org.eclipse.stardust.ui.web-c7bae2e10241ef1c24d18b25596489e7f553c045.tar.bz2
CRNT-25819 Pepper: Outline - Create structured data fails with NPE.
git-svn-id: http://emeafrazerg/svn/ipp/product/trunk/stardust/ui.web@58644 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b
-rw-r--r--web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/diagram/node/ActivityCommandHandler.java17
-rw-r--r--web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/diagram/node/ConnectionCommandHandler.java17
-rw-r--r--web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/diagram/node/DataCommandHandler.java9
-rw-r--r--web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/diagram/node/EventCommandHandler.java13
-rw-r--r--web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/diagram/node/GatewayCommandHandler.java13
-rw-r--r--web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/diagram/node/SwimlaneCommandHandler.java11
-rw-r--r--web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/model/element/ApplicationTypeChangeCommandHandler.java13
-rw-r--r--web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/model/element/DataChangeCommandHandler.java13
-rw-r--r--web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/model/element/ParticipantChangeCommandHandler.java9
-rw-r--r--web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/model/element/ProcessChangeCommandHandler.java11
-rw-r--r--web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/model/element/StructuredTypeChangeCommandHandler.java11
11 files changed, 41 insertions, 96 deletions
diff --git a/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/diagram/node/ActivityCommandHandler.java b/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/diagram/node/ActivityCommandHandler.java
index 8f38697..c2a2de2 100644
--- a/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/diagram/node/ActivityCommandHandler.java
+++ b/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/diagram/node/ActivityCommandHandler.java
@@ -42,10 +42,9 @@ import com.google.gson.JsonObject;
*/
@CommandHandler
public class ActivityCommandHandler
-{
+{
@Resource
private ApplicationContext springContext;
- private ModelBuilderFacade modelBuilderFacade;
/**
* @param parentLaneSymbol
@@ -116,16 +115,12 @@ public class ActivityCommandHandler
}
}
-
+
private ModelBuilderFacade getModelBuilderFacade()
{
- if (modelBuilderFacade == null)
- {
- modelBuilderFacade = new ModelBuilderFacade(springContext.getBean(ModelService.class)
- .getModelManagementStrategy());
- }
- return modelBuilderFacade;
+ return new ModelBuilderFacade(springContext.getBean(ModelService.class)
+ .getModelManagementStrategy());
}
-
-
+
+
}
diff --git a/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/diagram/node/ConnectionCommandHandler.java b/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/diagram/node/ConnectionCommandHandler.java
index c70f7c2..010527e 100644
--- a/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/diagram/node/ConnectionCommandHandler.java
+++ b/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/diagram/node/ConnectionCommandHandler.java
@@ -56,8 +56,7 @@ public class ConnectionCommandHandler
{
@Resource
private ApplicationContext springContext;
- private ModelBuilderFacade modelBuilderFacade;
-
+
@OnCommand(commandId = "connection.create")
public void createConnection(IIdentifiableElement targetElement, JsonObject request)
{
@@ -404,7 +403,7 @@ public class ConnectionCommandHandler
{
dataMapping.setDirection(DirectionType.get(DirectionType.OUT));
}
-
+
dataMapping.setData(data);
// TODO Incomplete
@@ -429,7 +428,7 @@ public class ConnectionCommandHandler
.get(0)
.getDataMappingConnection()
.add(dataMappingConnection);
-
+
dataMappingConnection.setElementOid(++maxOid);
dataMappingConnection.setActivitySymbol(activitySymbol);
dataMappingConnection.setDataSymbol(dataSymbol);
@@ -468,15 +467,11 @@ public class ConnectionCommandHandler
throw new IllegalArgumentException("Illegal orientation key " + orientation + ".");
}
-
+
private ModelBuilderFacade getModelBuilderFacade()
{
- if (modelBuilderFacade == null)
- {
- modelBuilderFacade = new ModelBuilderFacade(springContext.getBean(ModelService.class)
- .getModelManagementStrategy());
- }
- return modelBuilderFacade;
+ return new ModelBuilderFacade(springContext.getBean(ModelService.class)
+ .getModelManagementStrategy());
}
}
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 6088099..c0ca30a 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
@@ -45,7 +45,6 @@ public class DataCommandHandler
@Resource
private ApplicationContext springContext;
- private ModelBuilderFacade modelBuilderFacade;
/**
*
@@ -124,11 +123,7 @@ public class DataCommandHandler
private ModelBuilderFacade getModelBuilderFacade()
{
- if (modelBuilderFacade == null)
- {
- modelBuilderFacade = new ModelBuilderFacade(springContext.getBean(ModelService.class)
- .getModelManagementStrategy());
- }
- return modelBuilderFacade;
+ return new ModelBuilderFacade(springContext.getBean(ModelService.class)
+ .getModelManagementStrategy());
}
}
diff --git a/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/diagram/node/EventCommandHandler.java b/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/diagram/node/EventCommandHandler.java
index 6f81daf..177c2d7 100644
--- a/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/diagram/node/EventCommandHandler.java
+++ b/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/diagram/node/EventCommandHandler.java
@@ -48,8 +48,7 @@ public class EventCommandHandler
{
@Resource
private ApplicationContext springContext;
- private ModelBuilderFacade modelBuilderFacade;
-
+
@OnCommand(commandId = "eventSymbol.create")
public void createEvent(LaneSymbol parentLaneSymbol, JsonObject request)
{
@@ -137,15 +136,11 @@ public class EventCommandHandler
}
}
}
-
+
private ModelBuilderFacade getModelBuilderFacade()
{
- if (modelBuilderFacade == null)
- {
- modelBuilderFacade = new ModelBuilderFacade(springContext.getBean(ModelService.class)
- .getModelManagementStrategy());
- }
- return modelBuilderFacade;
+ return new ModelBuilderFacade(springContext.getBean(ModelService.class)
+ .getModelManagementStrategy());
}
}
diff --git a/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/diagram/node/GatewayCommandHandler.java b/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/diagram/node/GatewayCommandHandler.java
index 4bb3414..ebfe032 100644
--- a/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/diagram/node/GatewayCommandHandler.java
+++ b/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/diagram/node/GatewayCommandHandler.java
@@ -48,8 +48,7 @@ public class GatewayCommandHandler
{
@Resource
private ApplicationContext springContext;
- private ModelBuilderFacade modelBuilderFacade;
-
+
@OnCommand(commandId = "gateSymbol.create")
public void createGateway(LaneSymbol parentLaneSymbol, JsonObject request)
{
@@ -114,15 +113,11 @@ public class GatewayCommandHandler
}
}
-
+
private ModelBuilderFacade getModelBuilderFacade()
{
- if (modelBuilderFacade == null)
- {
- modelBuilderFacade = new ModelBuilderFacade(springContext.getBean(ModelService.class)
- .getModelManagementStrategy());
- }
- return modelBuilderFacade;
+ return new ModelBuilderFacade(springContext.getBean(ModelService.class)
+ .getModelManagementStrategy());
}
}
diff --git a/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/diagram/node/SwimlaneCommandHandler.java b/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/diagram/node/SwimlaneCommandHandler.java
index 22f2133..d1f5700 100644
--- a/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/diagram/node/SwimlaneCommandHandler.java
+++ b/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/diagram/node/SwimlaneCommandHandler.java
@@ -42,7 +42,6 @@ public class SwimlaneCommandHandler
{
@Resource
private ApplicationContext springContext;
- private ModelBuilderFacade modelBuilderFacade;
/**
* @param parentSymbol
@@ -97,14 +96,10 @@ public class SwimlaneCommandHandler
parentSymbol.getChildLanes().remove(lane);
}
}
-
+
private ModelBuilderFacade getModelBuilderFacade()
{
- if (modelBuilderFacade == null)
- {
- modelBuilderFacade = new ModelBuilderFacade(springContext.getBean(ModelService.class)
- .getModelManagementStrategy());
- }
- return modelBuilderFacade;
+ return new ModelBuilderFacade(springContext.getBean(ModelService.class)
+ .getModelManagementStrategy());
}
}
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 24a5122..25505f2 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
@@ -32,7 +32,6 @@ public class ApplicationTypeChangeCommandHandler
{
@Resource
private ApplicationContext springContext;
- private ModelBuilderFacade modelBuilderFacade;
@OnCommand(commandId = "webServiceApplication.create")
public void createWebServiceApp(ModelType model, JsonObject request)
@@ -53,7 +52,7 @@ public class ApplicationTypeChangeCommandHandler
public void createMessageTransformationApp(EObject targetElement, JsonObject request)
{
ModelType model = (ModelType) targetElement;
-
+
String applicationID = extractString(request, ModelerConstants.ID_PROPERTY);
String applicationName = extractString(request, ModelerConstants.NAME_PROPERTY);
@@ -138,14 +137,10 @@ public class ApplicationTypeChangeCommandHandler
{
return springContext.getBean(ModelService.class);
}
-
+
private ModelBuilderFacade getModelBuilderFacade()
{
- if (modelBuilderFacade == null)
- {
- modelBuilderFacade = new ModelBuilderFacade(springContext.getBean(ModelService.class)
- .getModelManagementStrategy());
- }
- return modelBuilderFacade;
+ return new ModelBuilderFacade(springContext.getBean(ModelService.class)
+ .getModelManagementStrategy());
}
}
diff --git a/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/model/element/DataChangeCommandHandler.java b/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/model/element/DataChangeCommandHandler.java
index a05aa53..a1f12c8 100644
--- a/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/model/element/DataChangeCommandHandler.java
+++ b/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/model/element/DataChangeCommandHandler.java
@@ -46,7 +46,6 @@ public class DataChangeCommandHandler
{
@Resource
private ApplicationContext springContext;
- private ModelBuilderFacade modelBuilderFacade;
/**
* @param model
@@ -125,7 +124,7 @@ public class DataChangeCommandHandler
{
String id = extractString(request, ModelerConstants.ID_PROPERTY);
DataType data = getModelBuilderFacade().findData(model, id);
-
+
synchronized (model)
{
deleteDataDymbolsForData(model, data.getId());
@@ -167,14 +166,10 @@ public class DataChangeCommandHandler
}
}
}
-
+
private ModelBuilderFacade getModelBuilderFacade()
{
- if (modelBuilderFacade == null)
- {
- modelBuilderFacade = new ModelBuilderFacade(springContext.getBean(ModelService.class)
- .getModelManagementStrategy());
- }
- return modelBuilderFacade;
+ return new ModelBuilderFacade(springContext.getBean(ModelService.class)
+ .getModelManagementStrategy());
}
}
diff --git a/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/model/element/ParticipantChangeCommandHandler.java b/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/model/element/ParticipantChangeCommandHandler.java
index 479db1c..2eb0e2e 100644
--- a/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/model/element/ParticipantChangeCommandHandler.java
+++ b/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/model/element/ParticipantChangeCommandHandler.java
@@ -46,7 +46,6 @@ public class ParticipantChangeCommandHandler
{
@Resource
private ApplicationContext springContext;
- private ModelBuilderFacade modelBuilderFacade;
/**
* @param model
@@ -240,11 +239,7 @@ public class ParticipantChangeCommandHandler
private ModelBuilderFacade getModelBuilderFacade()
{
- if (modelBuilderFacade == null)
- {
- modelBuilderFacade = new ModelBuilderFacade(springContext.getBean(ModelService.class)
- .getModelManagementStrategy());
- }
- return modelBuilderFacade;
+ return new ModelBuilderFacade(springContext.getBean(ModelService.class)
+ .getModelManagementStrategy());
}
}
diff --git a/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/model/element/ProcessChangeCommandHandler.java b/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/model/element/ProcessChangeCommandHandler.java
index f086b92..f8050a1 100644
--- a/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/model/element/ProcessChangeCommandHandler.java
+++ b/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/model/element/ProcessChangeCommandHandler.java
@@ -48,7 +48,6 @@ public class ProcessChangeCommandHandler
{
@Resource
private ApplicationContext springContext;
- private ModelBuilderFacade modelBuilderFacade;
@OnCommand(commandId = "process.create")
public void createProcess(ModelType model, JsonObject request)
@@ -135,14 +134,10 @@ public class ProcessChangeCommandHandler
{
return springContext.getBean(ModelService.class);
}
-
+
private ModelBuilderFacade getModelBuilderFacade()
{
- if (modelBuilderFacade == null)
- {
- modelBuilderFacade = new ModelBuilderFacade(springContext.getBean(ModelService.class)
- .getModelManagementStrategy());
- }
- return modelBuilderFacade;
+ return new ModelBuilderFacade(springContext.getBean(ModelService.class)
+ .getModelManagementStrategy());
}
}
diff --git a/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/model/element/StructuredTypeChangeCommandHandler.java b/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/model/element/StructuredTypeChangeCommandHandler.java
index fe8e437..8dc60a9 100644
--- a/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/model/element/StructuredTypeChangeCommandHandler.java
+++ b/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/model/element/StructuredTypeChangeCommandHandler.java
@@ -30,7 +30,6 @@ public class StructuredTypeChangeCommandHandler
{
@Resource
private ApplicationContext springContext;
- private ModelBuilderFacade modelBuilderFacade;
public static final String TYPE_PROPERTY = "type";
@@ -71,14 +70,10 @@ public class StructuredTypeChangeCommandHandler
{
return springContext.getBean(ModelService.class);
}
-
+
private ModelBuilderFacade getModelBuilderFacade()
{
- if (modelBuilderFacade == null)
- {
- modelBuilderFacade = new ModelBuilderFacade(springContext.getBean(ModelService.class)
- .getModelManagementStrategy());
- }
- return modelBuilderFacade;
+ return new ModelBuilderFacade(springContext.getBean(ModelService.class)
+ .getModelManagementStrategy());
}
}