]> git.aero2k.de Git - tmp/jakarta-migration.git/blob
a454f2279ad626555a017939711543c948baabcd
[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      * Roundtrip.
74      *
75      * @return the client response
76      */
77     @GET
78     @Path("/roundtrip")
79     @Produces({"application/xml"})
80     ClientResponse<Response> roundtrip();
81
82     /**
83      * Keyword search.
84      *
85      * @param keywords the keywords
86      * @return the client response
87      */
88     @GET
89     @Path("/search")
90     @Produces({"application/xml"})
91     ClientResponse<CollectionobjectsCommonList> keywordSearch(
92                 @QueryParam(IQueryManager.SEARCH_TYPE_KEYWORDS) String keywords);
93
94     //(C)reate
95     /**
96      * Creates the.
97      *
98      * @param multipart the multipart
99      * @return the client response
100      */
101     @POST
102     ClientResponse<Response> create(MultipartOutput multipart);
103
104     //(R)ead
105     /**
106      * Read.
107      *
108      * @param csid the csid
109      * @return the client response
110      */
111     @GET
112     @Path("/{csid}")
113     ClientResponse<MultipartInput> read(@PathParam("csid") String csid);
114     
115     // List Authority references
116     /**
117      * Gets the authority refs.
118      *
119      * @param csid the csid
120      * @return the authority refs
121      */
122     @GET
123     @Produces({"application/xml"})
124     @Path("/{csid}/authorityrefs/")
125     ClientResponse<AuthorityRefList> getAuthorityRefs(@PathParam("csid") String csid);
126     
127
128     //(U)pdate
129     /**
130      * Update.
131      *
132      * @param csid the csid
133      * @param multipart the multipart
134      * @return the client response
135      */
136     @PUT
137     @Path("/{csid}")
138     ClientResponse<MultipartInput> update(@PathParam("csid") String csid, MultipartOutput multipart);
139
140     //(D)elete
141     /**
142      * Delete.
143      *
144      * @param csid the csid
145      * @return the client response
146      */
147     @DELETE
148     @Path("/{csid}")
149     ClientResponse<Response> delete(@PathParam("csid") String csid);
150 }