diff options
Diffstat (limited to 'vid-app-common/src/main/java/org/openecomp/vid/properties')
-rwxr-xr-x | vid-app-common/src/main/java/org/openecomp/vid/properties/VidProperties.java | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/vid-app-common/src/main/java/org/openecomp/vid/properties/VidProperties.java b/vid-app-common/src/main/java/org/openecomp/vid/properties/VidProperties.java index 141b9b27..38062df4 100755 --- a/vid-app-common/src/main/java/org/openecomp/vid/properties/VidProperties.java +++ b/vid-app-common/src/main/java/org/openecomp/vid/properties/VidProperties.java @@ -53,21 +53,27 @@ public class VidProperties extends SystemProperties { *
* @return the property value or a default value
*/
- public static String getAsdcModelNamespace() {
+ public static String[] getAsdcModelNamespace() {
String methodName = "getAsdcModelNamespace ";
- String asdcModelNamespace = ModelConstants.DEFAULT_ASDC_MODEL_NAMESPACE;
+ String[] asdcModelNamespaces = null;
+ String value = null;
try {
- asdcModelNamespace = SystemProperties.getProperty(ModelConstants.ASDC_MODEL_NAMESPACE);
- if ( asdcModelNamespace == null || asdcModelNamespace.isEmpty()) {
- asdcModelNamespace = ModelConstants.DEFAULT_ASDC_MODEL_NAMESPACE;
+ value = SystemProperties.getProperty(ModelConstants.ASDC_MODEL_NAMESPACE);
+ if ( value == null || value.isEmpty()) {
+ asdcModelNamespaces = new String[1];
+ asdcModelNamespaces[0] = ModelConstants.DEFAULT_ASDC_MODEL_NAMESPACE;
}
+ else {
+ asdcModelNamespaces = value.split(",");
+ }
}
catch ( Exception e ) {
LOG.error (EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + methodName + "unable to find the value, using the default "
+ ModelConstants.DEFAULT_ASDC_MODEL_NAMESPACE);
- asdcModelNamespace = ModelConstants.DEFAULT_ASDC_MODEL_NAMESPACE;
+ asdcModelNamespaces = new String[1];
+ asdcModelNamespaces[0] = ModelConstants.DEFAULT_ASDC_MODEL_NAMESPACE;
}
- return (asdcModelNamespace);
+ return (asdcModelNamespaces);
}
/**
* Gets the specified property value. If the property is not defined, returns a default value.
@@ -90,4 +96,5 @@ public class VidProperties extends SystemProperties { }
return (propValue);
}
+
}
|