@Test public void groupListing() throws Exception { Set<String> groupsBefore = listing(); Set<String> expected = ImmutableSet.<String>builder() .addAll(groupsBefore) .add("group5") .build(); create(CreateGroupRequestV2.builder().name("group5").build()); assertThat(listing()).containsAll(expected); }
@Timed @ExceptionMetered @GET @Produces(APPLICATION_JSON) public Iterable<String> groupListing(@Auth AutomationClient automationClient) { return groupDAOReadOnly.getGroups().stream() .map(Group::getName) .collect(toSet()); }
GroupResource { @Timed @ExceptionMetered @GET @Produces(APPLICATION_JSON) public Iterable<String> groupListing(@Auth AutomationClient automationClient) { return groupDAOReadOnly.getGroups().stream() .map(Group::getName) .collect(toSet()); } }
GroupResource { @Timed @ExceptionMetered @GET @Produces(APPLICATION_JSON) public Iterable<String> groupListing(@Auth AutomationClient automationClient) { return groupDAOReadOnly.getGroups().stream() .map(Group::getName) .collect(toSet()); } @Inject  GroupResource(AclDAOFactory aclDAOFactory, GroupDAOFactory groupDAOFactory, AuditLog auditLog); }
GroupResource { @Timed @ExceptionMetered @GET @Produces(APPLICATION_JSON) public Iterable<String> groupListing(@Auth AutomationClient automationClient) { return groupDAOReadOnly.getGroups().stream() .map(Group::getName) .collect(toSet()); } @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 @Produces(APPLICATION_JSON) public Iterable<String> groupListing(@Auth AutomationClient automationClient) { return groupDAOReadOnly.getGroups().stream() .map(Group::getName) .collect(toSet()); } @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);  }