X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=auth%2Fauth-core%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Faaf%2Fauth%2Fserver%2FAbsService.java;fp=auth%2Fauth-core%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Faaf%2Fauth%2Fserver%2FAbsService.java;h=9ece4847dbc6f6d425a1bb7c71e718b7e8e24137;hb=12414fe43077e12d7ef711951b1633ad31d73573;hp=435b8845450ed3476ecc3f3636e74ba053be4702;hpb=a5bcce655e339151445fbce2c129687e3bc8610a;p=aaf%2Fauthz.git diff --git a/auth/auth-core/src/main/java/org/onap/aaf/auth/server/AbsService.java b/auth/auth-core/src/main/java/org/onap/aaf/auth/server/AbsService.java index 435b8845..9ece4847 100644 --- a/auth/auth-core/src/main/java/org/onap/aaf/auth/server/AbsService.java +++ b/auth/auth-core/src/main/java/org/onap/aaf/auth/server/AbsService.java @@ -54,42 +54,30 @@ public abstract class AbsService exte public final String app_name; public final String app_version; - public final String app_interface_version; public final String ROOT_NS; - + public AbsService(final Access access, final ENV env) throws CadiException { - Define.set(access); - ROOT_NS = Define.ROOT_NS(); + Define.set(access); + ROOT_NS = Define.ROOT_NS(); this.access = access; this.env = env; - String component = access.getProperty(Config.AAF_COMPONENT, null); - final String[] locator_deploy; - - if (component == null) { - locator_deploy = null; + String str = access.getProperty(Config.AAF_LOCATOR_NAMES, null); + String[] scomp = Split.splitTrim(',', str); + if(scomp.length==0) { + throw new CadiException(Config.AAF_LOCATOR_NAMES + " must be defined."); } else { - locator_deploy = Split.splitTrim(':', component); - if(locator_deploy.length>1 && "AAF_RELEASE".equals(locator_deploy[1])) { - locator_deploy[1]=access.getProperty(Config.AAF_RELEASE, Defaults.AAF_VERSION); - int snapshot = locator_deploy[1].indexOf("-SNAPSHOT"); - if(snapshot>0) { - locator_deploy[1]=locator_deploy[1].substring(0, snapshot); - } - } - } - - if (component == null || locator_deploy==null || locator_deploy.length<2) { - throw new CadiException("AAF Component must include the " + Config.AAF_COMPONENT + " property, : exte access.log(Level.DEBUG,sb); } } + + public void setProtocol(String proto) { + env.setProperty(Config.AAF_LOCATOR_PROTOCOL, proto); + } + public void setSubprotocol(String subproto) { + env.setProperty(Config.AAF_LOCATOR_SUBPROTOCOL, subproto); + } + protected abstract Filter[] _filters(Object ... additionalTafLurs) throws CadiException, LocatorException; /** @@ -125,7 +121,7 @@ public abstract class AbsService exte return _filters(); } - public abstract Registrant[] registrants(final int port) throws CadiException, LocatorException; + public abstract Registrant[] registrants(final int actualPort) throws CadiException, LocatorException; // Lazy Instantiation public synchronized AAFConHttp aafCon() throws CadiException, LocatorException {