1 package org.collectionspace.services.client;
3 import javax.ws.rs.core.Response;
5 import org.collectionspace.services.organization.OrgauthoritiesCommonList;
6 import org.collectionspace.services.organization.OrganizationsCommonList;
7 import org.collectionspace.services.client.OrgAuthorityProxy;
9 import org.jboss.resteasy.client.ClientResponse;
10 import org.jboss.resteasy.client.ProxyFactory;
11 import org.jboss.resteasy.plugins.providers.RegisterBuiltin;
12 import org.jboss.resteasy.plugins.providers.multipart.MultipartInput;
13 import org.jboss.resteasy.plugins.providers.multipart.MultipartOutput;
14 import org.jboss.resteasy.spi.ResteasyProviderFactory;
17 * A OrgAuthorityClient.
19 * @version $Revision:$
21 public class OrgAuthorityClient extends BaseServiceClient {
24 * @see org.collectionspace.services.client.BaseServiceClient#getServicePathComponent()
27 public String getServicePathComponent() {
28 return "orgauthorities";
31 public String getItemCommonPartName() {
32 return getCommonPartName("organizations");
38 private static final OrgAuthorityClient instance = new OrgAuthorityClient();
42 private OrgAuthorityProxy orgAuthorityProxy;
46 * Default constructor for OrgAuthorityClient class.
49 public OrgAuthorityClient() {
50 ResteasyProviderFactory factory = ResteasyProviderFactory.getInstance();
51 RegisterBuiltin.register(factory);
52 orgAuthorityProxy = ProxyFactory.create(OrgAuthorityProxy.class, getBaseURL());
60 public static OrgAuthorityClient getInstance() {
66 * @see org.collectionspace.services.client.OrgAuthorityProxy#readList()
68 public ClientResponse<OrgauthoritiesCommonList> readList() {
69 return orgAuthorityProxy.readList();
75 * @see org.collectionspace.services.client.OrgAuthorityProxy#read(java.lang.String)
78 public ClientResponse<MultipartInput> read(String csid) {
79 return orgAuthorityProxy.read(csid);
85 * @see org.collectionspace.services.client.OrgAuthorityProxy#createOrgAuthority(org.collectionspace.hello.OrgAuthority)
87 public ClientResponse<Response> create(MultipartOutput multipart) {
88 return orgAuthorityProxy.create(multipart);
95 * @see org.collectionspace.services.client.OrgAuthorityProxy#updateOrgAuthority(java.lang.Long, org.collectionspace.hello.OrgAuthority)
97 public ClientResponse<MultipartInput> update(String csid, MultipartOutput multipart) {
98 return orgAuthorityProxy.update(csid, multipart);
105 * @see org.collectionspace.services.client.OrgAuthorityProxy#deleteOrgAuthority(java.lang.Long)
107 public ClientResponse<Response> delete(String csid) {
108 return orgAuthorityProxy.delete(csid);
113 * @see org.collectionspace.services.client.OrgAuthorityProxy#readItemList()
115 public ClientResponse<OrganizationsCommonList> readItemList(String vcsid) {
116 return orgAuthorityProxy.readItemList(vcsid);
122 * @see org.collectionspace.services.client.OrgAuthorityProxy#read(java.lang.String)
125 public ClientResponse<MultipartInput> readItem(String vcsid, String csid) {
126 return orgAuthorityProxy.readItem(vcsid, csid);
130 * @param orgAuthority
132 * @see org.collectionspace.services.client.OrgAuthorityProxy#createOrgAuthority(org.collectionspace.hello.OrgAuthority)
134 public ClientResponse<Response> createItem(String vcsid, MultipartOutput multipart) {
135 return orgAuthorityProxy.createItem(vcsid, multipart);
140 * @param orgAuthority
142 * @see org.collectionspace.services.client.OrgAuthorityProxy#updateOrgAuthority(java.lang.Long, org.collectionspace.hello.OrgAuthority)
144 public ClientResponse<MultipartInput> updateItem(String vcsid, String csid, MultipartOutput multipart) {
145 return orgAuthorityProxy.updateItem(vcsid, csid, multipart);
152 * @see org.collectionspace.services.client.OrgAuthorityProxy#deleteOrgAuthority(java.lang.Long)
154 public ClientResponse<Response> deleteItem(String vcsid, String csid) {
155 return orgAuthorityProxy.deleteItem(vcsid, csid);