Change API Version to 2.1.15
[aaf/authz.git] / auth / auth-cass / src / main / java / org / onap / aaf / auth / direct / DirectAAFLocator.java
index cc9ee66..27d5df7 100644 (file)
@@ -73,9 +73,14 @@ public class DirectAAFLocator extends AbsAAFLocator<AuthzTrans> {
         }
         
         try {
-               RegistrationPropHolder rph = new RegistrationPropHolder(access,0);
-               String aaf_url = rph.replacements("https://"+Config.AAF_LOCATE_URL_TAG+"/%CNS."+name, null,null);
-               //access.getProperty("/locate/"+name+':'+version;
+               String aaf_url;
+               if(name.indexOf('.')>=0) {
+               aaf_url = "https://"+Config.AAF_LOCATE_URL_TAG+'/'+name+':'+version;
+               } else {
+                               aaf_url = "https://"+Config.AAF_LOCATE_URL_TAG+"/%CNS.%NS."+name+':'+version;
+               }
+               RegistrationPropHolder rph = new RegistrationPropHolder(access,0);
+               aaf_url = rph.replacements(getClass().getSimpleName(),aaf_url, null,null);
                access.printf(Level.INIT,"Creating DirectAAFLocator to %s",aaf_url);
             uri = new URI(aaf_url);
         } catch (URISyntaxException | UnknownHostException | CadiException e) {