2 * PermissionClient.java
4 * {Purpose of This Class}
6 * {Other Notes Relating to This Class (Optional)}
9 * $LastChangedRevision: $
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:
16 * http://www.collectionspace.org
17 * http://wiki.collectionspace.org
19 * Copyright (C) 2009 {Contributing Institution}
21 * Licensed under the Educational Community License (ECL), Version 2.0.
22 * You may not use this file except in compliance with this License.
24 * You may obtain a copy of the ECL 2.0 License at
25 * https://source.collectionspace.org/collection-space/LICENSE.txt
27 package org.collectionspace.services.client;
29 import javax.ws.rs.core.Response;
30 import org.jboss.resteasy.client.ClientResponse;
32 import org.collectionspace.services.authorization.perms.Permission;
33 import org.collectionspace.services.authorization.perms.PermissionsList;
38 * @version $Revision:$
40 public class PermissionClient extends AbstractServiceClientImpl<PermissionsList, Permission, Permission, PermissionProxy> {
41 public static final String SERVICE_NAME = "authorization/permissions";
42 public static final String SERVICE_PATH_COMPONENT = SERVICE_NAME;
43 public static final String SERVICE_PATH = "/" + SERVICE_PATH_COMPONENT;
44 public static final String SERVICE_PATH_PROXY = SERVICE_PATH + "/";
46 * @see org.collectionspace.services.client.AbstractServiceClientImpl#getServicePathComponent()
49 public String getServicePathComponent() {
50 return SERVICE_PATH_COMPONENT;
54 public String getServiceName() {
59 public Class<PermissionProxy> getProxyClass() {
60 return PermissionProxy.class;
69 * @see org.collectionspace.hello.client.PermissionProxy#readList()
71 public ClientResponse<PermissionsList> readList() {
72 return getProxy().readList();
76 public ClientResponse<PermissionsList> readSearchList(String resourceName) {
77 return getProxy().readSearchList(resourceName);
84 * @see org.collectionspace.hello.client.PermissionProxy#getAccount(java.lang.String)
86 public ClientResponse<Permission> read(String csid) {
87 return getProxy().read(csid);
93 * @see org.collectionspace.hello.client.PermissionProxy#create(org.collectionspace.services.permission.Permission)
95 public ClientResponse<Response> create(Permission permission) {
96 return getProxy().create(permission);
103 * @see org.collectionspace.hello.client.PermissionProxy#updateAccount(java.lang.Long, org.collectionspace.services.permission.Permission)
105 public ClientResponse<Permission> update(String csid, Permission permission) {
106 return getProxy().update(csid, permission);