summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Pielmann2012-08-20 03:33:37 (EDT)
committerManik Kishore2012-08-20 03:33:37 (EDT)
commita6eb438bfe700a3d3a47befdc9adc1cfa0168970 (patch)
treefd874bac94088f52fbdfae875b8f367e3234ca48
parentb16f129a701c83dd5ee39079882fef421536af1b (diff)
downloadorg.eclipse.stardust.ui.web-a6eb438bfe700a3d3a47befdc9adc1cfa0168970.zip
org.eclipse.stardust.ui.web-a6eb438bfe700a3d3a47befdc9adc1cfa0168970.tar.gz
org.eclipse.stardust.ui.web-a6eb438bfe700a3d3a47befdc9adc1cfa0168970.tar.bz2
CRNT-25760 Refactor/Clean up MB Facade: facade() -> getModelBuilderFacade()
git-svn-id: http://emeafrazerg/svn/ipp/product/trunk/stardust/ui.web@58515 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b
-rw-r--r--web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/diagram/node/ActivityCommandHandler.java16
-rw-r--r--web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/diagram/node/ConnectionCommandHandler.java42
-rw-r--r--web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/diagram/node/DataCommandHandler.java20
-rw-r--r--web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/diagram/node/EventCommandHandler.java14
-rw-r--r--web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/diagram/node/GatewayCommandHandler.java12
-rw-r--r--web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/diagram/node/SwimlaneCommandHandler.java14
-rw-r--r--web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/model/element/ApplicationTypeChangeCommandHandler.java20
-rw-r--r--web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/model/element/DataChangeCommandHandler.java20
-rw-r--r--web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/model/element/ParticipantChangeCommandHandler.java28
-rw-r--r--web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/model/element/ProcessChangeCommandHandler.java14
-rw-r--r--web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/model/element/StructuredTypeChangeCommandHandler.java14
-rw-r--r--web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/marshaling/ModelElementMarshaller.java28
-rw-r--r--web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/marshaling/ModelElementUnmarshaller.java38
-rw-r--r--web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/service/ModelService.java86
14 files changed, 183 insertions, 183 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 e65a62f..c7e20cf 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
@@ -45,7 +45,7 @@ public class ActivityCommandHandler
{
@Resource
private ApplicationContext springContext;
- private MBFacade facade;
+ private MBFacade modelBuilderFacade;
/**
* @param parentLaneSymbol
@@ -77,14 +77,14 @@ public class ActivityCommandHandler
int heightProperty = extractInt(request, HEIGHT_PROPERTY);
synchronized (model)
{
- ActivityType activity = facade().createActivity(model, processDefinition,
+ ActivityType activity = getModelBuilderFacade().createActivity(model, processDefinition,
activityType, activityId, activityName, participantFullID,
applicationFullID, subProcessID);
ModelService.setDescription(activity,
request.getAsJsonObject(ModelerConstants.MODEL_ELEMENT_PROPERTY));
- ActivitySymbolType activitySymbol = facade().createActivitySymbol(model,
+ ActivitySymbolType activitySymbol = getModelBuilderFacade().createActivitySymbol(model,
activity, processDefinition, parentLaneSymbol.getId(), xProperty,
yProperty, widthProperty, heightProperty);
}
@@ -102,7 +102,7 @@ public class ActivityCommandHandler
ProcessDefinitionType processDefinition = ModelUtils.findContainingProcess(parentLaneSymbol);
String activityId = extractString(request, ModelerConstants.MODEL_ELEMENT_PROPERTY, ModelerConstants.ID_PROPERTY);
- ActivityType activity = facade().findActivity(processDefinition, activityId);
+ ActivityType activity = getModelBuilderFacade().findActivity(processDefinition, activityId);
ActivitySymbolType activitySymbol = activity.getActivitySymbols().get(0);
synchronized (model)
@@ -117,14 +117,14 @@ public class ActivityCommandHandler
}
- private MBFacade facade()
+ private MBFacade getModelBuilderFacade()
{
- if (facade == null)
+ if (modelBuilderFacade == null)
{
- facade = new MBFacade(springContext.getBean(ModelService.class)
+ modelBuilderFacade = new MBFacade(springContext.getBean(ModelService.class)
.getModelManagementStrategy());
}
- return facade;
+ return modelBuilderFacade;
}
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 31a7cb6..dc2106c 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,7 +56,7 @@ public class ConnectionCommandHandler
{
@Resource
private ApplicationContext springContext;
- private MBFacade facade;
+ private MBFacade modelBuilderFacade;
@OnCommand(commandId = "connection.create")
public void createConnection(IIdentifiableElement targetElement, JsonObject request)
@@ -80,34 +80,34 @@ public class ConnectionCommandHandler
createControlFlowConnection(
request,
processDefinition,
- facade().findActivitySymbol(processDefinition.getDiagram().get(0),
+ getModelBuilderFacade().findActivitySymbol(processDefinition.getDiagram().get(0),
extractLong(request, ModelerConstants.FROM_MODEL_ELEMENT_OID)),
- facade().findActivitySymbol(processDefinition.getDiagram().get(0),
+ getModelBuilderFacade().findActivitySymbol(processDefinition.getDiagram().get(0),
extractLong(request, ModelerConstants.TO_MODEL_ELEMENT_OID)),
maxOid);
}
else if (ModelerConstants.EVENT_KEY.equals(extractString(request,
ModelerConstants.TO_MODEL_ELEMENT_TYPE)))
{
- StartEventSymbol startEventSymbol = facade().findStartEventSymbol(
+ StartEventSymbol startEventSymbol = getModelBuilderFacade().findStartEventSymbol(
processDefinition.getDiagram().get(0),
extractLong(request, ModelerConstants.TO_MODEL_ELEMENT_OID));
if (null != startEventSymbol)
{
createControlFlowConnection(request, processDefinition,
- startEventSymbol, facade().findActivitySymbol(
+ startEventSymbol, getModelBuilderFacade().findActivitySymbol(
processDefinition.getDiagram().get(0),
extractLong(request,
ModelerConstants.FROM_MODEL_ELEMENT_OID)), maxOid);
}
else
{
- EndEventSymbol endEventSymbol = facade().findEndEventSymbol(
+ EndEventSymbol endEventSymbol = getModelBuilderFacade().findEndEventSymbol(
processDefinition.getDiagram().get(0),
extractLong(request, ModelerConstants.TO_MODEL_ELEMENT_OID));
createControlFlowConnection(request, processDefinition,
- facade().findActivitySymbol(
+ getModelBuilderFacade().findActivitySymbol(
processDefinition.getDiagram().get(0),
extractLong(request,
ModelerConstants.FROM_MODEL_ELEMENT_OID)),
@@ -121,9 +121,9 @@ public class ConnectionCommandHandler
createDataFlowConnection(
request,
processDefinition,
- facade().findActivitySymbol(processDefinition.getDiagram().get(0),
+ getModelBuilderFacade().findActivitySymbol(processDefinition.getDiagram().get(0),
extractLong(request, ModelerConstants.FROM_MODEL_ELEMENT_OID)),
- facade().findDataSymbol(processDefinition.getDiagram().get(0),
+ getModelBuilderFacade().findDataSymbol(processDefinition.getDiagram().get(0),
extractLong(request, ModelerConstants.TO_MODEL_ELEMENT_OID)),
maxOid, false);
}
@@ -142,7 +142,7 @@ public class ConnectionCommandHandler
{
try
{
- StartEventSymbol startEventSymbol = facade().findStartEventSymbol(
+ StartEventSymbol startEventSymbol = getModelBuilderFacade().findStartEventSymbol(
processDefinition.getDiagram().get(0),
extractLong(request, ModelerConstants.FROM_MODEL_ELEMENT_OID));
@@ -150,20 +150,20 @@ public class ConnectionCommandHandler
request,
processDefinition,
startEventSymbol,
- facade().findActivitySymbol(
+ getModelBuilderFacade().findActivitySymbol(
processDefinition.getDiagram().get(0),
extractLong(request, ModelerConstants.TO_MODEL_ELEMENT_OID)),
maxOid);
}
catch (ObjectNotFoundException x)
{
- EndEventSymbol endEventSymbol = facade().findEndEventSymbol(
+ EndEventSymbol endEventSymbol = getModelBuilderFacade().findEndEventSymbol(
processDefinition.getDiagram().get(0),
extractLong(request, ModelerConstants.FROM_MODEL_ELEMENT_OID));
createControlFlowConnection(
request,
processDefinition,
- facade().findActivitySymbol(
+ getModelBuilderFacade().findActivitySymbol(
processDefinition.getDiagram().get(0),
extractLong(request, ModelerConstants.TO_MODEL_ELEMENT_OID)),
endEventSymbol, maxOid);
@@ -185,9 +185,9 @@ public class ConnectionCommandHandler
createDataFlowConnection(
request,
processDefinition,
- facade().findActivitySymbol(processDefinition.getDiagram().get(0),
+ getModelBuilderFacade().findActivitySymbol(processDefinition.getDiagram().get(0),
extractLong(request, ModelerConstants.TO_MODEL_ELEMENT_OID)),
- facade().findDataSymbol(processDefinition.getDiagram().get(0),
+ getModelBuilderFacade().findDataSymbol(processDefinition.getDiagram().get(0),
extractLong(request, ModelerConstants.FROM_MODEL_ELEMENT_OID)),
maxOid, true);
}
@@ -218,7 +218,7 @@ public class ConnectionCommandHandler
{
try
{
- TransitionConnectionType transitionConnection = facade().findTransitionConnectionByModelOid(
+ TransitionConnectionType transitionConnection = getModelBuilderFacade().findTransitionConnectionByModelOid(
processDefinition, connectionOid);
processDefinition.getDiagram()
@@ -236,7 +236,7 @@ public class ConnectionCommandHandler
}
catch (ObjectNotFoundException x)
{
- DataMappingConnectionType dataMappingConnection = facade().findDataMappingConnectionByModelOid(
+ DataMappingConnectionType dataMappingConnection = getModelBuilderFacade().findDataMappingConnectionByModelOid(
processDefinition, connectionOid);
processDefinition.getDiagram()
@@ -469,14 +469,14 @@ public class ConnectionCommandHandler
throw new IllegalArgumentException("Illegal orientation key " + orientation + ".");
}
- private MBFacade facade()
+ private MBFacade getModelBuilderFacade()
{
- if (facade == null)
+ if (modelBuilderFacade == null)
{
- facade = new MBFacade(springContext.getBean(ModelService.class)
+ modelBuilderFacade = new MBFacade(springContext.getBean(ModelService.class)
.getModelManagementStrategy());
}
- return facade;
+ return modelBuilderFacade;
}
}
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 23c680e..5f662ba 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,7 @@ public class DataCommandHandler
@Resource
private ApplicationContext springContext;
- private MBFacade facade;
+ private MBFacade modelBuilderFacade;
/**
*
@@ -76,19 +76,19 @@ public class DataCommandHandler
try
{
- data = facade().importData(model, dataFullID);
+ data = getModelBuilderFacade().importData(model, dataFullID);
}
catch (ObjectNotFoundException x)
{
if (true)
{
- data = facade().createPrimitiveData(model, dataID, dataName,
+ data = getModelBuilderFacade().createPrimitiveData(model, dataID, dataName,
ModelerConstants.STRING_PRIMITIVE_DATA_TYPE);
mapper.map(data);
}
}
- DataSymbolType dataSymbol = facade().createDataSymbol(model, data,
+ DataSymbolType dataSymbol = getModelBuilderFacade().createDataSymbol(model, data,
processDefinition, parentLaneSymbol.getId(), xProperty, yProperty,
widthProperty, heightProperty);
mapper.map(dataSymbol);
@@ -107,8 +107,8 @@ public class DataCommandHandler
ProcessDefinitionType processDefinition = ModelUtils.findContainingProcess(parentLaneSymbol);
Long dataOID = extractLong(request, ModelerConstants.OID_PROPERTY);
String dataFullID = extractString(request, ModelerConstants.DATA_FULL_ID_PROPERTY);
- DataType data = facade().importData(model, dataFullID);
- DataSymbolType dataSymbol = facade().findDataSymbolRecursively(parentLaneSymbol,
+ DataType data = getModelBuilderFacade().importData(model, dataFullID);
+ DataSymbolType dataSymbol = getModelBuilderFacade().findDataSymbolRecursively(parentLaneSymbol,
dataOID);
synchronized (model)
{
@@ -124,13 +124,13 @@ public class DataCommandHandler
return springContext.getBean(ModelService.class);
}
- private MBFacade facade()
+ private MBFacade getModelBuilderFacade()
{
- if (facade == null)
+ if (modelBuilderFacade == null)
{
- facade = new MBFacade(springContext.getBean(ModelService.class)
+ modelBuilderFacade = new MBFacade(springContext.getBean(ModelService.class)
.getModelManagementStrategy());
}
- return facade;
+ return modelBuilderFacade;
}
}
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 4a7a2e5..693f678 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,7 +48,7 @@ public class EventCommandHandler
{
@Resource
private ApplicationContext springContext;
- private MBFacade facade;
+ private MBFacade modelBuilderFacade;
@OnCommand(commandId = "eventSymbol.create")
public void createEvent(LaneSymbol parentLaneSymbol, JsonObject request)
@@ -117,7 +117,7 @@ public class EventCommandHandler
if (START_EVENT.equals(extractString(request,
ModelerConstants.MODEL_ELEMENT_PROPERTY, EVENT_TYPE_PROPERTY)))
{
- StartEventSymbol startEventSymbol = facade().findStartEventSymbol(
+ StartEventSymbol startEventSymbol = getModelBuilderFacade().findStartEventSymbol(
parentLaneSymbol, eventOId);
processDefinition.getDiagram()
.get(0)
@@ -127,7 +127,7 @@ public class EventCommandHandler
}
else
{
- EndEventSymbol endEventSymbol = facade().findEndEventSymbol(parentLaneSymbol,
+ EndEventSymbol endEventSymbol = getModelBuilderFacade().findEndEventSymbol(parentLaneSymbol,
eventOId);
processDefinition.getDiagram()
.get(0)
@@ -138,14 +138,14 @@ public class EventCommandHandler
}
}
- private MBFacade facade()
+ private MBFacade getModelBuilderFacade()
{
- if (facade == null)
+ if (modelBuilderFacade == null)
{
- facade = new MBFacade(springContext.getBean(ModelService.class)
+ modelBuilderFacade = new MBFacade(springContext.getBean(ModelService.class)
.getModelManagementStrategy());
}
- return facade;
+ return modelBuilderFacade;
}
}
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 188ca5a..8bb78ec 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,7 +48,7 @@ public class GatewayCommandHandler
{
@Resource
private ApplicationContext springContext;
- private MBFacade facade;
+ private MBFacade modelBuilderFacade;
@OnCommand(commandId = "gateSymbol.create")
public void createGateway(LaneSymbol parentLaneSymbol, JsonObject request)
@@ -103,7 +103,7 @@ public class GatewayCommandHandler
ProcessDefinitionType processDefinition = ModelUtils.findContainingProcess(parentLaneSymbol);
String gatewayId = extractString(request, ModelerConstants.MODEL_ELEMENT_PROPERTY, ModelerConstants.ID_PROPERTY);
- ActivityType gateway = facade().findActivity(processDefinition, gatewayId);
+ ActivityType gateway = getModelBuilderFacade().findActivity(processDefinition, gatewayId);
ActivitySymbolType gatewaySymbol = gateway.getActivitySymbols().get(0);
synchronized (model)
{
@@ -115,14 +115,14 @@ public class GatewayCommandHandler
}
}
- private MBFacade facade()
+ private MBFacade getModelBuilderFacade()
{
- if (facade == null)
+ if (modelBuilderFacade == null)
{
- facade = new MBFacade(springContext.getBean(ModelService.class)
+ modelBuilderFacade = new MBFacade(springContext.getBean(ModelService.class)
.getModelManagementStrategy());
}
- return facade;
+ return modelBuilderFacade;
}
}
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 7fa4a24..b9cc785 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,7 @@ public class SwimlaneCommandHandler
{
@Resource
private ApplicationContext springContext;
- private MBFacade facade;
+ private MBFacade modelBuilderFacade;
/**
* @param parentSymbol
@@ -66,7 +66,7 @@ public class SwimlaneCommandHandler
synchronized (model)
{
- LaneSymbol laneSymbol = facade().createLane(model,
+ LaneSymbol laneSymbol = getModelBuilderFacade().createLane(model,
processDefinition, participantFullID, laneId, laneName, orientation, xPos, yPos,
width, height);
@@ -89,7 +89,7 @@ public class SwimlaneCommandHandler
ProcessDefinitionType processDefinition = ModelUtils.findContainingProcess(parentSymbol);
String laneId = extractString(request, ModelerConstants.ID_PROPERTY);
- LaneSymbol lane = facade().findLaneInProcess(processDefinition, laneId);
+ LaneSymbol lane = getModelBuilderFacade().findLaneInProcess(processDefinition, laneId);
synchronized (model)
{
@@ -98,13 +98,13 @@ public class SwimlaneCommandHandler
}
}
- private MBFacade facade()
+ private MBFacade getModelBuilderFacade()
{
- if (facade == null)
+ if (modelBuilderFacade == null)
{
- facade = new MBFacade(springContext.getBean(ModelService.class)
+ modelBuilderFacade = new MBFacade(springContext.getBean(ModelService.class)
.getModelManagementStrategy());
}
- return facade;
+ return modelBuilderFacade;
}
}
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 9932db0..ab22c40 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,7 @@ public class ApplicationTypeChangeCommandHandler
{
@Resource
private ApplicationContext springContext;
- private MBFacade facade;
+ private MBFacade modelBuilderFacade;
@OnCommand(commandId = "webServiceApplication.create")
public void createWebServiceApp(ModelType model, JsonObject request)
@@ -40,7 +40,7 @@ public class ApplicationTypeChangeCommandHandler
String applicationID = extractString(request, ModelerConstants.ID_PROPERTY);
String applicationName = extractString(request, ModelerConstants.NAME_PROPERTY);
- ApplicationType applicationType = facade().createApplication(model,
+ ApplicationType applicationType = getModelBuilderFacade().createApplication(model,
applicationID, applicationName,
ModelerConstants.WEB_SERVICE_APPLICATION_TYPE_ID);
@@ -57,7 +57,7 @@ public class ApplicationTypeChangeCommandHandler
String applicationID = extractString(request, ModelerConstants.ID_PROPERTY);
String applicationName = extractString(request, ModelerConstants.NAME_PROPERTY);
- ApplicationType applicationType = facade().createApplication(model,
+ ApplicationType applicationType = getModelBuilderFacade().createApplication(model,
applicationID, applicationName,
ModelerConstants.MESSAGE_TRANSFORMATION_APPLICATION_TYPE_ID);
@@ -88,7 +88,7 @@ public class ApplicationTypeChangeCommandHandler
ModelerConstants.CAMEL_APPLICATION_TYPE_ID);
// TODO
- // applicationType.setType(facade().findApplicationTypeType(model,
+ // applicationType.setType(getModelBuilderFacade().findApplicationTypeType(model,
// ModelerConstants.MESSAGE_TRANSFORMATION_APPLICATION_TYPE_ID));
}
@@ -113,7 +113,7 @@ public class ApplicationTypeChangeCommandHandler
ModelerConstants.INTERACTIVE_APPLICATION_TYPE_KEY);
// TODO
- // applicationType.setType(facade().findApplicationTypeType(model,
+ // applicationType.setType(getModelBuilderFacade().findApplicationTypeType(model,
// ModelerConstants.MESSAGE_TRANSFORMATION_APPLICATION_TYPE_ID));
}
@@ -126,7 +126,7 @@ public class ApplicationTypeChangeCommandHandler
{
ModelType model = (ModelType) targetElement;
String appId = extractString(request, ModelerConstants.ID_PROPERTY);
- ApplicationType application = facade().findApplication(model, appId);
+ ApplicationType application = getModelBuilderFacade().findApplication(model, appId);
synchronized (model)
{
@@ -139,13 +139,13 @@ public class ApplicationTypeChangeCommandHandler
return springContext.getBean(ModelService.class);
}
- private MBFacade facade()
+ private MBFacade getModelBuilderFacade()
{
- if (facade == null)
+ if (modelBuilderFacade == null)
{
- facade = new MBFacade(springContext.getBean(ModelService.class)
+ modelBuilderFacade = new MBFacade(springContext.getBean(ModelService.class)
.getModelManagementStrategy());
}
- return facade;
+ return modelBuilderFacade;
}
}
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 39b2d8a..cd3b5d5 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,7 @@ public class DataChangeCommandHandler
{
@Resource
private ApplicationContext springContext;
- private MBFacade facade;
+ private MBFacade modelBuilderFacade;
/**
* @param model
@@ -58,7 +58,7 @@ public class DataChangeCommandHandler
String id = extractString(request, ModelerConstants.ID_PROPERTY);
String name = extractString(request, ModelerConstants.NAME_PROPERTY);
String primitiveType = extractString(request, ModelerConstants.PRIMITIVE_TYPE);
- DataType data = facade().createPrimitiveData(model, id, name, primitiveType);
+ DataType data = getModelBuilderFacade().createPrimitiveData(model, id, name, primitiveType);
long maxOid = XpdlModelUtils.getMaxUsedOid(model);
data.setElementOid(++maxOid);
@@ -78,14 +78,14 @@ public class DataChangeCommandHandler
String id = extractString(request, ModelerConstants.ID_PROPERTY);
String name = extractString(request, ModelerConstants.NAME_PROPERTY);
String dataFullID = extractString(request, ModelerConstants.STRUCTURED_DATA_TYPE_FULL_ID);
- String stripFullId_ = facade().getModelId(extractString(request,
+ String stripFullId_ = getModelBuilderFacade().getModelId(extractString(request,
ModelerConstants.STRUCTURED_DATA_TYPE_FULL_ID));
if (StringUtils.isEmpty(stripFullId_))
{
stripFullId_ = model.getId();
}
- DataType data = facade().createStructuredData(model, id, name,
+ DataType data = getModelBuilderFacade().createStructuredData(model, id, name,
dataFullID);
long maxOid = XpdlModelUtils.getMaxUsedOid(model);
@@ -106,7 +106,7 @@ public class DataChangeCommandHandler
String id = extractString(request, ModelerConstants.ID_PROPERTY);
String name = extractString(request, ModelerConstants.NAME_PROPERTY);
- DataType data = facade().createDocumentData(model, id, name, null);
+ DataType data = getModelBuilderFacade().createDocumentData(model, id, name, null);
long maxOid = XpdlModelUtils.getMaxUsedOid(model);
data.setElementOid(++maxOid);
@@ -124,7 +124,7 @@ public class DataChangeCommandHandler
public void deletetData(ModelType model, JsonObject request)
{
String id = extractString(request, ModelerConstants.ID_PROPERTY);
- DataType data = facade().findData(model, id);
+ DataType data = getModelBuilderFacade().findData(model, id);
synchronized (model)
{
@@ -168,13 +168,13 @@ public class DataChangeCommandHandler
}
}
- private MBFacade facade()
+ private MBFacade getModelBuilderFacade()
{
- if (facade == null)
+ if (modelBuilderFacade == null)
{
- facade = new MBFacade(springContext.getBean(ModelService.class)
+ modelBuilderFacade = new MBFacade(springContext.getBean(ModelService.class)
.getModelManagementStrategy());
}
- return facade;
+ return modelBuilderFacade;
}
}
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 9e435cc..2d943d4 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
@@ -45,7 +45,7 @@ public class ParticipantChangeCommandHandler
{
@Resource
private ApplicationContext springContext;
- private MBFacade facade;
+ private MBFacade modelBuilderFacade;
/**
* @param model
@@ -59,7 +59,7 @@ public class ParticipantChangeCommandHandler
RoleType role = null;
synchronized (model)
{
- role = facade().createRole(model, roleID, roleName);
+ role = getModelBuilderFacade().createRole(model, roleID, roleName);
}
long maxOid = XpdlModelUtils.getMaxUsedOid(model);
role.setElementOid(++maxOid);
@@ -81,7 +81,7 @@ public class ParticipantChangeCommandHandler
OrganizationType org = null;
synchronized (model)
{
- org = facade().createOrganization(model, orgID, orgName);
+ org = getModelBuilderFacade().createOrganization(model, orgID, orgName);
}
long maxOid = XpdlModelUtils.getMaxUsedOid(model);
org.setElementOid(++maxOid);
@@ -104,8 +104,8 @@ public class ParticipantChangeCommandHandler
ModelType model = ModelUtils.findContainingModel(org);
synchronized (model)
{
- role = facade().createRole(model, roleID, roleName);
- facade().addOrganizationParticipant(org, role);
+ role = getModelBuilderFacade().createRole(model, roleID, roleName);
+ getModelBuilderFacade().addOrganizationParticipant(org, role);
}
long maxOid = XpdlModelUtils.getMaxUsedOid(model);
role.setElementOid(++maxOid);
@@ -128,8 +128,8 @@ public class ParticipantChangeCommandHandler
ModelType model = ModelUtils.findContainingModel(org);
synchronized (model)
{
- newOrg = facade().createOrganization(model, orgID, orgName);
- facade().addOrganizationParticipant(org, newOrg);
+ newOrg = getModelBuilderFacade().createOrganization(model, orgID, orgName);
+ getModelBuilderFacade().addOrganizationParticipant(org, newOrg);
}
long maxOid = XpdlModelUtils.getMaxUsedOid(model);
newOrg.setElementOid(++maxOid);
@@ -151,7 +151,7 @@ public class ParticipantChangeCommandHandler
ModelType model = ModelUtils.findContainingModel(org);
synchronized (model)
{
- facade().setTeamLeader(org, tealLeader);
+ getModelBuilderFacade().setTeamLeader(org, tealLeader);
}
}
@@ -163,13 +163,13 @@ public class ParticipantChangeCommandHandler
public void deleteParticipant(ModelType model, JsonObject request)
{
String participantId = extractString(request, ModelerConstants.ID_PROPERTY);
- IModelParticipant modelParticipantInfo = facade().findParticipant(
+ IModelParticipant modelParticipantInfo = getModelBuilderFacade().findParticipant(
model, participantId);
if (modelParticipantInfo instanceof RoleType)
{
synchronized (model)
{
- List<OrganizationType> parentOrgs = facade()
+ List<OrganizationType> parentOrgs = getModelBuilderFacade()
.getParentOrganizations(model, modelParticipantInfo);
for (OrganizationType org : parentOrgs)
@@ -233,13 +233,13 @@ public class ParticipantChangeCommandHandler
return springContext.getBean(ModelService.class);
}
- private MBFacade facade()
+ private MBFacade getModelBuilderFacade()
{
- if (facade == null)
+ if (modelBuilderFacade == null)
{
- facade = new MBFacade(springContext.getBean(ModelService.class)
+ modelBuilderFacade = new MBFacade(springContext.getBean(ModelService.class)
.getModelManagementStrategy());
}
- return facade;
+ return modelBuilderFacade;
}
}
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 7e3c230..25690fa 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,13 +48,13 @@ public class ProcessChangeCommandHandler
{
@Resource
private ApplicationContext springContext;
- private MBFacade facade;
+ private MBFacade modelBuilderFacade;
@OnCommand(commandId = "process.create")
public void createProcess(ModelType model, JsonObject request)
{
String name = extractString(request, ModelerConstants.NAME_PROPERTY);
- String id = facade().createIdFromName(name);
+ String id = getModelBuilderFacade().createIdFromName(name);
ProcessDefinitionType processDefinition = newProcessDefinition(model).withIdAndName(id, name).build();
//Added process definition to UUID map.
EObjectUUIDMapper mapper = modelService().uuidMapper();
@@ -124,7 +124,7 @@ public class ProcessChangeCommandHandler
public void deleteProcess(ModelType model, JsonObject request)
{
String id = extractString(request, ModelerConstants.ID_PROPERTY);
- ProcessDefinitionType processDefinition = facade().findProcessDefinition(model, id);
+ ProcessDefinitionType processDefinition = getModelBuilderFacade().findProcessDefinition(model, id);
synchronized (model)
{
model.getProcessDefinition().remove(processDefinition);
@@ -136,13 +136,13 @@ public class ProcessChangeCommandHandler
return springContext.getBean(ModelService.class);
}
- private MBFacade facade()
+ private MBFacade getModelBuilderFacade()
{
- if (facade == null)
+ if (modelBuilderFacade == null)
{
- facade = new MBFacade(springContext.getBean(ModelService.class)
+ modelBuilderFacade = new MBFacade(springContext.getBean(ModelService.class)
.getModelManagementStrategy());
}
- return facade;
+ return modelBuilderFacade;
}
}
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 51e7af4..ab7164d 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,7 @@ public class StructuredTypeChangeCommandHandler
{
@Resource
private ApplicationContext springContext;
- private MBFacade facade;
+ private MBFacade modelBuilderFacade;
public static final String TYPE_PROPERTY = "type";
@@ -46,7 +46,7 @@ public class StructuredTypeChangeCommandHandler
synchronized (model)
{
EObjectUUIDMapper mapper = modelService().uuidMapper();
- mapper.map(facade().createTypeDeclaration(model, typeId, typeName));
+ mapper.map(getModelBuilderFacade().createTypeDeclaration(model, typeId, typeName));
}
}
@@ -59,7 +59,7 @@ public class StructuredTypeChangeCommandHandler
String structuredDataTypeId = extractString(request,
ModelerConstants.ID_PROPERTY);
- TypeDeclarationType structuredDataType = facade()
+ TypeDeclarationType structuredDataType = getModelBuilderFacade()
.findStructuredDataType(model, structuredDataTypeId);
synchronized (model) {
model.getTypeDeclarations().getTypeDeclaration()
@@ -72,13 +72,13 @@ public class StructuredTypeChangeCommandHandler
return springContext.getBean(ModelService.class);
}
- private MBFacade facade()
+ private MBFacade getModelBuilderFacade()
{
- if (facade == null)
+ if (modelBuilderFacade == null)
{
- facade = new MBFacade(springContext.getBean(ModelService.class)
+ modelBuilderFacade = new MBFacade(springContext.getBean(ModelService.class)
.getModelManagementStrategy());
}
- return facade;
+ return modelBuilderFacade;
}
}
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 3d7bece..cdfacd8 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
@@ -57,7 +57,7 @@ public abstract class ModelElementMarshaller
protected abstract ModelManagementStrategy modelManagementStrategy();
- private MBFacade facade;
+ private MBFacade modelBuilderFacade;
/**
*
@@ -199,7 +199,7 @@ public abstract class ModelElementMarshaller
dataPathJson.addProperty(ModelerConstants.NAME_PROPERTY, dataPath.getName());
dataPathJson.addProperty(
ModelerConstants.DATA_FULL_ID_PROPERTY,
- facade().createFullId(ModelUtils.findContainingModel(dataPath),
+ getModelBuilderFacade().createFullId(ModelUtils.findContainingModel(dataPath),
dataPath.getData()));
dataPathJson.addProperty(ModelerConstants.DATA_PATH_PROPERTY,
dataPath.getDataPath());
@@ -258,7 +258,7 @@ public abstract class ModelElementMarshaller
ModelerConstants.SWIMLANE_SYMBOL);
laneSymbolJson.addProperty(
ModelerConstants.PARTICIPANT_FULL_ID,
- facade().createFullId(
+ getModelBuilderFacade().createFullId(
ModelUtils.findContainingModel(laneSymbol.getParticipant()),
laneSymbol.getParticipant()));
@@ -330,7 +330,7 @@ public abstract class ModelElementMarshaller
laneSymbolJson.addProperty(
ModelerConstants.PARTICIPANT_FULL_ID,
- facade().createFullId(
+ getModelBuilderFacade().createFullId(
ModelUtils.findContainingModel(processDefinition),
laneSymbol.getParticipant()));
}
@@ -486,14 +486,14 @@ public abstract class ModelElementMarshaller
{
activityJson.addProperty(
ModelerConstants.SUBPROCESS_ID,
- facade().createFullId(ModelUtils.findContainingModel(activity),
+ getModelBuilderFacade().createFullId(ModelUtils.findContainingModel(activity),
activity.getImplementationProcess()));
}
else if (activity.getApplication() != null)
{
activityJson.addProperty(
ModelerConstants.APPLICATION_FULL_ID_PROPERTY,
- facade().createFullId(ModelUtils.findContainingModel(activity),
+ getModelBuilderFacade().createFullId(ModelUtils.findContainingModel(activity),
activity.getApplication()));
}
@@ -809,7 +809,7 @@ public abstract class ModelElementMarshaller
if (null != containingModel)
{
dataSymbolJson.addProperty(ModelerConstants.DATA_FULL_ID_PROPERTY,
- facade().createFullId(containingModel, dataSymbol.getData()));
+ getModelBuilderFacade().createFullId(containingModel, dataSymbol.getData()));
}
return dataSymbolJson;
@@ -834,7 +834,7 @@ public abstract class ModelElementMarshaller
if (null != model)
{
- List<OrganizationType> parentOrgs = facade().getParentOrganizations(model, role);
+ List<OrganizationType> parentOrgs = getModelBuilderFacade().getParentOrganizations(model, role);
if (parentOrgs.size() > 0)
{
// TODO - add array of orgs
@@ -875,7 +875,7 @@ public abstract class ModelElementMarshaller
if (null != model)
{
- List<OrganizationType> parentOrgs = facade().getParentOrganizations(model, org);
+ List<OrganizationType> parentOrgs = getModelBuilderFacade().getParentOrganizations(model, org);
if (parentOrgs.size() > 0)
{
orgJson.addProperty(ModelerConstants.PARENT_UUID_PROPERTY,
@@ -1049,7 +1049,7 @@ public abstract class ModelElementMarshaller
}
dataFlowJson.addProperty(ModelerConstants.DATA_FULL_ID_PROPERTY,
- facade().createFullId(ModelUtils.findContainingModel(data), data));
+ getModelBuilderFacade().createFullId(ModelUtils.findContainingModel(data), data));
dataFlowJson.addProperty(ModelerConstants.ACTIVITY_ID_PROPERTY, activity.getId());
}
@@ -1414,12 +1414,12 @@ public abstract class ModelElementMarshaller
}
}
- private MBFacade facade()
+ private MBFacade getModelBuilderFacade()
{
- if (facade == null)
+ if (modelBuilderFacade == null)
{
- facade = new MBFacade(modelManagementStrategy());
+ modelBuilderFacade = new MBFacade(modelManagementStrategy());
}
- return facade;
+ return modelBuilderFacade;
}
}
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 44b14eb..9c3e8c4 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
@@ -76,7 +76,7 @@ public abstract class ModelElementUnmarshaller
protected abstract ModelManagementStrategy modelManagementStrategy();
- private MBFacade facade;
+ private MBFacade modelBuilderFacade;
/**
*
@@ -251,9 +251,9 @@ public abstract class ModelElementUnmarshaller
String subprocessFullId = extractString(activityJson,
ModelerConstants.SUBPROCESS_ID);
- ProcessDefinitionType subProcessDefinition = facade().getProcessDefinition(
- facade().getModelId(subprocessFullId),
- facade().stripFullId(subprocessFullId));
+ ProcessDefinitionType subProcessDefinition = getModelBuilderFacade().getProcessDefinition(
+ getModelBuilderFacade().getModelId(subprocessFullId),
+ getModelBuilderFacade().stripFullId(subprocessFullId));
activity.setImplementationProcess(subProcessDefinition);
}
@@ -265,9 +265,9 @@ public abstract class ModelElementUnmarshaller
String applicationFullId = extractString(activityJson,
ModelerConstants.APPLICATION_FULL_ID_PROPERTY);
- ApplicationType application = facade().getApplication(
- facade().getModelId(applicationFullId),
- facade().stripFullId(applicationFullId));
+ ApplicationType application = getModelBuilderFacade().getApplication(
+ getModelBuilderFacade().getModelId(applicationFullId),
+ getModelBuilderFacade().stripFullId(applicationFullId));
activity.setApplication(application);
}
@@ -334,9 +334,9 @@ public abstract class ModelElementUnmarshaller
String participantFullId = swimlaneSymbolJson.get(
ModelerConstants.PARTICIPANT_FULL_ID).getAsString();
- swimlaneSymbol.setParticipant(facade().findParticipant(
- facade().findModel(facade().getModelId(participantFullId)),
- facade().stripFullId(participantFullId)));
+ swimlaneSymbol.setParticipant(getModelBuilderFacade().findParticipant(
+ getModelBuilderFacade().findModel(getModelBuilderFacade().getModelId(participantFullId)),
+ getModelBuilderFacade().stripFullId(participantFullId)));
}
}
@@ -363,20 +363,20 @@ public abstract class ModelElementUnmarshaller
for (int n = 0; n < dataPathes.size(); ++n)
{
JsonObject dataPathJson = dataPathes.get(n).getAsJsonObject();
- DataPathType dataPath = facade().createDataPath();
+ DataPathType dataPath = getModelBuilderFacade().createDataPath();
String dataFullId = dataPathJson.get(ModelerConstants.DATA_FULL_ID_PROPERTY)
.getAsString();
// TODO Very ugly facade syntax
- DataType data = facade().findData(
- facade().findModel(facade().getModelId(dataFullId)),
- facade().stripFullId(dataFullId));
+ DataType data = getModelBuilderFacade().findData(
+ getModelBuilderFacade().findModel(getModelBuilderFacade().getModelId(dataFullId)),
+ getModelBuilderFacade().stripFullId(dataFullId));
dataPath.setData(data);
dataPath.setDataPath(dataPathJson.get(ModelerConstants.DATA_PATH_PROPERTY)
.getAsString());
- dataPath.setId(facade().createIdFromName(
+ dataPath.setId(getModelBuilderFacade().createIdFromName(
dataPathJson.get(ModelerConstants.NAME_PROPERTY).getAsString()));
dataPath.setName(dataPathJson.get(ModelerConstants.NAME_PROPERTY)
.getAsString());
@@ -704,13 +704,13 @@ public abstract class ModelElementUnmarshaller
*
* @return
*/
- private MBFacade facade()
+ private MBFacade getModelBuilderFacade()
{
- if (facade == null)
+ if (modelBuilderFacade == null)
{
- facade = new MBFacade(modelManagementStrategy());
+ modelBuilderFacade = new MBFacade(modelManagementStrategy());
}
- return facade;
+ return modelBuilderFacade;
}
/**
diff --git a/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/service/ModelService.java b/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/service/ModelService.java
index 5b35de2..78c6042 100644
--- a/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/service/ModelService.java
+++ b/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/service/ModelService.java
@@ -584,8 +584,8 @@ public class ModelService
ModelType model = getModelManagementStrategy().getModels().get(modelId);
String name = extractString(postedData, NEW_OBJECT_PROPERTY,
ModelerConstants.NAME_PROPERTY);
- String id = facade().createIdFromName(name);
- ProcessDefinitionType processDefinition = facade().createProcess(
+ String id = getModelBuilderFacade().createIdFromName(name);
+ ProcessDefinitionType processDefinition = getModelBuilderFacade().createProcess(
model, name, id);
JsonObject processDefinitionJson = new JsonObject();
@@ -619,9 +619,9 @@ public class ModelService
JsonObject commandJson)
{
ModelType model = getModelManagementStrategy().getModels().get(modelId);
- ProcessDefinitionType processDefinition = facade()
+ ProcessDefinitionType processDefinition = getModelBuilderFacade()
.findProcessDefinition(model, processId);
- ActivityType activity = facade().findActivity(processDefinition,
+ ActivityType activity = getModelBuilderFacade().findActivity(processDefinition,
activityId);
EditingSession editingSession = getEditingSession(model);
@@ -867,7 +867,7 @@ public class ModelService
JsonObject modelElementJson = connectionJson
.getAsJsonObject(ModelerConstants.MODEL_ELEMENT_PROPERTY);
ModelType model = getModelManagementStrategy().getModels().get(modelId);
- ProcessDefinitionType processDefinition = facade()
+ ProcessDefinitionType processDefinition = getModelBuilderFacade()
.findProcessDefinition(model, processId);
EditingSession editSession = getEditingSession(model);
@@ -880,7 +880,7 @@ public class ModelService
if (extractString(modelElementJson, TYPE_PROPERTY).equals(CONTROL_FLOW_LITERAL))
{
- TransitionConnectionType transitionConnection = facade()
+ TransitionConnectionType transitionConnection = getModelBuilderFacade()
.findTransitionConnectionByModelOid(processDefinition, connectionOid);
transitionConnection.setSourceAnchor(mapAnchorOrientation(extractInt(
connectionJson, FROM_ANCHOR_POINT_ORIENTATION_PROPERTY)));
@@ -914,7 +914,7 @@ public class ModelService
}
else
{
- DataMappingConnectionType dataMappingConnection = facade()
+ DataMappingConnectionType dataMappingConnection = getModelBuilderFacade()
.findDataMappingConnectionByModelOid(processDefinition, connectionOid);
dataMappingConnection.setSourceAnchor(mapAnchorOrientation(extractInt(
@@ -956,7 +956,7 @@ public class ModelService
// String key = (String)iterator.next();
// JSONObject laneSymbolJson = laneSymbolsJson.getJSONObject(key);
JsonObject laneSymbolJson = laneSymbolsJson.get(n).getAsJsonObject();
- LaneSymbol laneSymbol = facade().findLaneSymbolByElementOid(
+ LaneSymbol laneSymbol = getModelBuilderFacade().findLaneSymbolByElementOid(
poolSymbol, extractLong(laneSymbolJson, OID_PROPERTY));
updateLane(model, laneSymbol, laneSymbolJson);
@@ -976,9 +976,9 @@ public class ModelService
JsonObject laneSymbolJson)
{
ModelType model = getModelManagementStrategy().getModels().get(modelId);
- ProcessDefinitionType processDefinition = facade()
+ ProcessDefinitionType processDefinition = getModelBuilderFacade()
.findProcessDefinition(model, processId);
- LaneSymbol laneSymbol = facade().findLaneSymbolById(
+ LaneSymbol laneSymbol = getModelBuilderFacade().findLaneSymbolById(
processDefinition, laneId);
EditingSession editingSession = getEditingSession(model);
@@ -1018,13 +1018,13 @@ public class ModelService
System.out.println("Participant Full ID"
+ extractString(laneSymbolJson, ModelerConstants.PARTICIPANT_FULL_ID));
System.out.println("Participant "
- + facade().findParticipant(
+ + getModelBuilderFacade().findParticipant(
model,
- facade().stripFullId(
+ getModelBuilderFacade().stripFullId(
extractString(laneSymbolJson,
ModelerConstants.PARTICIPANT_FULL_ID))));
- String participantModelID = facade().getModelId(
+ String participantModelID = getModelBuilderFacade().getModelId(
extractString(laneSymbolJson, ModelerConstants.PARTICIPANT_FULL_ID));
if (StringUtils.isEmpty(participantModelID))
{
@@ -1038,10 +1038,10 @@ public class ModelService
participantModelID);
}
- IModelParticipant modelParticipant = facade()
+ IModelParticipant modelParticipant = getModelBuilderFacade()
.findParticipant(
getModelManagementStrategy().getModels().get(participantModelID),
- facade().stripFullId(
+ getModelBuilderFacade().stripFullId(
extractString(laneSymbolJson,
ModelerConstants.PARTICIPANT_FULL_ID)));
@@ -1069,7 +1069,7 @@ public class ModelService
{
JsonObject activitySymbolJson = entry.getValue().getAsJsonObject();
- ActivitySymbolType activitySymbol = facade().findActivitySymbol(
+ ActivitySymbolType activitySymbol = getModelBuilderFacade().findActivitySymbol(
laneSymbol, extractLong(activitySymbolJson, OID_PROPERTY));
// updateActivity(activitySymbol, laneSymbol, activitySymbolJson);
@@ -1081,7 +1081,7 @@ public class ModelService
{
JsonObject gatewaySymbolJson = entry.getValue().getAsJsonObject();
- ActivitySymbolType gatewaySymbol = facade().findActivitySymbol(
+ ActivitySymbolType gatewaySymbol = getModelBuilderFacade().findActivitySymbol(
laneSymbol, extractLong(gatewaySymbolJson, OID_PROPERTY));
updateGateway(gatewaySymbol, laneSymbol, gatewaySymbolJson);
@@ -1092,12 +1092,12 @@ public class ModelService
{
JsonObject eventSymbolJson = entry.getValue().getAsJsonObject();
- AbstractEventSymbol eventSymbol = facade().findStartEventSymbol(
+ AbstractEventSymbol eventSymbol = getModelBuilderFacade().findStartEventSymbol(
laneSymbol, extractLong(eventSymbolJson, OID_PROPERTY));
if (eventSymbol == null)
{
- eventSymbol = facade().findEndEventSymbol(laneSymbol,
+ eventSymbol = getModelBuilderFacade().findEndEventSymbol(laneSymbol,
extractLong(eventSymbolJson, OID_PROPERTY));
}
@@ -1109,7 +1109,7 @@ public class ModelService
{
JsonObject dataSymbolJson = entry.getValue().getAsJsonObject();
- DataSymbolType dataSymbol = facade().findDataSymbolRecursively(
+ DataSymbolType dataSymbol = getModelBuilderFacade().findDataSymbolRecursively(
laneSymbol, extractLong(dataSymbolJson, OID_PROPERTY));
// updateData(dataSymbol, dataSymbolJson);
@@ -1133,7 +1133,7 @@ public class ModelService
getModelManagementStrategy().attachModel(modelId);
}
- ProcessDefinitionType processDefinition = facade()
+ ProcessDefinitionType processDefinition = getModelBuilderFacade()
.findProcessDefinition(model, processId);
return modelElementMarshaller().toProcessDefinitionDiagram(processDefinition)
@@ -1147,7 +1147,7 @@ public class ModelService
JsonObject diagramJson)
{
ModelType model = getModelManagementStrategy().getModels().get(modelId);
- ProcessDefinitionType processDefinition = facade()
+ ProcessDefinitionType processDefinition = getModelBuilderFacade()
.findProcessDefinition(model, processId);
DiagramType diagram = processDefinition.getDiagram().get(0);
EditingSession editSession = getEditingSession(model);
@@ -1160,7 +1160,7 @@ public class ModelService
{
JsonObject poolSymbolJson = entry.getValue().getAsJsonObject();
- PoolSymbol poolSymbol = facade().findPoolSymbolByElementOid(
+ PoolSymbol poolSymbol = getModelBuilderFacade().findPoolSymbolByElementOid(
processDefinition, extractLong(poolSymbolJson, OID_PROPERTY));
updatePool(model, poolSymbol, poolSymbolJson);
@@ -1413,7 +1413,7 @@ public class ModelService
*/
private boolean hasParentParticipant(ModelType model, IModelParticipant participant)
{
- List<OrganizationType> parentOrgs = facade().getParentOrganizations(
+ List<OrganizationType> parentOrgs = getModelBuilderFacade().getParentOrganizations(
model, participant);
if (parentOrgs.size() > 0)
{
@@ -1514,7 +1514,7 @@ public class ModelService
JsonObject dataSymbolJson)
{
ModelType model = getModelManagementStrategy().getModels().get(modelId);
- ProcessDefinitionType processDefinition = facade()
+ ProcessDefinitionType processDefinition = getModelBuilderFacade()
.findProcessDefinition(model, processId);
EditingSession editSession = getEditingSession(model);
@@ -1544,10 +1544,10 @@ public class ModelService
JsonObject wizardParameterJson = (JsonObject) json.get(NEW_OBJECT_PROPERTY);
JsonObject processDefinitionJson = (JsonObject) createProcessJson(modelId, json);
- ProcessDefinitionType processDefinition = facade()
+ ProcessDefinitionType processDefinition = getModelBuilderFacade()
.findProcessDefinition(model,
extractString(json, NEW_OBJECT_PROPERTY, ModelerConstants.ID_PROPERTY));
- LaneSymbol parentLaneSymbol = facade().findLaneInProcess(
+ LaneSymbol parentLaneSymbol = getModelBuilderFacade().findLaneInProcess(
processDefinition, ModelerConstants.DEF_LANE_ID);
// Create Start Event
@@ -1574,12 +1574,12 @@ public class ModelService
DataType data = newStructVariable(model)
.withIdAndName(
- facade().createIdFromName(
+ getModelBuilderFacade().createIdFromName(
extractString(wizardParameterJson,
"requestParameterDataNameInput")),
extractString(wizardParameterJson, "requestParameterDataNameInput"))
.ofType(
- /* Dummy */facade().stripFullId(
+ /* Dummy */getModelBuilderFacade().stripFullId(
extractString(wizardParameterJson,
"serviceRequestParameterTypeId"))).build();
@@ -1600,12 +1600,12 @@ public class ModelService
ActivityType activity = newApplicationActivity(processDefinition)
.withIdAndName(
- facade().createIdFromName(
+ getModelBuilderFacade().createIdFromName(
extractString(wizardParameterJson,
"requestTransformationActivityName")),
extractString(wizardParameterJson, "requestTransformationActivityName"))
.invokingApplication(
- facade().getApplication(modelId,
+ getModelBuilderFacade().getApplication(modelId,
extractString(wizardParameterJson, "applicationId"))).build();
// setDescription(activity,
@@ -1629,10 +1629,10 @@ public class ModelService
// Request data
data = newStructVariable(model)
- .withIdAndName(facade().createIdFromName("Service Request"),
+ .withIdAndName(getModelBuilderFacade().createIdFromName("Service Request"),
"Service Request")
.ofType(
- facade().stripFullId(
+ getModelBuilderFacade().stripFullId(
extractString(wizardParameterJson,
"serviceRequestParameterTypeId"))).build();
@@ -1653,12 +1653,12 @@ public class ModelService
activity = newApplicationActivity(processDefinition)
.withIdAndName(
- facade().createIdFromName(
+ getModelBuilderFacade().createIdFromName(
extractString(wizardParameterJson,
"serviceInvocationActivityName")),
extractString(wizardParameterJson, "serviceInvocationActivityName"))
.invokingApplication(
- facade().getApplication(modelId,
+ getModelBuilderFacade().getApplication(modelId,
extractString(wizardParameterJson, "applicationId"))).build();
// setDescription(activity,
@@ -1681,10 +1681,10 @@ public class ModelService
// Response data
data = newStructVariable(model)
- .withIdAndName(facade().createIdFromName("Service Response"),
+ .withIdAndName(getModelBuilderFacade().createIdFromName("Service Response"),
"Service Response")
.ofType(
- facade().stripFullId(
+ getModelBuilderFacade().stripFullId(
extractString(wizardParameterJson,
"serviceResponseParameterTypeId"))).build();
@@ -1705,12 +1705,12 @@ public class ModelService
activity = newApplicationActivity(processDefinition)
.withIdAndName(
- facade().createIdFromName(
+ getModelBuilderFacade().createIdFromName(
extractString(wizardParameterJson,
"responseTransformationActivityName")),
extractString(wizardParameterJson, "responseTransformationActivityName"))
.invokingApplication(
- facade().getApplication(modelId,
+ getModelBuilderFacade().getApplication(modelId,
extractString(wizardParameterJson, "applicationId"))).build();
// setDescription(activity,
@@ -1742,12 +1742,12 @@ public class ModelService
data = newStructVariable(model)
.withIdAndName(
- facade().createIdFromName(
+ getModelBuilderFacade().createIdFromName(
extractString(wizardParameterJson,
"responseParameterDataNameInput")),
extractString(wizardParameterJson, "responseParameterDataNameInput"))
.ofType(
- /* Dummy */facade().stripFullId(
+ /* Dummy */getModelBuilderFacade().stripFullId(
extractString(wizardParameterJson,
"serviceResponseParameterTypeId"))).build();
@@ -1930,7 +1930,7 @@ public class ModelService
public ProcessDefinitionType findProcessDefinition(ModelType model, String id)
{
- return facade().findProcessDefinition(model, id);
+ return getModelBuilderFacade().findProcessDefinition(model, id);
}
public ModelType findModel(String modelId)
@@ -2108,7 +2108,7 @@ public class ModelService
return json;
}
- private MBFacade facade()
+ private MBFacade getModelBuilderFacade()
{
return new MBFacade(getModelManagementStrategy());
}