AT&T 2.0.19 Code drop, stage 5
[aaf/authz.git] / authz-gw / src / main / java / org / onap / aaf / authz / gw / api / API_TGuard.java
diff --git a/authz-gw/src/main/java/org/onap/aaf/authz/gw/api/API_TGuard.java b/authz-gw/src/main/java/org/onap/aaf/authz/gw/api/API_TGuard.java
deleted file mode 100644 (file)
index 876782f..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************\r
- * ============LICENSE_START====================================================\r
- * * org.onap.aaf\r
- * * ===========================================================================\r
- * * Copyright © 2017 AT&T Intellectual Property. All rights reserved.\r
- * * ===========================================================================\r
- * * Licensed under the Apache License, Version 2.0 (the "License");\r
- * * you may not use this file except in compliance with the License.\r
- * * You may obtain a copy of the License at\r
- * * \r
- *  *      http://www.apache.org/licenses/LICENSE-2.0\r
- * * \r
- *  * Unless required by applicable law or agreed to in writing, software\r
- * * distributed under the License is distributed on an "AS IS" BASIS,\r
- * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * * See the License for the specific language governing permissions and\r
- * * limitations under the License.\r
- * * ============LICENSE_END====================================================\r
- * *\r
- * * ECOMP is a trademark and service mark of AT&T Intellectual Property.\r
- * *\r
- ******************************************************************************/\r
-package org.onap.aaf.authz.gw.api;\r
-\r
-import static org.onap.aaf.authz.layer.Result.OK;\r
-\r
-import javax.servlet.http.HttpServletRequest;\r
-import javax.servlet.http.HttpServletResponse;\r
-\r
-import org.onap.aaf.authz.env.AuthzTrans;\r
-import org.onap.aaf.authz.gw.GwAPI;\r
-import org.onap.aaf.authz.gw.GwCode;\r
-import org.onap.aaf.authz.gw.facade.GwFacade;\r
-import org.onap.aaf.authz.gw.mapper.Mapper.API;\r
-import org.onap.aaf.authz.layer.Result;\r
-import org.onap.aaf.cssa.rserv.HttpMethods;\r
-\r
-import com.att.aft.dme2.internal.jetty.http.HttpStatus;\r
-\r
-/**\r
- * API Apis\r
- *\r
- */\r
-public class API_TGuard {\r
-       /**\r
-        * Normal Init level APIs\r
-        * \r
-        * @param gwAPI\r
-        * @param facade\r
-        * @throws Exception\r
-        */\r
-       public static void init(final GwAPI gwAPI, GwFacade facade) throws Exception {\r
-               String aftenv = gwAPI.env.getProperty(API_AAFAccess.AFT_ENVIRONMENT);\r
-               if(aftenv==null) throw new Exception(API_AAFAccess.AFT_ENVIRONMENT + " must be set");\r
-\r
-               ////////\r
-               // Do not deploy these to PROD\r
-               ///////\r
-               if(API_AAFAccess.AFTUAT.equals(aftenv)) {\r
-                       gwAPI.route(HttpMethods.GET,"/tguard/:path*",API.VOID,new GwCode(facade,"TGuard Test", true) {\r
-                               @Override\r
-                               public void handle(AuthzTrans trans, HttpServletRequest req, HttpServletResponse resp) throws Exception {\r
-                                       Result<Void> r = context.getAPI(trans,resp,gwAPI);\r
-                                       switch(r.status) {\r
-                                               case OK:\r
-                                                       resp.setStatus(HttpStatus.OK_200);\r
-                                                       break;\r
-                                               default:\r
-                                                       context.error(trans,resp,r);\r
-                                       }\r
-                               }\r
-                       });\r
-               }\r
-       }\r
-}\r