Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
AdministrationService |
|
| 0.0;0 |
1 | package org.apache.archiva.web.xmlrpc.api; | |
2 | ||
3 | /* | |
4 | * Licensed to the Apache Software Foundation (ASF) under one | |
5 | * or more contributor license agreements. See the NOTICE file | |
6 | * distributed with this work for additional information | |
7 | * regarding copyright ownership. The ASF licenses this file | |
8 | * to you under the Apache License, Version 2.0 (the | |
9 | * "License"); you may not use this file except in compliance | |
10 | * with the License. You may obtain a copy of the License at | |
11 | * | |
12 | * http://www.apache.org/licenses/LICENSE-2.0 | |
13 | * | |
14 | * Unless required by applicable law or agreed to in writing, | |
15 | * software distributed under the License is distributed on an | |
16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | |
17 | * KIND, either express or implied. See the License for the | |
18 | * specific language governing permissions and limitations | |
19 | * under the License. | |
20 | */ | |
21 | ||
22 | import java.util.List; | |
23 | ||
24 | import org.apache.archiva.web.xmlrpc.api.beans.ManagedRepository; | |
25 | import org.apache.archiva.web.xmlrpc.api.beans.RemoteRepository; | |
26 | ||
27 | import com.atlassian.xmlrpc.ServiceObject; | |
28 | ||
29 | @ServiceObject( "AdministrationService" ) | |
30 | public interface AdministrationService | |
31 | { | |
32 | /** | |
33 | * Executes repository scanner on the given repository. | |
34 | * | |
35 | * @param repoId id of the repository to be scanned | |
36 | * @return | |
37 | * @throws Exception | |
38 | */ | |
39 | public Boolean executeRepositoryScanner( String repoId ) throws Exception; | |
40 | ||
41 | /** | |
42 | * Executes the database scanner. | |
43 | * | |
44 | * @return | |
45 | * @throws Exception | |
46 | */ | |
47 | public Boolean executeDatabaseScanner() throws Exception; | |
48 | ||
49 | /** | |
50 | * Gets all available database consumers. | |
51 | * @return | |
52 | */ | |
53 | public List<String> getAllDatabaseConsumers(); | |
54 | ||
55 | /** | |
56 | * Configures (enable or disable) database consumer. | |
57 | * | |
58 | * @param consumerId id of the database consumer | |
59 | * @param enable flag whether to enable or disable the specified consumer | |
60 | * @return | |
61 | * @throws Exception | |
62 | */ | |
63 | public Boolean configureDatabaseConsumer( String consumerId, boolean enable ) throws Exception; | |
64 | ||
65 | /** | |
66 | * Gets all available repository consumers. | |
67 | * | |
68 | * @return | |
69 | */ | |
70 | public List<String> getAllRepositoryConsumers(); | |
71 | ||
72 | // TODO should we already implement config of consumers per repository? | |
73 | /** | |
74 | * Configures (enable or disable) repository consumer. | |
75 | * | |
76 | * @param repoId | |
77 | * @param consumerId | |
78 | * @param enable | |
79 | * @return | |
80 | * @throws Exception | |
81 | */ | |
82 | public Boolean configureRepositoryConsumer( String repoId, String consumerId, boolean enable ) throws Exception; | |
83 | ||
84 | /** | |
85 | * Gets all managed repositories. | |
86 | * | |
87 | * @return | |
88 | */ | |
89 | public List<ManagedRepository> getAllManagedRepositories(); | |
90 | ||
91 | /** | |
92 | * Gets all remote repositories. | |
93 | * | |
94 | * @return | |
95 | */ | |
96 | public List<RemoteRepository> getAllRemoteRepositories(); | |
97 | ||
98 | /** | |
99 | * Deletes given artifact from the specified repository. | |
100 | * | |
101 | * @param repoId id of the repository where the artifact to be deleted resides | |
102 | * @param groupId groupId of the artifact to be deleted | |
103 | * @param artifactId artifactId of the artifact to be deleted | |
104 | * @param version version of the artifact to be deleted | |
105 | * @return | |
106 | * @throws Exception | |
107 | */ | |
108 | public Boolean deleteArtifact( String repoId, String groupId, String artifactId, String version ) | |
109 | throws Exception; | |
110 | ||
111 | //TODO | |
112 | // consider the following as additional services: | |
113 | // - getAllConfiguredRepositoryConsumers( String repoId ) - list all enabled consumers for the repo | |
114 | // - getAllConfiguredDatabaseConsumers() - list all enabled db consumers | |
115 | } |