Replaced all tabs with spaces in java and pom.xml
[so.git] / bpmn / MSOCoreBPMN / src / main / java / org / onap / so / bpmn / core / UrnPropertiesReader.java
index 0c88e3e..78a73c5 100644 (file)
@@ -23,7 +23,6 @@
 package org.onap.so.bpmn.core;
 
 import java.util.Optional;
-
 import org.camunda.bpm.engine.delegate.DelegateExecution;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -43,31 +42,30 @@ public class UrnPropertiesReader {
     private static Environment environment;
 
     @Autowired
-       public void setEnvironment(Environment environment) {
-       this.environment = environment;
-       }
-       /**
-     * Return the URN property value
-     * if property is present in the execution object, return the same
-     * else search in the environment object. If found, add it to the execution object and return the value
-     * otherwise return null
+    public void setEnvironment(Environment environment) {
+        this.environment = environment;
+    }
+
+    /**
+     * Return the URN property value if property is present in the execution object, return the same else search in the
+     * environment object. If found, add it to the execution object and return the value otherwise return null
      *
      * @param variableName URN property name
-     * @param execution    The flow's execution instance.
+     * @param execution The flow's execution instance.
      * @return URN property value
      */
     public static String getVariable(String variableName, DelegateExecution execution) {
         Object value = execution.getVariable(variableName);
         if (value != null) {
             logger.trace("Retrieved value for the URN variable, {}, from the execution object: {}", variableName,
-                String.valueOf(value));
+                    String.valueOf(value));
             return String.valueOf(value);
         }
         String variableValue = null;
         if (environment != null && environment.getProperty(variableName) != null) {
             variableValue = environment.getProperty(variableName);
             logger.trace("Retrieved value for the URN variable, {}, from the environment variable: {}", variableName,
-                variableValue);
+                    variableValue);
             execution.setVariable(variableName, variableValue);
             return variableValue;
         }
@@ -80,33 +78,35 @@ public class UrnPropertiesReader {
 
     /**
      * Return the URN property value from the environment object
+     * 
      * @param variableName URN property name
      * @return URN property value
      */
 
-    public static String getVariable(String variableName){
+    public static String getVariable(String variableName) {
         if (environment != null) {
             return environment.getProperty(variableName);
         } else {
             return null;
         }
     }
-    
+
     /**
      * Return the String array URN property value from the environment object
+     * 
      * @param variableName URN property name
      * @return URN property value
      */
 
-    public static String[] getVariablesArray(String variableName){
+    public static String[] getVariablesArray(String variableName) {
         if (environment != null) {
             return environment.getProperty(variableName, String[].class);
         } else {
             return null;
         }
     }
-    
+
     public static String getVariable(String variableName, String defaultValue) {
-       return Optional.ofNullable(getVariable(variableName)).orElse(defaultValue); 
+        return Optional.ofNullable(getVariable(variableName)).orElse(defaultValue);
     }
 }