]> git.aero2k.de Git - tmp/jakarta-migration.git/blob
958aa8e54a01826c2492d28000f4c8a15ef82f67
[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
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     
41         public RolePermissionClient() {
42                 super();
43         }
44
45     public RolePermissionClient(String clientPropertiesFilename) {
46                 super(clientPropertiesFilename);
47         }
48
49         @Override
50     public String getServiceName() { 
51         throw new UnsupportedOperationException(); //FIXME: REM - http://issues.collectionspace.org/browse/CSPACE-3498
52     }
53     
54     /* (non-Javadoc)
55      * @see 
56      */
57     @Override
58         public String getServicePathComponent() {
59         return "authorization/roles";
60     }
61     
62         @Override
63         public Class<RolePermissionProxy> getProxyClass() {
64                 return RolePermissionProxy.class;
65         }
66
67         /*
68          * CRUD+L Methods
69          */
70         
71     /**
72      * Read.
73      *
74      * @param csid the csid
75      * @return the client response
76      * @see
77      */
78     public Response read(String csid) {
79         return getProxy().read(csid);
80     }
81
82     /**
83      * Read.
84      *
85      * @param csid the csid
86      * @param prcsid the prcsid
87      * @return the client response
88      */
89     public Response read(String csid, String prcsid) {
90         return getProxy().read(csid, prcsid);
91     }
92
93     /**
94      * Creates the relationships.
95      *
96      * @param csid the csid
97      * @param permRole the perm role
98      * @return the client response
99      * @see
100      */
101     public Response create(String csid, PermissionRole permRole) {
102         return getProxy().create(csid, permRole);
103     }
104
105     /**
106      * delete given relationships between given role and permission(s).
107      *
108      * @param csid the csid
109      * @param permRole the perm role
110      * @return the client response
111      */
112     public Response delete(String csid, PermissionRole permRole) {
113         return getProxy().delete(csid, "delete", permRole);
114     }
115
116         @Override
117         public Response create(PermissionRole payload) {
118                 throw new UnsupportedOperationException(); //method not supported nor needed
119         }
120
121         @Override
122         public Response update(String csid,
123                         PermissionRole payload) {
124                 throw new UnsupportedOperationException(); //method not supported nor needed
125         }
126
127         @Override
128         public Response readList() {
129                 throw new UnsupportedOperationException(); //method not supported nor needed
130         }
131 }