Changeset 5606


Ignore:
Timestamp:
08/25/14 09:20:11 (10 years ago)
Author:
olhsha@mpi.nl
Message:

group identifier is made "groupId" everywhere, referred as a constant PARAM_GROUP

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  
    17661766        MediaType.APPLICATION_JSON})
    17671767    public Response transferItemOwnershipToGroup(@PathParam("itemId") String itemId,
    1768             @QueryParam("groupId") long groupId) throws IOException {
     1768            @QueryParam(GROUPID_PARAM) long groupId) throws IOException {
    17691769        Principal principal = security.getUserPrincipal();
    17701770        try {
     
    19181918    @GET
    19191919    @Path("/groups/profiles")
    1920     public Response listProfiles(@QueryParam("groupId") String groupId) throws IOException {
     1920    public Response listProfiles(@QueryParam(GROUPID_PARAM) String groupId) throws IOException {
    19211921
    19221922        try {
     
    19341934    @GET
    19351935    @Path("/groups/components")
    1936     public Response listComponents(@QueryParam("groupId") String groupId) throws IOException {
     1936    public Response listComponents(@QueryParam(GROUPID_PARAM) String groupId) throws IOException {
    19371937
    19381938        try {
     
    19511951    @GET
    19521952    @Path("/groups/nameById")
    1953     public Response getGroupNameById(@QueryParam("groupId") String groupId) throws IOException {
     1953    public Response getGroupNameById(@QueryParam(GROUPID_PARAM) String groupId) throws IOException {
    19541954
    19551955        try {
  • ComponentRegistry/trunk/ComponentRegistry/src/main/java/clarin/cmdi/componentregistry/rest/IComponentRegistryRestService.java

    r5553 r5606  
    4545    public static final String DOMAIN_FORM_FIELD = "domainName";
    4646    public static final String REGISTRY_SPACE_PARAM = "registrySpace";
    47     public static final String GROUPID_PARAM = "groupid";
     47    public static final String GROUPID_PARAM = "groupId";
    4848    public static final String METADATA_EDITOR_PARAM = "mdEditor";
    4949    public static final String NUMBER_OF_RSSITEMS = "limit";
  • ComponentRegistry/trunk/ComponentRegistry/src/test/java/clarin/cmdi/componentregistry/rest/RestGroupServiceTest.java

    r5603 r5606  
    519519       
    520520        List<ProfileDescription> response = this.getAuthenticatedResource(getResource()
    521                 .path("/registry/profiles").queryParam("registrySpace", "group").queryParam("groupid", "1")).accept(MediaType.APPLICATION_XML)
     521                .path("/registry/profiles").queryParam("registrySpace", "group").queryParam("groupId", "1")).accept(MediaType.APPLICATION_XML)
    522522                .get(PROFILE_LIST_GENERICTYPE);
    523523        assertEquals(1, response.size());
    524524       
    525525        List<ComponentDescription> responseC = this.getAuthenticatedResource(getResource()
    526                 .path("/registry/components").queryParam("registrySpace", "group").queryParam("groupid", "1")).accept(MediaType.APPLICATION_XML)
     526                .path("/registry/components").queryParam("registrySpace", "group").queryParam("groupId", "1")).accept(MediaType.APPLICATION_XML)
    527527                .get(COMPONENT_LIST_GENERICTYPE);
    528528        assertEquals(2, responseC.size());
    529529       
    530530        response = this.getAuthenticatedResource(getResource()
    531                 .path("/registry/profiles").queryParam("registrySpace", "group").queryParam("groupid", "2")).accept(MediaType.APPLICATION_XML)
     531                .path("/registry/profiles").queryParam("registrySpace", "group").queryParam("groupId", "2")).accept(MediaType.APPLICATION_XML)
    532532                .get(PROFILE_LIST_GENERICTYPE);
    533533        assertEquals(1, response.size());
    534534       
    535535        responseC = this.getAuthenticatedResource(getResource()
    536                 .path("/registry/components").queryParam("registrySpace", "group").queryParam("groupid", "2")).accept(MediaType.APPLICATION_XML)
     536                .path("/registry/components").queryParam("registrySpace", "group").queryParam("groupId", "2")).accept(MediaType.APPLICATION_XML)
    537537                .get(COMPONENT_LIST_GENERICTYPE);
    538538        assertEquals(2, responseC.size());
    539539       
    540540        ClientResponse clientResponse = this.getAuthenticatedResource(getResource()
    541                 .path("/registry/components").queryParam("registrySpace", "group").queryParam("groupid", "3")).accept(MediaType.APPLICATION_XML)
     541                .path("/registry/components").queryParam("registrySpace", "group").queryParam("groupId", "3")).accept(MediaType.APPLICATION_XML)
    542542                .get(ClientResponse.class);
    543543       
     
    700700       
    701701        Rss response = this.getAuthenticatedResource(getResource()
    702                 .path("/registry/profiles/rss").queryParam("registrySpace", "group").queryParam("groupid", "1")).accept(MediaType.APPLICATION_XML)
     702                .path("/registry/profiles/rss").queryParam("registrySpace", "group").queryParam("groupId", "1")).accept(MediaType.APPLICATION_XML)
    703703                .get(Rss.class);
    704704        assertEquals(1, response.getChannel().getItem().size());
    705705       
    706706         response = this.getAuthenticatedResource(getResource()
    707                 .path("/registry/components/rss").queryParam("registrySpace", "group").queryParam("groupid", "1")).accept(MediaType.APPLICATION_XML)
     707                .path("/registry/components/rss").queryParam("registrySpace", "group").queryParam("groupId", "1")).accept(MediaType.APPLICATION_XML)
    708708                .get(Rss.class);
    709709        assertEquals(2, response.getChannel().getItem().size());
    710710       
    711711        response = this.getAuthenticatedResource(getResource()
    712                 .path("/registry/profiles/rss").queryParam("registrySpace", "group").queryParam("groupid", "2")).accept(MediaType.APPLICATION_XML)
     712                .path("/registry/profiles/rss").queryParam("registrySpace", "group").queryParam("groupId", "2")).accept(MediaType.APPLICATION_XML)
    713713                .get(Rss.class);
    714714        assertEquals(1, response.getChannel().getItem().size());
    715715       
    716716        response = this.getAuthenticatedResource(getResource()
    717                 .path("/registry/components/rss").queryParam("registrySpace", "group").queryParam("groupid", "2")).accept(MediaType.APPLICATION_XML)
     717                .path("/registry/components/rss").queryParam("registrySpace", "group").queryParam("groupId", "2")).accept(MediaType.APPLICATION_XML)
    718718                .get(Rss.class);
    719719        assertEquals(2, response.getChannel().getItem().size());
    720720       
    721721        ClientResponse clientResponse = this.getAuthenticatedResource(getResource()
    722                 .path("/registry/components").queryParam("registrySpace", "group").queryParam("groupid", "3")).accept(MediaType.APPLICATION_XML)
     722                .path("/registry/components").queryParam("registrySpace", "group").queryParam("groupId", "3")).accept(MediaType.APPLICATION_XML)
    723723                .get(ClientResponse.class);
    724724       
Note: See TracChangeset for help on using the changeset viewer.