Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
RepositoryBrowsing |
|
| 0.0;0 |
1 | package org.apache.maven.archiva.database.browsing; | |
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 org.apache.maven.archiva.database.ArchivaDatabaseException; | |
23 | import org.apache.maven.archiva.database.ObjectNotFoundException; | |
24 | import org.apache.maven.archiva.model.ArchivaProjectModel; | |
25 | ||
26 | import java.util.List; | |
27 | ||
28 | /** | |
29 | * Repository Browsing component | |
30 | * | |
31 | * @version $Id: RepositoryBrowsing.java 745371 2009-02-18 03:37:34Z oching $ | |
32 | */ | |
33 | public interface RepositoryBrowsing | |
34 | { | |
35 | /** | |
36 | * Get the {@link BrowsingResults} for the root of the repository. | |
37 | * | |
38 | * @return the root browsing results. | |
39 | */ | |
40 | public BrowsingResults getRoot( String principle, List<String> observableRepositoryIds ); | |
41 | ||
42 | /** | |
43 | * Get the {@link BrowsingResults} for the selected groupId. | |
44 | * | |
45 | * @param groupId the groupId to select. | |
46 | * @return the {@link BrowsingResults} for the specified groupId. | |
47 | */ | |
48 | public BrowsingResults selectGroupId( String principle, List<String> observableRepositoryIds, String groupId ); | |
49 | ||
50 | /** | |
51 | * Get the {@link BrowsingResults} for the selected groupId & artifactId. | |
52 | * | |
53 | * @param groupId the groupId selected | |
54 | * @param artifactId the artifactId selected | |
55 | * @return the {@link BrowsingResults} for the specified groupId / artifactId combo. | |
56 | */ | |
57 | public BrowsingResults selectArtifactId( String principle, List<String> observableRepositoryIds, String groupId, | |
58 | String artifactId ); | |
59 | ||
60 | /** | |
61 | * Get the {@link ArchivaProjectModel} for the selected groupId / artifactId / version combo. | |
62 | * | |
63 | * @param groupId the groupId selected | |
64 | * @param artifactId the artifactId selected | |
65 | * @param version the version selected | |
66 | * @return the {@link ArchivaProjectModel} for the selected groupId / artifactId / version combo. | |
67 | * @throws ObjectNotFoundException if the artifact object or project object isn't found in the database. | |
68 | * @throws ArchivaDatabaseException if there is a fundamental database error. | |
69 | */ | |
70 | public ArchivaProjectModel selectVersion( String principle, List<String> observableRepositoryIds, String groupId, | |
71 | String artifactId, String version ) | |
72 | throws ObjectNotFoundException, ArchivaDatabaseException; | |
73 | ||
74 | /** | |
75 | * Get the {@link List} of {@link ArchivaProjectModel} that are used by the provided | |
76 | * groupId, artifactId, and version specified. | |
77 | * | |
78 | * @param groupId the groupId selected | |
79 | * @param artifactId the artifactId selected | |
80 | * @param version the version selected | |
81 | * @return the {@link List} of {@link ArchivaProjectModel} objects. (never null, but can be empty) | |
82 | * @throws ArchivaDatabaseException if there is a fundamental database error. | |
83 | */ | |
84 | public List<ArchivaProjectModel> getUsedBy( String principle, List<String> observableRepositoryIds, String groupId, | |
85 | String artifactId, String version ) | |
86 | throws ArchivaDatabaseException; | |
87 | ||
88 | ||
89 | public String getRepositoryId( String principle, List<String> observableRepositoryIds, String groupId, | |
90 | String artifactId, String version ) | |
91 | throws ObjectNotFoundException, ArchivaDatabaseException; | |
92 | ||
93 | /** | |
94 | * Get the other versions of the given SNAPSHOT version. | |
95 | * | |
96 | * @param observableRepositoryIds | |
97 | * @param groupId | |
98 | * @param artifactId | |
99 | * @param version | |
100 | * @return | |
101 | * @throws ObjectNotFoundException | |
102 | * @throws ArchivaDatabaseException | |
103 | */ | |
104 | public List<String> getOtherSnapshotVersions( List<String> observableRepositoryIds, | |
105 | String groupId, String artifactId, String version ) | |
106 | throws ObjectNotFoundException, ArchivaDatabaseException; | |
107 | ||
108 | } |