]> git.aero2k.de Git - tmp/jakarta-migration.git/blob
bfaa5a316f48d88e0ab37718b66d490f1b81b6f2
[tmp/jakarta-migration.git] /
1 /**
2  * PermissionRoleProxy.java
3  *
4  * {Purpose of This Class}
5  *
6  * {Other Notes Relating to This Class (Optional)}
7  *
8  * $LastChangedBy: $
9  * $LastChangedRevision: $
10  * $LastChangedDate: $
11  *
12  * This document is a part of the source code and related artifacts
13  * for CollectionSpace, an open source collections management system
14  * for museums and related institutions:
15  *
16  * http://www.collectionspace.org
17  * http://wiki.collectionspace.org
18  *
19  * Copyright (C) 2009 {Contributing Institution}
20  *
21  * Licensed under the Educational Community License (ECL), Version 2.0.
22  * You may not use this file except in compliance with this License.
23  *
24  * You may obtain a copy of the ECL 2.0 License at
25  * https://source.collectionspace.org/collection-space/LICENSE.txt
26  */
27 package org.collectionspace.services.client;
28
29 import javax.ws.rs.Consumes;
30 import javax.ws.rs.DELETE;
31 import javax.ws.rs.GET;
32 import javax.ws.rs.POST;
33 import javax.ws.rs.Path;
34 import javax.ws.rs.PathParam;
35 import javax.ws.rs.Produces;
36 import javax.ws.rs.QueryParam;
37 import javax.ws.rs.core.Response;
38
39
40 import org.collectionspace.services.authorization.PermissionRole;
41 import org.jboss.resteasy.client.ClientResponse;
42
43 /**
44  * @version $Revision:$
45  */
46 @Path("/authorization/permissions")
47 @Produces({"application/xml"})
48 @Consumes({"application/xml"})
49 public interface PermissionRoleProxy extends CollectionSpaceProxy<PermissionRole> {
50     //(C)reate
51     @POST
52     @Path("/{csid}/permroles")
53     ClientResponse<Response> create(@PathParam("csid") String csid, PermissionRole permRole);
54
55     //(R)ead
56     @GET
57     @Path("/{csid}/permroles")
58     ClientResponse<PermissionRole> read(@PathParam("csid") String csid);
59
60     //(R)ead
61     @GET
62     @Path("/{csid}/permroles/{prcsid}")
63     ClientResponse<PermissionRole> read(@PathParam("csid") String csid,
64             @PathParam("prcsid") String prcsid);
65
66     //(D)elete
67     @DELETE
68     @Path("/{csid}/permroles")
69     ClientResponse<Response> delete(@PathParam("csid") String csid);
70     
71     //(D)elete - with a payload
72     @POST
73     @Path("/{csid}/permroles")
74     ClientResponse<Response> delete(@PathParam("csid") String csid,
75             @QueryParam("_method") String method,
76             PermissionRole permRole);    
77 }