X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=auth%2Fauth-locate%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Faaf%2Fauth%2Flocate%2Fapi%2FAPI_Find.java;h=08236aa3eeca927da0d7f5dafa6fc77743c59654;hb=a06268eb4fec6c245815f33335f807474e024ab7;hp=7ff1fceb719316f3546e2efdc91c7f494fec9992;hpb=4b5a7d721d994a49057e9bfb403c7bff1b376660;p=aaf%2Fauthz.git diff --git a/auth/auth-locate/src/main/java/org/onap/aaf/auth/locate/api/API_Find.java b/auth/auth-locate/src/main/java/org/onap/aaf/auth/locate/api/API_Find.java index 7ff1fceb..08236aa3 100644 --- a/auth/auth-locate/src/main/java/org/onap/aaf/auth/locate/api/API_Find.java +++ b/auth/auth-locate/src/main/java/org/onap/aaf/auth/locate/api/API_Find.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. @@ -39,14 +39,14 @@ import org.onap.aaf.misc.env.util.Split; /** * API Apis.. using Redirect for mechanism - * + * * @author Jonathan * */ public class API_Find { /** * Normal Init level APIs - * + * * @param gwAPI * @param facade * @throws Exception @@ -55,14 +55,14 @@ public class API_Find { //////// // Overall APIs /////// - + final LocateCode locationInfo = new LocateCode(facade,"Location Information", true) { @Override public void handle(AuthzTrans trans, HttpServletRequest req, HttpServletResponse resp) throws Exception { String service = pathParam(req, ":service"); String version = pathParam(req, ":version"); String other = pathParam(req, ":other"); - if(service.indexOf(':')>=0) { + if (service.indexOf(':')>=0) { String split[] = Split.split(':', service); switch(split.length) { case 3: @@ -75,7 +75,7 @@ public class API_Find { service=Define.varReplace(service); Result r = context.getEndpoints(trans,resp, req.getPathInfo(), // use as Key - service,version,other + service,version,other ); switch(r.status) { case OK: @@ -90,8 +90,8 @@ public class API_Find { gwAPI.route(HttpMethods.GET,"/locate/:service/:version",API.ENDPOINTS,locationInfo); gwAPI.route(HttpMethods.GET,"/locate/:service/:version/:other",API.ENDPOINTS,locationInfo); gwAPI.route(HttpMethods.GET,"/locate/:service",API.ENDPOINTS,locationInfo); - - + + gwAPI.route(HttpMethods.GET,"/download/agent", API.VOID, new LocateCode(facade,"Redirect to latest Agent",false) { @Override public void handle(AuthzTrans arg0, HttpServletRequest arg1, HttpServletResponse arg2) throws Exception {