]> git.aero2k.de Git - tmp/jakarta-migration.git/blob
2633bca5c507321ffc173a85e0978cdb95b8d896
[tmp/jakarta-migration.git] /
1 /**     
2  * PermissionRoleClient.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.core.Response;
30 import org.jboss.resteasy.client.ClientResponse;
31 import org.collectionspace.services.authorization.PermissionRole;
32
33 // TODO: Auto-generated Javadoc
34 /**
35  * A RolePermissionClient.
36
37  * @version $Revision:$
38  */
39 public class RolePermissionClient extends AbstractServiceClientImpl<PermissionRole, PermissionRole, PermissionRole, RolePermissionProxy> {
40     @Override
41     public String getServiceName() { 
42         throw new UnsupportedOperationException(); //FIXME: REM - http://issues.collectionspace.org/browse/CSPACE-3498
43     }
44     
45     /* (non-Javadoc)
46      * @see 
47      */
48     @Override
49         public String getServicePathComponent() {
50         return "authorization/roles";
51     }
52     
53         @Override
54         public Class<RolePermissionProxy> getProxyClass() {
55                 return RolePermissionProxy.class;
56         }
57
58         /*
59          * CRUD+L Methods
60          */
61         
62     /**
63      * Read.
64      *
65      * @param csid the csid
66      * @return the client response
67      * @see
68      */
69     public ClientResponse<PermissionRole> read(String csid) {
70         return getProxy().read(csid);
71     }
72
73     /**
74      * Read.
75      *
76      * @param csid the csid
77      * @param prcsid the prcsid
78      * @return the client response
79      */
80     public ClientResponse<PermissionRole> read(String csid, String prcsid) {
81         return getProxy().read(csid, prcsid);
82     }
83
84     /**
85      * Creates the relationships.
86      *
87      * @param csid the csid
88      * @param permRole the perm role
89      * @return the client response
90      * @see
91      */
92     public ClientResponse<Response> create(String csid, PermissionRole permRole) {
93         return getProxy().create(csid, permRole);
94     }
95
96     /**
97      * delete given relationships between given role and permission(s).
98      *
99      * @param csid the csid
100      * @param permRole the perm role
101      * @return the client response
102      */
103     public ClientResponse<Response> delete(String csid, PermissionRole permRole) {
104         return getProxy().delete(csid, "delete", permRole);
105     }
106
107         @Override
108         public ClientResponse<Response> create(PermissionRole payload) {
109                 throw new UnsupportedOperationException(); //method not supported nor needed
110         }
111
112         @Override
113         public ClientResponse<PermissionRole> update(String csid,
114                         PermissionRole payload) {
115                 throw new UnsupportedOperationException(); //method not supported nor needed
116         }
117
118         @Override
119         public ClientResponse<PermissionRole> readList() {
120                 throw new UnsupportedOperationException(); //method not supported nor needed
121         }
122 }