Mass removal of all Tabs (Style Warnings)
[aaf/authz.git] / auth / auth-service / src / main / java / org / onap / aaf / auth / service / api / API_User.java
index 26be2a0..0ce1dfe 100644 (file)
@@ -41,93 +41,93 @@ import org.onap.aaf.auth.service.mapper.Mapper.API;
  *
  */
 public class API_User {
-       /**
-        * Normal Init level APIs
-        
-        * @param authzAPI
-        * @param facade
-        * @throws Exception
-        */
-       public static void init(final AAF_Service authzAPI, AuthzFacade facade) throws Exception {
-               /**
-                * get all Users who have Permission X
-                */
-               authzAPI.route(GET,"/authz/users/perm/:type/:instance/:action",API.USERS,new Code(facade,"Get Users By Permission", true) {
-                       @Override
-                       public void handle(AuthzTrans trans, HttpServletRequest req, HttpServletResponse resp) throws Exception {
-//                             trans.checkpoint(pathParam(req,"type") + " " 
-//                                             + pathParam(req,"instance") + " " 
-//                                             + pathParam(req,"action"));
+    /**
+     * Normal Init level APIs
+     * 
+     * @param authzAPI
+     * @param facade
+     * @throws Exception
+     */
+    public static void init(final AAF_Service authzAPI, AuthzFacade facade) throws Exception {
+        /**
+         * get all Users who have Permission X
+         */
+        authzAPI.route(GET,"/authz/users/perm/:type/:instance/:action",API.USERS,new Code(facade,"Get Users By Permission", true) {
+            @Override
+            public void handle(AuthzTrans trans, HttpServletRequest req, HttpServletResponse resp) throws Exception {
+//                trans.checkpoint(pathParam(req,"type") + " " 
+//                        + pathParam(req,"instance") + " " 
+//                        + pathParam(req,"action"));
 //
-                               Result<Void> r = context.getUsersByPermission(trans, resp,
-                                               pathParam(req, ":type"),
-                                               pathParam(req, ":instance"),
-                                               pathParam(req, ":action"));
-                               switch(r.status) {
-                                       case OK:
-                                               resp.setStatus(HttpStatus.OK_200); 
-                                               break;
-                                       default:
-                                               context.error(trans,resp,r);
-                               }
-                       }
-               });
+                Result<Void> r = context.getUsersByPermission(trans, resp,
+                        pathParam(req, ":type"),
+                        pathParam(req, ":instance"),
+                        pathParam(req, ":action"));
+                switch(r.status) {
+                    case OK:
+                        resp.setStatus(HttpStatus.OK_200); 
+                        break;
+                    default:
+                        context.error(trans,resp,r);
+                }
+            }
+        });
 
 
-               /**
-                * get all Users who have Role X
-                */
-               authzAPI.route(GET,"/authz/users/role/:role",API.USERS,new Code(facade,"Get Users By Role", true) {
-                       @Override
-                       public void handle(AuthzTrans trans, HttpServletRequest req, HttpServletResponse resp) throws Exception {
-                               Result<Void> r = context.getUsersByRole(trans, resp, pathParam(req, ":role"));
-                               switch(r.status) {
-                                       case OK:
-                                               resp.setStatus(HttpStatus.OK_200); 
-                                               break;
-                                       default:
-                                               context.error(trans,resp,r);
-                               }
-                       }
-               });
-               
-               /**
-                * Get User Role if exists
-                * @deprecated
-                */
-               authzAPI.route(GET,"/authz/userRole/:user/:role",API.USERS,new Code(facade,"Get if User is In Role", true) {
-                       @Override
-                       public void handle(AuthzTrans trans, HttpServletRequest req, HttpServletResponse resp) throws Exception {
-                               Result<Void> r = context.getUserInRole(trans, resp, pathParam(req,":user"),pathParam(req,":role"));
-                               switch(r.status) {
-                                       case OK:
-                                               resp.setStatus(HttpStatus.OK_200); 
-                                               break;
-                                       default:
-                                               context.error(trans,resp,r);
-                               }
-                       }
-               });
+        /**
+         * get all Users who have Role X
+         */
+        authzAPI.route(GET,"/authz/users/role/:role",API.USERS,new Code(facade,"Get Users By Role", true) {
+            @Override
+            public void handle(AuthzTrans trans, HttpServletRequest req, HttpServletResponse resp) throws Exception {
+                Result<Void> r = context.getUsersByRole(trans, resp, pathParam(req, ":role"));
+                switch(r.status) {
+                    case OK:
+                        resp.setStatus(HttpStatus.OK_200); 
+                        break;
+                    default:
+                        context.error(trans,resp,r);
+                }
+            }
+        });
+        
+        /**
+         * Get User Role if exists
+         * @deprecated
+         */
+        authzAPI.route(GET,"/authz/userRole/:user/:role",API.USERS,new Code(facade,"Get if User is In Role", true) {
+            @Override
+            public void handle(AuthzTrans trans, HttpServletRequest req, HttpServletResponse resp) throws Exception {
+                Result<Void> r = context.getUserInRole(trans, resp, pathParam(req,":user"),pathParam(req,":role"));
+                switch(r.status) {
+                    case OK:
+                        resp.setStatus(HttpStatus.OK_200); 
+                        break;
+                    default:
+                        context.error(trans,resp,r);
+                }
+            }
+        });
 
-               /**
-                * Get User Role if exists
-                */
-               authzAPI.route(GET,"/authz/users/:user/:role",API.USERS,new Code(facade,"Get if User is In Role", true) {
-                       @Override
-                       public void handle(AuthzTrans trans, HttpServletRequest req, HttpServletResponse resp) throws Exception {
-                               Result<Void> r = context.getUserInRole(trans, resp, pathParam(req,":user"),pathParam(req,":role"));
-                               switch(r.status) {
-                                       case OK:
-                                               resp.setStatus(HttpStatus.OK_200); 
-                                               break;
-                                       default:
-                                               context.error(trans,resp,r);
-                               }
-                       }
-               });
-               
+        /**
+         * Get User Role if exists
+         */
+        authzAPI.route(GET,"/authz/users/:user/:role",API.USERS,new Code(facade,"Get if User is In Role", true) {
+            @Override
+            public void handle(AuthzTrans trans, HttpServletRequest req, HttpServletResponse resp) throws Exception {
+                Result<Void> r = context.getUserInRole(trans, resp, pathParam(req,":user"),pathParam(req,":role"));
+                switch(r.status) {
+                    case OK:
+                        resp.setStatus(HttpStatus.OK_200); 
+                        break;
+                    default:
+                        context.error(trans,resp,r);
+                }
+            }
+        });
+        
 
 
-       }
-               
+    }
+        
 }