@GET
 @Path("/groups/groupName/{groupName}")
 @Produces({"application/xml", "application/json"})
 @PreAuthorize(
     "@rangerPreAuthSecurityHandler.isAPIAccessible(\""
         + RangerAPIList.GET_X_GROUP_BY_GROUP_NAME
         + "\")")
 public VXGroup getXGroupByGroupName(
     @Context HttpServletRequest request, @PathParam("groupName") String groupName) {
   return xGroupService.getGroupByGroupName(groupName);
 }
 @DELETE
 @Path("/groups/groupName/{groupName}")
 @PreAuthorize("hasRole('ROLE_SYS_ADMIN')")
 public void deleteXGroupByGroupName(
     @PathParam("groupName") String groupName, @Context HttpServletRequest request) {
   String forceDeleteStr = request.getParameter("forceDelete");
   boolean forceDelete = false;
   if (!StringUtils.isEmpty(forceDeleteStr) && forceDeleteStr.equalsIgnoreCase("true")) {
     forceDelete = true;
   }
   VXGroup vxGroup = xGroupService.getGroupByGroupName(groupName);
   xUserMgr.deleteXGroup(vxGroup.getId(), forceDelete);
 }
 @DELETE
 @Path("/secure/groups/delete")
 @Produces({"application/xml", "application/json"})
 @PreAuthorize("hasRole('ROLE_SYS_ADMIN')")
 public void deleteGroupsByGroupName(@Context HttpServletRequest request, VXStringList groupList) {
   String forceDeleteStr = request.getParameter("forceDelete");
   boolean forceDelete = false;
   if (StringUtils.isNotEmpty(forceDeleteStr) && "true".equalsIgnoreCase(forceDeleteStr)) {
     forceDelete = true;
   }
   if (groupList != null && groupList.getList() != null) {
     for (VXString groupName : groupList.getList()) {
       if (StringUtils.isNotEmpty(groupName.getValue())) {
         VXGroup vxGroup = xGroupService.getGroupByGroupName(groupName.getValue());
         xUserMgr.deleteXGroup(vxGroup.getId(), forceDelete);
       }
     }
   }
 }