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.maven2.model.Artifact;
22 import org.apache.archiva.redback.authorization.RedbackAuthorization;
23 import org.apache.archiva.security.common.ArchivaRoleConstants;
24
25 import javax.ws.rs.GET;
26 import javax.ws.rs.Path;
27 import javax.ws.rs.PathParam;
28 import javax.ws.rs.Produces;
29 import javax.ws.rs.core.MediaType;
30 import java.util.List;
31
32
33
34
35
36
37
38 @Path ("/mergeRepositoriesService/")
39 public interface MergeRepositoriesService
40 {
41
42
43
44
45
46 @Path ("mergeConflictedArtifacts/{sourceRepositoryId}/{targetRepositoryId}")
47 @GET
48 @Produces ({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
49 @RedbackAuthorization (permissions = ArchivaRoleConstants.OPERATION_MERGE_REPOSITORY)
50 List<Artifact> getMergeConflictedArtifacts( @PathParam ("sourceRepositoryId") String sourceRepositoryId,
51 @PathParam ("targetRepositoryId") String targetRepositoryId )
52 throws ArchivaRestServiceException;
53
54
55
56
57
58 @Path ("mergeRepositories/{sourceRepositoryId}/{targetRepositoryId}/{skipConflicts}")
59 @GET
60 @RedbackAuthorization (permissions = ArchivaRoleConstants.OPERATION_MERGE_REPOSITORY)
61 void mergeRepositories( @PathParam ("sourceRepositoryId") String sourceRepositoryId,
62 @PathParam ("targetRepositoryId") String targetRepositoryId,
63 @PathParam ("skipConflicts") boolean skipConflicts )
64 throws ArchivaRestServiceException;
65 }