]> git.aero2k.de Git - tmp/jakarta-migration.git/blob
669fd16228725cf6eb6e2e0b7b496c16d61a9090
[tmp/jakarta-migration.git] /
1 package org.collectionspace.services.client;
2
3 import javax.ws.rs.core.Response;
4
5 import org.collectionspace.services.organization.OrgauthoritiesCommonList;
6 import org.collectionspace.services.organization.OrganizationsCommonList;
7 import org.collectionspace.services.client.OrgAuthorityProxy;
8
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;
15
16 /**
17  * A OrgAuthorityClient.
18
19  * @version $Revision:$
20  */
21 public class OrgAuthorityClient extends BaseServiceClient {
22
23         /* (non-Javadoc)
24          * @see org.collectionspace.services.client.BaseServiceClient#getServicePathComponent()
25          */
26     @Override
27         public String getServicePathComponent() {
28                 return "orgauthorities";
29         }
30         
31         public String getItemCommonPartName() {
32                 return getCommonPartName("organizations");
33         }
34
35     /**
36      *
37      */
38     private static final OrgAuthorityClient instance = new OrgAuthorityClient();
39     /**
40      *
41      */
42     private OrgAuthorityProxy orgAuthorityProxy;
43
44     /**
45      *
46      * Default constructor for OrgAuthorityClient class.
47      *
48      */
49     public OrgAuthorityClient() {
50         ResteasyProviderFactory factory = ResteasyProviderFactory.getInstance();
51         RegisterBuiltin.register(factory);
52         orgAuthorityProxy = ProxyFactory.create(OrgAuthorityProxy.class, getBaseURL());
53     }
54
55     /**
56      * FIXME Comment this
57      *
58      * @return
59      */
60     public static OrgAuthorityClient getInstance() {
61         return instance;
62     }
63
64     /**
65      * @return
66      * @see org.collectionspace.services.client.OrgAuthorityProxy#readList()
67      */
68     public ClientResponse<OrgauthoritiesCommonList> readList() {
69         return orgAuthorityProxy.readList();
70     }
71
72     /**
73      * @param csid
74      * @return
75      * @see org.collectionspace.services.client.OrgAuthorityProxy#read(java.lang.String)
76      */
77
78     public ClientResponse<MultipartInput> read(String csid) {
79         return orgAuthorityProxy.read(csid);
80     }
81
82     /**
83      * @param orgAuthority
84      * @return
85      * @see org.collectionspace.services.client.OrgAuthorityProxy#createOrgAuthority(org.collectionspace.hello.OrgAuthority)
86      */
87     public ClientResponse<Response> create(MultipartOutput multipart) {
88         return orgAuthorityProxy.create(multipart);
89     }
90
91     /**
92      * @param csid
93      * @param orgAuthority
94      * @return
95      * @see org.collectionspace.services.client.OrgAuthorityProxy#updateOrgAuthority(java.lang.Long, org.collectionspace.hello.OrgAuthority)
96      */
97     public ClientResponse<MultipartInput> update(String csid, MultipartOutput multipart) {
98         return orgAuthorityProxy.update(csid, multipart);
99
100     }
101
102     /**
103      * @param csid
104      * @return
105      * @see org.collectionspace.services.client.OrgAuthorityProxy#deleteOrgAuthority(java.lang.Long)
106      */
107     public ClientResponse<Response> delete(String csid) {
108         return orgAuthorityProxy.delete(csid);
109     }
110
111     /**
112      * @return
113      * @see org.collectionspace.services.client.OrgAuthorityProxy#readItemList()
114      */
115     public ClientResponse<OrganizationsCommonList> readItemList(String vcsid) {
116         return orgAuthorityProxy.readItemList(vcsid);
117     }
118
119     /**
120      * @param csid
121      * @return
122      * @see org.collectionspace.services.client.OrgAuthorityProxy#read(java.lang.String)
123      */
124
125     public ClientResponse<MultipartInput> readItem(String vcsid, String csid) {
126         return orgAuthorityProxy.readItem(vcsid, csid);
127     }
128
129     /**
130      * @param orgAuthority
131      * @return
132      * @see org.collectionspace.services.client.OrgAuthorityProxy#createOrgAuthority(org.collectionspace.hello.OrgAuthority)
133      */
134     public ClientResponse<Response> createItem(String vcsid, MultipartOutput multipart) {
135         return orgAuthorityProxy.createItem(vcsid, multipart);
136     }
137
138     /**
139      * @param csid
140      * @param orgAuthority
141      * @return
142      * @see org.collectionspace.services.client.OrgAuthorityProxy#updateOrgAuthority(java.lang.Long, org.collectionspace.hello.OrgAuthority)
143      */
144     public ClientResponse<MultipartInput> updateItem(String vcsid, String csid, MultipartOutput multipart) {
145         return orgAuthorityProxy.updateItem(vcsid, csid, multipart);
146
147     }
148
149     /**
150      * @param csid
151      * @return
152      * @see org.collectionspace.services.client.OrgAuthorityProxy#deleteOrgAuthority(java.lang.Long)
153      */
154     public ClientResponse<Response> deleteItem(String vcsid, String csid) {
155         return orgAuthorityProxy.deleteItem(vcsid, csid);
156     }
157 }