X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=auth%2Fauth-locate%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Faaf%2Fauth%2Flocate%2FAAF_Locate.java;fp=auth%2Fauth-locate%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Faaf%2Fauth%2Flocate%2FAAF_Locate.java;h=ff538269a6f7079b44c23a2e69a0d208bb59530b;hb=1296352d8eafee57f982a4342ad79ada4aa56d28;hp=0ad14c84b54ccfd73ac87b734c83f9649e816baa;hpb=bdce7667a6e272e2fa32e298d957a0d9090c5bc9;p=aaf%2Fauthz.git diff --git a/auth/auth-locate/src/main/java/org/onap/aaf/auth/locate/AAF_Locate.java b/auth/auth-locate/src/main/java/org/onap/aaf/auth/locate/AAF_Locate.java index 0ad14c84..ff538269 100644 --- a/auth/auth-locate/src/main/java/org/onap/aaf/auth/locate/AAF_Locate.java +++ b/auth/auth-locate/src/main/java/org/onap/aaf/auth/locate/AAF_Locate.java @@ -7,9 +7,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -81,19 +81,19 @@ public class AAF_Locate extends AbsService { public final ConfigDAO configDAO; private Locator dal; - + /** * Construct AuthzAPI with all the Context Supporting Routes that Authz needs - * + * * @param env - * @param si - * @param dm - * @param decryptor - * @throws APIException + * @param si + * @param dm + * @param decryptor + * @throws APIException */ public AAF_Locate(final AuthzEnv env) throws Exception { super(env.access(), env); - + expireIn = Long.parseLong(env.getProperty(Config.AAF_USER_EXPIRES, Config.AAF_USER_EXPIRES_DEF)); // Initialize Facade for all uses @@ -129,7 +129,7 @@ public class AAF_Locate extends AbsService { API_AAFAccess.init(this,facade); API_Find.init(this, facade); API_Proxy.init(this, facade); - + //////////////////////////////////////////////////////////////////////// // Management APIs //////////////////////////////////////////////////////////////////////// @@ -143,21 +143,21 @@ public class AAF_Locate extends AbsService { // Default Function //////////////////////////////////////////////////////////////////////// API_AAFAccess.initDefault(this,facade); - + } - + /** * Setup XML and JSON implementations for each supported Version type - * + * * We do this by taking the Code passed in and creating clones of these with the appropriate Facades and properties * to do Versions and Content switches - * + * */ public void route(HttpMethods meth, String path, API api, LocateCode code) throws Exception { String version = "1.0"; // Get Correct API Class from Mapper - Class respCls = facade.mapper().getClass(api); + Class respCls = facade.mapper().getClass(api); if (respCls==null) throw new Exception("Unknown class associated with " + api.getClass().getName() + ' ' + api.name()); // setup Application API HTML ContentTypes for JSON and Route String application = applicationJSON(respCls, version); @@ -166,10 +166,10 @@ public class AAF_Locate extends AbsService { // setup Application API HTML ContentTypes for XML and Route application = applicationXML(respCls, version); route(env,meth,path,code.clone(facade_1_1_XML,false),application,"text/xml;version="+version); - + // Add other Supported APIs here as created } - + public void routeAll(HttpMethods meth, String path, API api, LocateCode code){ route(env,meth,path,code,""); // this will always match } @@ -210,7 +210,7 @@ public class AAF_Locate extends AbsService { public Filter[] _filters(Object ... additionalTafLurs) throws CadiException, LocatorException { try { return new Filter[] { - new AuthzTransFilter(env, aafCon(), + new AuthzTransFilter(env, aafCon(), new AAFTrustChecker((Env)env) ,additionalTafLurs )};