summaryrefslogtreecommitdiffstats
path: root/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/appc/ApplicationControllerClient.java
diff options
context:
space:
mode:
Diffstat (limited to 'bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/appc/ApplicationControllerClient.java')
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/appc/ApplicationControllerClient.java24
1 files changed, 12 insertions, 12 deletions
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/appc/ApplicationControllerClient.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/appc/ApplicationControllerClient.java
index 4255df3e87..5182a75a79 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/appc/ApplicationControllerClient.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/appc/ApplicationControllerClient.java
@@ -86,6 +86,9 @@ public class ApplicationControllerClient {
* @param controllerType the controller type: "appc" or "sdnc".
*/
public ApplicationControllerClient(String controllerType) {
+ if (controllerType == null) {
+ controllerType = DEFAULT_CONTROLLER_TYPE;
+ }
this.controllerType = controllerType;
appCSupport = new ApplicationControllerSupport();
}
@@ -109,6 +112,9 @@ public class ApplicationControllerClient {
protected LifeCycleManagerStateful createAppCClient(String controllerType) {
try {
+ if (controllerType == null) {
+ controllerType = DEFAULT_CONTROLLER_TYPE;
+ }
return AppcClientServiceFactoryProvider.getFactory(AppcLifeCycleManagerServiceFactory.class)
.createLifeCycleManagerStateful(new ApplicationContext(), getLCMProperties(controllerType));
} catch (AppcClientException e) {
@@ -142,21 +148,15 @@ public class ApplicationControllerClient {
Properties properties = new Properties();
Map<String, String> globalProperties = PropertyConfiguration.getInstance()
.getProperties("mso.bpmn.urn.properties");
- if (controllerType==null || controllerType.length()==0 || controllerType.equalsIgnoreCase("appc")) {
- properties.put("topic.read", globalProperties.get("appc.client.topic.read"));
- properties.put("topic.write", globalProperties.get("appc.client.topic.write"));
- } else {
- properties.put("topic.read", globalProperties.get("appc.client.topic." + controllerType + ".read"));
- properties.put("topic.write", globalProperties.get("appc.client.topic." + controllerType + ".write"));
- }
- properties.put("topic.sdnc.read", globalProperties.get("appc.client.topic.sdnc.read"));
- properties.put("topic.sdnc.write", globalProperties.get("appc.client.topic.sdnc.write"));
- properties.put("sdnc-topic.read", globalProperties.get("appc.client.topic.sdnc.read"));
- properties.put("sdnc-topic.write", globalProperties.get("appc.client.topic.sdnc.write"));
+
+ properties.put("topic.read", globalProperties.get("appc.client.topic.read"));
+ properties.put("topic.write", globalProperties.get("appc.client.topic.write"));
+ properties.put("SDNC-topic.read", globalProperties.get("appc.client.topic.sdnc.read"));
+ properties.put("SDNC-topic.write", globalProperties.get("appc.client.topic.sdnc.write"));
properties.put("topic.read.timeout", globalProperties.get("appc.client.topic.read.timeout"));
properties.put("client.response.timeout", globalProperties.get("appc.client.response.timeout"));
properties.put("poolMembers", globalProperties.get("appc.client.poolMembers"));
- properties.put("client.controllerType", controllerType);
+ properties.put("controllerType", controllerType);
properties.put("client.key", globalProperties.get("appc.client.key"));
properties.put("client.secret", globalProperties.get("appc.client.secret"));
properties.put("client.name", CLIENT_NAME);