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