summaryrefslogtreecommitdiffstats
path: root/cadi/core/src
diff options
context:
space:
mode:
authorInstrumental <jonathan.gathman@att.com>2019-05-31 15:08:37 -0500
committerInstrumental <jonathan.gathman@att.com>2019-05-31 15:13:25 -0500
commitdbec47530c91b6cd586fb05b44fd27444301e04a (patch)
tree85bd688449a2ea3d52d585e2b3dbd84a6168e861 /cadi/core/src
parent98adb75e5e627d28ecdf659f4c8ed640ce53ed5e (diff)
Switch to new Locate Features
Issue-ID: AAF-839 Change-Id: I3122d32330c7e0fab533db8355183dbff68f7cc7 Signed-off-by: Instrumental <jonathan.gathman@att.com>
Diffstat (limited to 'cadi/core/src')
-rw-r--r--cadi/core/src/main/java/org/onap/aaf/cadi/config/Config.java17
1 files changed, 16 insertions, 1 deletions
diff --git a/cadi/core/src/main/java/org/onap/aaf/cadi/config/Config.java b/cadi/core/src/main/java/org/onap/aaf/cadi/config/Config.java
index 52bb53ef..66fbe847 100644
--- a/cadi/core/src/main/java/org/onap/aaf/cadi/config/Config.java
+++ b/cadi/core/src/main/java/org/onap/aaf/cadi/config/Config.java
@@ -151,6 +151,9 @@ public class Config {
public static final String AAF_ROOT_NS = "aaf_root_ns";
public static final String AAF_ROOT_NS_DEF = "org.osaaf.aaf";
public static final String AAF_ROOT_COMPANY = "aaf_root_company";
+ /**
+ * Use Config.getAAFLocateUrl(access) to get correct property in/out of container
+ */
public static final String AAF_LOCATE_URL = "aaf_locate_url"; //URL for AAF locator
public static final String AAF_LOCATE_URL_TAG = "AAF_LOCATE_URL"; // Name of Above for use in Config Variables.
public static final String AAF_DEFAULT_API_VERSION = "2.1";
@@ -561,7 +564,7 @@ public class Config {
}
access.log(Level.INIT, sb);
- Locator<URI> locator = loadLocator(si, logProp(rph, AAF_LOCATE_URL, null));
+ Locator<URI> locator = loadLocator(si, logProp(rph, Config.getAAFLocateUrl(access), null));
taf = new HttpEpiTaf(access,locator, tc, htarray); // ok to pass locator == null
String level = logProp(access, CADI_LOGLEVEL, null);
@@ -904,6 +907,18 @@ public class Config {
public static String getDefaultRealm() {
return defaultRealm;
}
+
+ public static String getAAFLocateUrl(Access access) {
+ String rv = null;
+ String cont = access.getProperty(AAF_LOCATOR_CONTAINER,null);
+ if(cont!=null) {
+ rv = access.getProperty(AAF_LOCATE_URL + '.' +cont, null);
+ }
+ if(rv==null) {
+ rv = access.getProperty(AAF_LOCATE_URL, null);
+ }
+ return rv;
+ }
private static class Priori<T> implements Comparable<Priori<T>> {
public final T t;