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