@Test public void clientDetailForGroup() throws Exception { create(CreateGroupRequestV2.builder().name("groupWithClients").description("desc").build()); createClient("test-client", "groupWithClients"); Set<Client> clients = clientsInfo("groupWithClients"); assertThat(clients).hasSize(1); assertThat(clients.iterator().next().getName()).isEqualTo("test-client"); }
@Timed @ExceptionMetered @GET @Path("{name}/clients") @Produces(APPLICATION_JSON) public Set<Client> clientDetailForGroup(@Auth AutomationClient automationClient, @PathParam("name") String name) { Group group = groupDAOReadOnly.getGroup(name) .orElseThrow(NotFoundException::new); return aclDAOReadOnly.getClientsFor(group); }
GroupResource { @Timed @ExceptionMetered @GET @Path("{name}/clients") @Produces(APPLICATION_JSON) public Set<Client> clientDetailForGroup(@Auth AutomationClient automationClient, @PathParam("name") String name) { Group group = groupDAOReadOnly.getGroup(name) .orElseThrow(NotFoundException::new); return aclDAOReadOnly.getClientsFor(group); } }
GroupResource { @Timed @ExceptionMetered @GET @Path("{name}/clients") @Produces(APPLICATION_JSON) public Set<Client> clientDetailForGroup(@Auth AutomationClient automationClient, @PathParam("name") String name) { Group group = groupDAOReadOnly.getGroup(name) .orElseThrow(NotFoundException::new); return aclDAOReadOnly.getClientsFor(group); } @Inject  GroupResource(AclDAOFactory aclDAOFactory, GroupDAOFactory groupDAOFactory, AuditLog auditLog); }
GroupResource { @Timed @ExceptionMetered @GET @Path("{name}/clients") @Produces(APPLICATION_JSON) public Set<Client> clientDetailForGroup(@Auth AutomationClient automationClient, @PathParam("name") String name) { Group group = groupDAOReadOnly.getGroup(name) .orElseThrow(NotFoundException::new); return aclDAOReadOnly.getClientsFor(group); } @Inject  GroupResource(AclDAOFactory aclDAOFactory, GroupDAOFactory groupDAOFactory, AuditLog auditLog); @Timed @ExceptionMetered @POST @Consumes(APPLICATION_JSON) Response createGroup(@Auth AutomationClient automationClient,
      @Valid CreateGroupRequestV2 request); @Timed @ExceptionMetered @GET @Produces(APPLICATION_JSON) Iterable<String> groupListing(@Auth AutomationClient automationClient); @Timed @ExceptionMetered @GET @Path("{name}") @Produces(APPLICATION_JSON) GroupDetailResponseV2 groupInfo(@Auth AutomationClient automationClient,
      @PathParam("name") String name); @Timed @ExceptionMetered @GET @Path("{name}/secrets") @Produces(APPLICATION_JSON) Set<SanitizedSecret> secretDetailForGroup(@Auth AutomationClient automationClient,
      @PathParam("name") String name); @Timed @ExceptionMetered @GET @Path("{name}/clients") @Produces(APPLICATION_JSON) Set<Client> clientDetailForGroup(@Auth AutomationClient automationClient,
      @PathParam("name") String name); @Timed @ExceptionMetered @DELETE @Path("{name}") Response deleteGroup(@Auth AutomationClient automationClient,
      @PathParam("name") String name); }
GroupResource { @Timed @ExceptionMetered @GET @Path("{name}/clients") @Produces(APPLICATION_JSON) public Set<Client> clientDetailForGroup(@Auth AutomationClient automationClient, @PathParam("name") String name) { Group group = groupDAOReadOnly.getGroup(name) .orElseThrow(NotFoundException::new); return aclDAOReadOnly.getClientsFor(group); } @Inject  GroupResource(AclDAOFactory aclDAOFactory, GroupDAOFactory groupDAOFactory, AuditLog auditLog); @Timed @ExceptionMetered @POST @Consumes(APPLICATION_JSON) Response createGroup(@Auth AutomationClient automationClient,
      @Valid CreateGroupRequestV2 request); @Timed @ExceptionMetered @GET @Produces(APPLICATION_JSON) Iterable<String> groupListing(@Auth AutomationClient automationClient); @Timed @ExceptionMetered @GET @Path("{name}") @Produces(APPLICATION_JSON) GroupDetailResponseV2 groupInfo(@Auth AutomationClient automationClient,
      @PathParam("name") String name); @Timed @ExceptionMetered @GET @Path("{name}/secrets") @Produces(APPLICATION_JSON) Set<SanitizedSecret> secretDetailForGroup(@Auth AutomationClient automationClient,
      @PathParam("name") String name); @Timed @ExceptionMetered @GET @Path("{name}/clients") @Produces(APPLICATION_JSON) Set<Client> clientDetailForGroup(@Auth AutomationClient automationClient,
      @PathParam("name") String name); @Timed @ExceptionMetered @DELETE @Path("{name}") Response deleteGroup(@Auth AutomationClient automationClient,
      @PathParam("name") String name);  }