This project has retired. For details please refer to its
Attic page.
BrowseService xref
1 package org.apache.archiva.rest.api.services;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 import org.apache.archiva.admin.model.beans.ManagedRepository;
22 import org.apache.archiva.maven2.model.Artifact;
23 import org.apache.archiva.maven2.model.TreeEntry;
24 import org.apache.archiva.metadata.model.ProjectVersionMetadata;
25 import org.apache.archiva.redback.authorization.RedbackAuthorization;
26 import org.apache.archiva.rest.api.model.ArtifactContent;
27 import org.apache.archiva.rest.api.model.ArtifactContentEntry;
28 import org.apache.archiva.rest.api.model.BrowseResult;
29 import org.apache.archiva.rest.api.model.Entry;
30 import org.apache.archiva.rest.api.model.MetadataAddRequest;
31 import org.apache.archiva.rest.api.model.VersionsList;
32
33 import javax.ws.rs.DELETE;
34 import javax.ws.rs.GET;
35 import javax.ws.rs.POST;
36 import javax.ws.rs.PUT;
37 import javax.ws.rs.Path;
38 import javax.ws.rs.PathParam;
39 import javax.ws.rs.Produces;
40 import javax.ws.rs.QueryParam;
41 import javax.ws.rs.core.MediaType;
42 import java.util.List;
43
44
45
46
47
48 @Path("/browseService/")
49 public interface BrowseService
50 {
51 @Path("rootGroups")
52 @GET
53 @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
54 @RedbackAuthorization(noPermission = true, noRestriction = true)
55 BrowseResult getRootGroups( @QueryParam("repositoryId") String repositoryId )
56 throws ArchivaRestServiceException;
57
58
59
60
61
62 @Path("browseGroupId/{groupId}")
63 @GET
64 @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
65 @RedbackAuthorization(noPermission = true, noRestriction = true)
66 BrowseResult browseGroupId( @PathParam("groupId") String groupId, @QueryParam("repositoryId") String repositoryId )
67 throws ArchivaRestServiceException;
68
69 @Path("versionsList/{g}/{a}")
70 @GET
71 @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
72 @RedbackAuthorization(noPermission = true, noRestriction = true)
73 VersionsList getVersionsList( @PathParam("g") String groupId, @PathParam("a") String artifactId,
74 @QueryParam("repositoryId") String repositoryId )
75 throws ArchivaRestServiceException;
76
77 @Path("projectVersionMetadata/{g}/{a}")
78 @GET
79 @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
80 @RedbackAuthorization(noPermission = true, noRestriction = true)
81 ProjectVersionMetadata getProjectVersionMetadata( @PathParam("g") String groupId, @PathParam("a") String artifactId,
82 @QueryParam("repositoryId") String repositoryId )
83 throws ArchivaRestServiceException;
84
85 @Path("projectVersionMetadata/{g}/{a}/{v}")
86 @GET
87 @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
88 @RedbackAuthorization(noPermission = true, noRestriction = true)
89 ProjectVersionMetadata getProjectMetadata( @PathParam("g") String groupId, @PathParam("a") String artifactId,
90 @PathParam("v") String version,
91 @QueryParam("repositoryId") String repositoryId )
92 throws ArchivaRestServiceException;
93
94
95
96
97 @Path("userRepositories")
98 @GET
99 @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
100 @RedbackAuthorization(noPermission = true, noRestriction = true)
101 List<ManagedRepository> getUserRepositories()
102 throws ArchivaRestServiceException;
103
104
105
106
107 @Path("userManagableRepositories")
108 @GET
109 @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
110 @RedbackAuthorization(noPermission = true, noRestriction = true)
111 List<ManagedRepository> getUserManagableRepositories()
112 throws ArchivaRestServiceException;
113
114
115
116
117
118 @Path("treeEntries/{g}/{a}/{v}")
119 @GET
120 @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
121 @RedbackAuthorization(noPermission = true, noRestriction = true)
122 List<TreeEntry> getTreeEntries( @PathParam("g") String groupId, @PathParam("a") String artifactId,
123 @PathParam("v") String version, @QueryParam("repositoryId") String repositoryId )
124 throws ArchivaRestServiceException;
125
126
127
128
129 @Path("dependees/{g}/{a}/{v}")
130 @GET
131 @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
132 @RedbackAuthorization(noPermission = true, noRestriction = true)
133 List<Artifact> getDependees( @PathParam("g") String groupId, @PathParam("a") String artifactId,
134 @PathParam("v") String version, @QueryParam("repositoryId") String repositoryId )
135 throws ArchivaRestServiceException;
136
137 @Path("metadatas/{g}/{a}/{v}")
138 @GET
139 @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
140 @RedbackAuthorization(noPermission = true, noRestriction = true)
141 List<Entry> getMetadatas( @PathParam("g") String groupId, @PathParam("a") String artifactId,
142 @PathParam("v") String version, @QueryParam("repositoryId") String repositoryId )
143 throws ArchivaRestServiceException;
144
145 @Path("metadata/{g}/{a}/{v}/{key}/{value}")
146 @PUT
147 @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
148 @RedbackAuthorization(noPermission = false, noRestriction = false, permissions = "archiva-add-metadata")
149 Boolean addMetadata( @PathParam("g") String groupId, @PathParam("a") String artifactId,
150 @PathParam("v") String version, @PathParam("key") String key, @PathParam("value") String value,
151 @QueryParam("repositoryId") String repositoryId )
152 throws ArchivaRestServiceException;
153
154 @Path("metadata/{g}/{a}/{v}/{key}")
155 @DELETE
156 @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
157 @RedbackAuthorization(noPermission = false, noRestriction = false, permissions = "archiva-add-metadata")
158 Boolean deleteMetadata( @PathParam("g") String groupId, @PathParam("a") String artifactId,
159 @PathParam("v") String version, @PathParam("key") String key,
160 @QueryParam("repositoryId") String repositoryId )
161 throws ArchivaRestServiceException;
162
163 @Path("importMetadata")
164 @POST
165 @RedbackAuthorization(noPermission = false, noRestriction = false, permissions = "archiva-add-metadata")
166 Boolean importMetadata( MetadataAddRequest metadataAddRequest, @QueryParam("repository") String repository )
167 throws ArchivaRestServiceException;
168
169 @Path("artifactContentEntries/{g}/{a}/{v}")
170 @GET
171 @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
172 @RedbackAuthorization(noPermission = true, noRestriction = true)
173 List<ArtifactContentEntry> getArtifactContentEntries( @PathParam("g") String groupId,
174 @PathParam("a") String artifactId,
175 @PathParam("v") String version,
176 @QueryParam("c") String classifier,
177 @QueryParam("t") String type, @QueryParam("p") String path,
178 @QueryParam("repositoryId") String repositoryId )
179 throws ArchivaRestServiceException;
180
181 @Path("artifactDownloadInfos/{g}/{a}/{v}")
182 @GET
183 @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
184 @RedbackAuthorization(noPermission = true, noRestriction = true)
185 List<Artifact> getArtifactDownloadInfos( @PathParam("g") String groupId, @PathParam("a") String artifactId,
186 @PathParam("v") String version,
187 @QueryParam("repositoryId") String repositoryId )
188 throws ArchivaRestServiceException;
189
190
191
192
193 @Path("artifactContentText/{g}/{a}/{v}")
194 @GET
195 @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
196 @RedbackAuthorization(noPermission = true, noRestriction = true)
197 ArtifactContent getArtifactContentText( @PathParam("g") String groupId, @PathParam("a") String artifactId,
198 @PathParam("v") String version, @QueryParam("c") String classifier,
199 @QueryParam("t") String type, @QueryParam("p") String path,
200 @QueryParam("repositoryId") String repositoryId )
201 throws ArchivaRestServiceException;
202
203
204
205
206
207
208 @Path("artifactAvailable/{g}/{a}/{v}")
209 @GET
210 @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
211 @RedbackAuthorization(noPermission = true, noRestriction = true)
212 Boolean artifactAvailable( @PathParam("g") String groupId, @PathParam("a") String artifactId,
213 @PathParam("v") String version, @QueryParam("repositoryId") String repositoryId )
214 throws ArchivaRestServiceException;
215
216
217
218
219
220
221 @Path( "artifactAvailable/{g}/{a}/{v}/{c}" )
222 @GET
223 @Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML } )
224 @RedbackAuthorization( noPermission = true, noRestriction = true )
225 Boolean artifactAvailable( @PathParam( "g" ) String groupId, @PathParam( "a" ) String artifactId,
226 @PathParam( "v" ) String version, @PathParam( "c" ) String classifier,
227 @QueryParam( "repositoryId" ) String repositoryId )
228 throws ArchivaRestServiceException;
229
230
231
232
233
234
235
236
237
238 @Path("artifacts/{r}")
239 @GET
240 @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
241 @RedbackAuthorization(noPermission = true, noRestriction = true)
242 List<Artifact> getArtifacts( @PathParam("r") String repositoryId )
243 throws ArchivaRestServiceException;
244
245
246
247
248
249
250
251
252
253
254
255
256 @Path( "artifactsByProjectVersionMetadata/{key}/{value}" )
257 @GET
258 @Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML } )
259 @RedbackAuthorization( noPermission = true, noRestriction = true )
260 List<Artifact> getArtifactsByProjectVersionMetadata( @PathParam( "key" ) String key, @PathParam( "value" ) String value,
261 @QueryParam("repositoryId") String repositoryId )
262 throws ArchivaRestServiceException;
263
264
265
266
267
268
269
270
271
272
273
274
275 @Path( "artifactsByMetadata/{key}/{value}" )
276 @GET
277 @Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML } )
278 @RedbackAuthorization( noPermission = true, noRestriction = true )
279 List<Artifact> getArtifactsByMetadata( @PathParam( "key" ) String key, @PathParam( "value" ) String value,
280 @QueryParam("repositoryId") String repositoryId )
281 throws ArchivaRestServiceException;
282
283
284
285
286
287
288
289
290
291
292
293
294 @Path( "artifactsByProperty/{key}/{value}" )
295 @GET
296 @Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML } )
297 @RedbackAuthorization( noPermission = true, noRestriction = true )
298 List<Artifact> getArtifactsByProperty( @PathParam( "key" ) String key, @PathParam( "value" ) String value,
299 @QueryParam("repositoryId") String repositoryId )
300 throws ArchivaRestServiceException;
301
302
303
304
305
306
307
308
309
310
311
312
313 @Path( "searchArtifacts/{text}" )
314 @GET
315 @Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML } )
316 @RedbackAuthorization( noPermission = true, noRestriction = true )
317 List<Artifact> searchArtifacts( @PathParam( "text" ) String text,
318 @QueryParam( "repositoryId" ) String repositoryId,
319 @QueryParam( "exact" ) Boolean exact )
320 throws ArchivaRestServiceException;
321
322
323
324
325
326
327
328
329
330
331
332
333
334 @Path( "searchArtifacts/{key}/{text}" )
335 @GET
336 @Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML } )
337 @RedbackAuthorization( noPermission = true, noRestriction = true )
338 List<Artifact> searchArtifacts( @PathParam( "key" ) String key, @PathParam( "text" ) String text,
339 @QueryParam( "repositoryId" ) String repositoryId,
340 @QueryParam( "exact" ) Boolean exact )
341 throws ArchivaRestServiceException;
342 }