This project has retired. For details please refer to its
Attic page.
RepositoriesService 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
22 import org.apache.archiva.maven2.model.Artifact;
23 import org.apache.archiva.redback.authorization.RedbackAuthorization;
24 import org.apache.archiva.repository.scanner.RepositoryScanStatistics;
25 import org.apache.archiva.rest.api.model.ArtifactTransferRequest;
26 import org.apache.archiva.rest.api.model.StringList;
27 import org.apache.archiva.security.common.ArchivaRoleConstants;
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.Path;
34 import javax.ws.rs.PathParam;
35 import javax.ws.rs.Produces;
36 import javax.ws.rs.QueryParam;
37 import javax.ws.rs.core.MediaType;
38
39
40
41
42
43 @Path ("/repositoriesService/")
44 public interface RepositoriesService
45 {
46
47
48
49
50 @Path ("scanRepository")
51 @GET
52 @Produces ({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_PLAIN })
53 @RedbackAuthorization (permissions = ArchivaRoleConstants.OPERATION_RUN_INDEXER)
54 Boolean scanRepository( @QueryParam ("repositoryId") String repositoryId,
55 @QueryParam ("fullScan") boolean fullScan )
56 throws ArchivaRestServiceException;
57
58
59
60
61
62
63 @Path ("scanRepositoryDirectoriesNow/{repositoryId}")
64 @GET
65 @Produces ({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_PLAIN })
66 @RedbackAuthorization (permissions = ArchivaRoleConstants.OPERATION_RUN_INDEXER)
67 RepositoryScanStatistics scanRepositoryDirectoriesNow( @PathParam ("repositoryId") String repositoryId )
68 throws ArchivaRestServiceException;
69
70
71 @Path ("alreadyScanning/{repositoryId}")
72 @GET
73 @Produces ({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_PLAIN })
74 @RedbackAuthorization (permissions = ArchivaRoleConstants.OPERATION_RUN_INDEXER)
75 Boolean alreadyScanning( @PathParam ("repositoryId") String repositoryId )
76 throws ArchivaRestServiceException;
77
78 @Path ("removeScanningTaskFromQueue/{repositoryId}")
79 @GET
80 @Produces ({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_PLAIN })
81 @RedbackAuthorization (permissions = ArchivaRoleConstants.OPERATION_RUN_INDEXER)
82 Boolean removeScanningTaskFromQueue( @PathParam ("repositoryId") String repositoryId )
83 throws ArchivaRestServiceException;
84
85 @Path ("scanRepositoryNow")
86 @GET
87 @Produces ({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_PLAIN })
88 @RedbackAuthorization (permissions = ArchivaRoleConstants.OPERATION_RUN_INDEXER)
89 Boolean scanRepositoryNow( @QueryParam ("repositoryId") String repositoryId,
90 @QueryParam ("fullScan") boolean fullScan )
91 throws ArchivaRestServiceException;
92
93
94
95
96
97 @Path ("copyArtifact")
98 @POST
99 @Consumes ({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
100 @Produces ({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_PLAIN })
101 @RedbackAuthorization (noPermission = true)
102 Boolean copyArtifact( ArtifactTransferRequest artifactTransferRequest )
103 throws ArchivaRestServiceException;
104
105 @Path ("scheduleDownloadRemoteIndex")
106 @GET
107 @Produces ({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_PLAIN })
108 @RedbackAuthorization (permissions = ArchivaRoleConstants.OPERATION_RUN_INDEXER)
109 Boolean scheduleDownloadRemoteIndex( @QueryParam ("repositoryId") String repositoryId,
110 @QueryParam ("now") boolean now,
111 @QueryParam ("fullDownload") boolean fullDownload )
112 throws ArchivaRestServiceException;
113
114
115
116
117
118
119 @Path ("deleteArtifact")
120 @POST
121 @Consumes ({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
122 @Produces ({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_PLAIN })
123 @RedbackAuthorization (noPermission = true)
124 Boolean deleteArtifact( Artifact artifact )
125 throws ArchivaRestServiceException;
126
127
128
129
130
131 @Path ("projectVersion/{repositoryId}/{namespace}/{projectId}/{version}")
132 @DELETE
133 @Produces ({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_PLAIN })
134 @RedbackAuthorization (noPermission = true)
135 Boolean removeProjectVersion( @PathParam ( "repositoryId" ) String repositoryId,
136 @PathParam ( "namespace" ) String namespace, @PathParam ( "projectId" ) String projectId,
137 @PathParam ( "version" ) String version )
138 throws ArchivaRestServiceException;
139
140 @Path ("isAuthorizedToDeleteArtifacts/{repositoryId}")
141 @GET
142 @Produces ({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_PLAIN })
143 @RedbackAuthorization (noPermission = true, noRestriction = true)
144 Boolean isAuthorizedToDeleteArtifacts( @PathParam ("repositoryId") String repoId )
145 throws ArchivaRestServiceException;
146
147
148
149
150
151 @Path ("deleteGroupId")
152 @GET
153 @Produces ({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_PLAIN })
154 @RedbackAuthorization (noPermission = true)
155 Boolean deleteGroupId( @QueryParam ("groupId") String groupId, @QueryParam ("repositoryId") String repositoryId )
156 throws ArchivaRestServiceException;
157
158
159
160
161
162 @Path ("project/{repositoryId}/{groupId}/{projectId}")
163 @DELETE
164 @Produces ({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_PLAIN })
165 @RedbackAuthorization (noPermission = true)
166 Boolean deleteProject( @PathParam ("groupId") String groupId, @PathParam ("projectId") String projectId,
167 @PathParam ("repositoryId") String repositoryId )
168 throws ArchivaRestServiceException;
169
170
171
172
173 @Path ("runningRemoteDownloadIds")
174 @GET
175 @Produces ({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_PLAIN })
176 @RedbackAuthorization (noPermission = true)
177 StringList getRunningRemoteDownloadIds();
178
179 }