Merge "Reorder modifiers"
[so.git] / bpmn / MSOInfrastructureBPMN / src / main / java / org / openecomp / mso / bpmn / infrastructure / workflow / serviceTask / client / builder / AbstractBuilder.java
index de50fe1..2f5bda6 100644 (file)
@@ -110,7 +110,7 @@ public abstract class AbstractBuilder<IN, OUT> {
      protected String getRequestActoin(DelegateExecution execution) {
           String action = /*RequestInformation.*/RequestAction.CreateNetworkInstance.getName();
           String operType = (String) execution.getVariable(OPERATION_TYPE);
-          String resourceType = ((String) execution.getVariable(RESOURCE_TYPE)).toLowerCase();
+          String resourceType = (String)execution.getVariable(RESOURCE_TYPE);
           if (!StringUtils.isBlank(operType)) {
                if (RequestsDbConstant.OperationType.DELETE.equalsIgnoreCase(operType)) {
                     if (isOverlay(resourceType)) {
@@ -134,17 +134,17 @@ public abstract class AbstractBuilder<IN, OUT> {
      }
 
      private boolean isOverlay(String resourceType) {
-          return !StringUtils.isBlank(resourceType) && resourceType.contains("overlay");
+          return !StringUtils.isBlank(resourceType) && resourceType.toLowerCase().contains("overlay");
      }
 
      private boolean isUnderlay(String resourceType) {
-          return !StringUtils.isBlank(resourceType) && resourceType.contains("underlay");
+          return !StringUtils.isBlank(resourceType) && resourceType.toLowerCase().contains("underlay");
      }
 
      protected String getSvcAction(DelegateExecution execution) {
           String action = /*SdncRequestHeader.*/SvcAction.Create.getName();
           String operType = (String) execution.getVariable(OPERATION_TYPE);
-          String resourceType = ((String) execution.getVariable(RESOURCE_TYPE)).toLowerCase();
+          String resourceType = (String)execution.getVariable(RESOURCE_TYPE);
           if (!StringUtils.isBlank(operType)) {
                if (RequestsDbConstant.OperationType.DELETE.equalsIgnoreCase(operType)) {
                     if (isOverlay(resourceType)) {
@@ -231,7 +231,7 @@ public abstract class AbstractBuilder<IN, OUT> {
 
      protected ServiceInformationEntity getServiceInformationEntity(DelegateExecution execution) {
           ServiceInformationEntity serviceInformationEntity = new ServiceInformationEntity();
-          serviceInformationEntity.setServiceId("VOLTE_SERVICE_ID");
+          serviceInformationEntity.setServiceId((String) execution.getVariable("serviceInstanceId"));
           serviceInformationEntity.setSubscriptionServiceType((String) execution.getVariable("serviceType"));
           serviceInformationEntity.setOnapModelInformation(getOnapServiceModelInformationEntity(execution));
           serviceInformationEntity.setServiceInstanceId((String) execution.getVariable("serviceInstanceId"));