]> git.aero2k.de Git - tmp/jakarta-migration.git/blob
68655d3190ab6c4b321c57bcf7d566537a37b03f
[tmp/jakarta-migration.git] /
1 /**
2  * PermissionProxy.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.PUT;
34 import javax.ws.rs.Path;
35 import javax.ws.rs.PathParam;
36 import javax.ws.rs.Produces;
37 import javax.ws.rs.QueryParam;
38 import javax.ws.rs.core.Response;
39
40
41 import org.collectionspace.services.authorization.Permission;
42 import org.collectionspace.services.authorization.PermissionsList;
43 import org.jboss.resteasy.client.ClientResponse;
44
45 /**
46  * @version $Revision:$
47  */
48 @Path("/authorization/permissions")
49 @Produces({"application/xml"})
50 @Consumes({"application/xml"})
51 public interface PermissionProxy extends CollectionSpaceProxy {
52
53     @GET
54     @Produces({"application/xml"})
55     ClientResponse<PermissionsList> readList();
56
57     @GET
58
59     ClientResponse<PermissionsList> readSearchList(@QueryParam("res") String resourceName);
60
61     //(C)reate
62     @POST
63     ClientResponse<Response> create(Permission permission);
64
65     //(R)ead
66     @GET
67     @Path("/{csid}")
68     ClientResponse<Permission> read(@PathParam("csid") String csid);
69
70     //(U)pdate
71     @PUT
72     @Path("/{csid}")
73     ClientResponse<Permission> update(@PathParam("csid") String csid, Permission permission);
74
75     //(D)elete
76     @DELETE
77     @Path("/{csid}")
78     ClientResponse<Response> delete(@PathParam("csid") String csid);
79 }