]> git.aero2k.de Git - tmp/jakarta-migration.git/blob
743cddabbbb88fcf401cdd822c90dd901761937f
[tmp/jakarta-migration.git] /
1 /**     
2  * CollectionObjectProxy.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 © 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.Consumes;
30 import javax.ws.rs.DELETE;
31 import javax.ws.rs.GET;
32 import javax.ws.rs.POST;
33 import javax.ws.rs.PUT;
34 import javax.ws.rs.Path;
35 import javax.ws.rs.PathParam;
36 import javax.ws.rs.QueryParam;
37 import javax.ws.rs.Produces;
38 //import javax.ws.rs.core.Context;
39 import javax.ws.rs.core.Response;
40 //import javax.ws.rs.core.UriInfo;
41
42 //import org.collectionspace.services.client.IClientQueryParams;
43 import org.collectionspace.services.client.CollectionSpaceProxy;
44 import org.collectionspace.services.common.query.IQueryManager;
45 import org.collectionspace.services.common.authorityref.AuthorityRefList;
46 //import org.collectionspace.services.jaxb.AbstractCommonList;
47 import org.collectionspace.services.collectionobject.CollectionobjectsCommonList;
48
49 import org.jboss.resteasy.client.ClientResponse;
50
51 /**
52  * @version $Revision:$
53  * FIXME: http://issues.collectionspace.org/browse/CSPACE-1684
54  */
55 @Path(CollectionObjectClient.SERVICE_PATH_PROXY)
56 @Produces({"application/xml"})
57 @Consumes({"application/xml"})
58 public interface CollectionObjectProxy extends CollectionSpaceProxy {
59
60     /**
61      * Read list.
62      *
63      * @return the client response
64      */
65     @GET
66     @Produces({"application/xml"})
67     ClientResponse<CollectionobjectsCommonList> readList();
68     
69 //    /**
70 //     * Read list.  //FIXME: REM - Remove this dead code please.
71 //     *
72 //     * @param pageSize the page size
73 //     * @param pageNumber the page number
74 //     * @return the client response
75 //     */
76 //    @GET
77 //    @Produces({"application/xml"})
78 //    @Override
79 //    ClientResponse<CollectionobjectsCommonList> readList(
80 //              @QueryParam(IClientQueryParams.PAGE_SIZE_PARAM) String pageSize,
81 //              @QueryParam(IClientQueryParams.START_PAGE_PARAM) String pageNumber);
82     
83
84     /**
85      * Roundtrip.
86      * @param ms 
87      *
88      * @return the client response
89      */
90     @GET
91     @Path("/{ms}/roundtrip")
92     @Produces({"application/xml"})
93     ClientResponse<Response> roundtrip(@PathParam("ms") int ms);
94
95     /**
96      * Keyword search.
97      *
98      * @param keywords the keywords
99      * @return the client response
100      */
101     @GET
102     @Produces({"application/xml"})
103     ClientResponse<CollectionobjectsCommonList> keywordSearch(
104                 @QueryParam(IQueryManager.SEARCH_TYPE_KEYWORDS_KW) String keywords);
105
106     //(C)reate
107     /**
108      * Creates the.
109      *
110      * @param payload the payload
111      * @return the client response
112      */
113     @POST
114     ClientResponse<Response> create(byte[] payload);
115
116     //(R)ead
117     /**
118      * Read.
119      *
120      * @param csid the csid
121      * @return the client response
122      */
123     @GET
124     @Path("/{csid}")
125     ClientResponse<String> read(@PathParam("csid") String csid);
126     
127     @GET
128     @Produces({"application/xml"})
129     @Path("/{csid}/picture")
130     @Deprecated //FIXME: REM - Remove this method and the corresponding client, and resource as well.
131     ClientResponse<Response> createPicture(@PathParam("csid") String csid);
132     
133     // List Authority references
134     /**
135      * Gets the authority refs.
136      *
137      * @param csid the csid
138      * @return the authority refs
139      */
140     @GET
141     @Produces({"application/xml"})
142     @Path("/{csid}/authorityrefs/")
143     ClientResponse<AuthorityRefList> getAuthorityRefs(@PathParam("csid") String csid);
144     
145
146     //(U)pdate
147     /**
148      * Update.
149      *
150      * @param csid the csid
151      * @param multipart the multipart
152      * @return the client response
153      */
154     @PUT
155     @Path("/{csid}")
156     ClientResponse<String> update(@PathParam("csid") String csid, byte[] payload);
157
158     //(D)elete
159     /**
160      * Delete.
161      *
162      * @param csid the csid
163      * @return the client response
164      */
165     @DELETE
166     @Path("/{csid}")
167     ClientResponse<Response> delete(@PathParam("csid") String csid);
168 }