Changeset 5606
- Timestamp:
- 08/25/14 09:20:11 (10 years ago)
- Location:
- ComponentRegistry/trunk/ComponentRegistry/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
ComponentRegistry/trunk/ComponentRegistry/src/main/java/clarin/cmdi/componentregistry/rest/ComponentRegistryRestService.java
r5603 r5606 1766 1766 MediaType.APPLICATION_JSON}) 1767 1767 public Response transferItemOwnershipToGroup(@PathParam("itemId") String itemId, 1768 @QueryParam( "groupId") long groupId) throws IOException {1768 @QueryParam(GROUPID_PARAM) long groupId) throws IOException { 1769 1769 Principal principal = security.getUserPrincipal(); 1770 1770 try { … … 1918 1918 @GET 1919 1919 @Path("/groups/profiles") 1920 public Response listProfiles(@QueryParam( "groupId") String groupId) throws IOException {1920 public Response listProfiles(@QueryParam(GROUPID_PARAM) String groupId) throws IOException { 1921 1921 1922 1922 try { … … 1934 1934 @GET 1935 1935 @Path("/groups/components") 1936 public Response listComponents(@QueryParam( "groupId") String groupId) throws IOException {1936 public Response listComponents(@QueryParam(GROUPID_PARAM) String groupId) throws IOException { 1937 1937 1938 1938 try { … … 1951 1951 @GET 1952 1952 @Path("/groups/nameById") 1953 public Response getGroupNameById(@QueryParam( "groupId") String groupId) throws IOException {1953 public Response getGroupNameById(@QueryParam(GROUPID_PARAM) String groupId) throws IOException { 1954 1954 1955 1955 try { -
ComponentRegistry/trunk/ComponentRegistry/src/main/java/clarin/cmdi/componentregistry/rest/IComponentRegistryRestService.java
r5553 r5606 45 45 public static final String DOMAIN_FORM_FIELD = "domainName"; 46 46 public static final String REGISTRY_SPACE_PARAM = "registrySpace"; 47 public static final String GROUPID_PARAM = "group id";47 public static final String GROUPID_PARAM = "groupId"; 48 48 public static final String METADATA_EDITOR_PARAM = "mdEditor"; 49 49 public static final String NUMBER_OF_RSSITEMS = "limit"; -
ComponentRegistry/trunk/ComponentRegistry/src/test/java/clarin/cmdi/componentregistry/rest/RestGroupServiceTest.java
r5603 r5606 519 519 520 520 List<ProfileDescription> response = this.getAuthenticatedResource(getResource() 521 .path("/registry/profiles").queryParam("registrySpace", "group").queryParam("group id", "1")).accept(MediaType.APPLICATION_XML)521 .path("/registry/profiles").queryParam("registrySpace", "group").queryParam("groupId", "1")).accept(MediaType.APPLICATION_XML) 522 522 .get(PROFILE_LIST_GENERICTYPE); 523 523 assertEquals(1, response.size()); 524 524 525 525 List<ComponentDescription> responseC = this.getAuthenticatedResource(getResource() 526 .path("/registry/components").queryParam("registrySpace", "group").queryParam("group id", "1")).accept(MediaType.APPLICATION_XML)526 .path("/registry/components").queryParam("registrySpace", "group").queryParam("groupId", "1")).accept(MediaType.APPLICATION_XML) 527 527 .get(COMPONENT_LIST_GENERICTYPE); 528 528 assertEquals(2, responseC.size()); 529 529 530 530 response = this.getAuthenticatedResource(getResource() 531 .path("/registry/profiles").queryParam("registrySpace", "group").queryParam("group id", "2")).accept(MediaType.APPLICATION_XML)531 .path("/registry/profiles").queryParam("registrySpace", "group").queryParam("groupId", "2")).accept(MediaType.APPLICATION_XML) 532 532 .get(PROFILE_LIST_GENERICTYPE); 533 533 assertEquals(1, response.size()); 534 534 535 535 responseC = this.getAuthenticatedResource(getResource() 536 .path("/registry/components").queryParam("registrySpace", "group").queryParam("group id", "2")).accept(MediaType.APPLICATION_XML)536 .path("/registry/components").queryParam("registrySpace", "group").queryParam("groupId", "2")).accept(MediaType.APPLICATION_XML) 537 537 .get(COMPONENT_LIST_GENERICTYPE); 538 538 assertEquals(2, responseC.size()); 539 539 540 540 ClientResponse clientResponse = this.getAuthenticatedResource(getResource() 541 .path("/registry/components").queryParam("registrySpace", "group").queryParam("group id", "3")).accept(MediaType.APPLICATION_XML)541 .path("/registry/components").queryParam("registrySpace", "group").queryParam("groupId", "3")).accept(MediaType.APPLICATION_XML) 542 542 .get(ClientResponse.class); 543 543 … … 700 700 701 701 Rss response = this.getAuthenticatedResource(getResource() 702 .path("/registry/profiles/rss").queryParam("registrySpace", "group").queryParam("group id", "1")).accept(MediaType.APPLICATION_XML)702 .path("/registry/profiles/rss").queryParam("registrySpace", "group").queryParam("groupId", "1")).accept(MediaType.APPLICATION_XML) 703 703 .get(Rss.class); 704 704 assertEquals(1, response.getChannel().getItem().size()); 705 705 706 706 response = this.getAuthenticatedResource(getResource() 707 .path("/registry/components/rss").queryParam("registrySpace", "group").queryParam("group id", "1")).accept(MediaType.APPLICATION_XML)707 .path("/registry/components/rss").queryParam("registrySpace", "group").queryParam("groupId", "1")).accept(MediaType.APPLICATION_XML) 708 708 .get(Rss.class); 709 709 assertEquals(2, response.getChannel().getItem().size()); 710 710 711 711 response = this.getAuthenticatedResource(getResource() 712 .path("/registry/profiles/rss").queryParam("registrySpace", "group").queryParam("group id", "2")).accept(MediaType.APPLICATION_XML)712 .path("/registry/profiles/rss").queryParam("registrySpace", "group").queryParam("groupId", "2")).accept(MediaType.APPLICATION_XML) 713 713 .get(Rss.class); 714 714 assertEquals(1, response.getChannel().getItem().size()); 715 715 716 716 response = this.getAuthenticatedResource(getResource() 717 .path("/registry/components/rss").queryParam("registrySpace", "group").queryParam("group id", "2")).accept(MediaType.APPLICATION_XML)717 .path("/registry/components/rss").queryParam("registrySpace", "group").queryParam("groupId", "2")).accept(MediaType.APPLICATION_XML) 718 718 .get(Rss.class); 719 719 assertEquals(2, response.getChannel().getItem().size()); 720 720 721 721 ClientResponse clientResponse = this.getAuthenticatedResource(getResource() 722 .path("/registry/components").queryParam("registrySpace", "group").queryParam("group id", "3")).accept(MediaType.APPLICATION_XML)722 .path("/registry/components").queryParam("registrySpace", "group").queryParam("groupId", "3")).accept(MediaType.APPLICATION_XML) 723 723 .get(ClientResponse.class); 724 724
Note: See TracChangeset
for help on using the changeset viewer.