]> git.aero2k.de Git - tmp/jakarta-migration.git/blob
7b3f6968bc30d537bb222921ae4bdbc249377b4b
[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 import org.jboss.resteasy.plugins.providers.multipart.MultipartInput;
52 import org.jboss.resteasy.plugins.providers.multipart.MultipartOutput;
53
54 /**
55  * @version $Revision:$
56  * FIXME: http://issues.collectionspace.org/browse/CSPACE-1684
57  */
58 @Path("/collectionobjects/")
59 @Produces({"multipart/mixed"})
60 @Consumes({"multipart/mixed"})
61 public interface CollectionObjectProxy extends CollectionSpaceProxy {
62
63     /**
64      * Read list.
65      *
66      * @return the client response
67      */
68     @GET
69     @Produces({"application/xml"})
70     ClientResponse<CollectionobjectsCommonList> readList();
71     
72 //    /**
73 //     * Read list.
74 //     *
75 //     * @param pageSize the page size
76 //     * @param pageNumber the page number
77 //     * @return the client response
78 //     */
79 //    @GET
80 //    @Produces({"application/xml"})
81 //    @Override
82 //    ClientResponse<CollectionobjectsCommonList> readList(
83 //              @QueryParam(IClientQueryParams.PAGE_SIZE_PARAM) String pageSize,
84 //              @QueryParam(IClientQueryParams.START_PAGE_PARAM) String pageNumber);
85     
86
87     /**
88      * Roundtrip.
89      * @param ms 
90      *
91      * @return the client response
92      */
93     @GET
94     @Path("/{ms}/roundtrip")
95     @Produces({"application/xml"})
96     ClientResponse<Response> roundtrip(@PathParam("ms") int ms);
97
98     /**
99      * Keyword search.
100      *
101      * @param keywords the keywords
102      * @return the client response
103      */
104     @GET
105     @Produces({"application/xml"})
106     ClientResponse<CollectionobjectsCommonList> keywordSearch(
107                 @QueryParam(IQueryManager.SEARCH_TYPE_KEYWORDS_KW) String keywords);
108
109     //(C)reate
110     /**
111      * Creates the.
112      *
113      * @param multipart the multipart
114      * @return the client response
115      */
116     @POST
117     ClientResponse<Response> create(MultipartOutput multipart);
118
119     //(R)ead
120     /**
121      * Read.
122      *
123      * @param csid the csid
124      * @return the client response
125      */
126     @GET
127     @Path("/{csid}")
128     ClientResponse<MultipartInput> read(@PathParam("csid") String csid);
129     
130     // List Authority references
131     /**
132      * Gets the authority refs.
133      *
134      * @param csid the csid
135      * @return the authority refs
136      */
137     @GET
138     @Produces({"application/xml"})
139     @Path("/{csid}/authorityrefs/")
140     ClientResponse<AuthorityRefList> getAuthorityRefs(@PathParam("csid") String csid);
141     
142
143     //(U)pdate
144     /**
145      * Update.
146      *
147      * @param csid the csid
148      * @param multipart the multipart
149      * @return the client response
150      */
151     @PUT
152     @Path("/{csid}")
153     ClientResponse<MultipartInput> update(@PathParam("csid") String csid, MultipartOutput multipart);
154
155     //(D)elete
156     /**
157      * Delete.
158      *
159      * @param csid the csid
160      * @return the client response
161      */
162     @DELETE
163     @Path("/{csid}")
164     ClientResponse<Response> delete(@PathParam("csid") String csid);
165 }