1 package org.apache.maven.archiva.database.browsing;
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
12 * http://www.apache.org/licenses/LICENSE-2.0
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
22 import org.apache.maven.archiva.database.ArchivaDatabaseException;
23 import org.apache.maven.archiva.database.ObjectNotFoundException;
24 import org.apache.maven.archiva.model.ArchivaProjectModel;
26 import java.util.List;
29 * Repository Browsing component
33 public interface RepositoryBrowsing
36 * Get the {@link BrowsingResults} for the root of the repository.
38 * @return the root browsing results.
40 public BrowsingResults getRoot( String principle, List<String> observableRepositoryIds );
43 * Get the {@link BrowsingResults} for the selected groupId.
45 * @param groupId the groupId to select.
46 * @return the {@link BrowsingResults} for the specified groupId.
48 public BrowsingResults selectGroupId( String principle, List<String> observableRepositoryIds, String groupId );
51 * Get the {@link BrowsingResults} for the selected groupId & artifactId.
53 * @param groupId the groupId selected
54 * @param artifactId the artifactId selected
55 * @return the {@link BrowsingResults} for the specified groupId / artifactId combo.
57 public BrowsingResults selectArtifactId( String principle, List<String> observableRepositoryIds, String groupId,
61 * Get the {@link ArchivaProjectModel} for the selected groupId / artifactId / version combo.
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.
70 public ArchivaProjectModel selectVersion( String principle, List<String> observableRepositoryIds, String groupId,
71 String artifactId, String version )
72 throws ObjectNotFoundException, ArchivaDatabaseException;
75 * Get the {@link List} of {@link ArchivaProjectModel} that are used by the provided
76 * groupId, artifactId, and version specified.
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.
84 public List<ArchivaProjectModel> getUsedBy( String principle, List<String> observableRepositoryIds, String groupId,
85 String artifactId, String version )
86 throws ArchivaDatabaseException;
89 public String getRepositoryId( String principle, List<String> observableRepositoryIds, String groupId,
90 String artifactId, String version )
91 throws ObjectNotFoundException, ArchivaDatabaseException;
94 * Get the other versions of the given SNAPSHOT version.
96 * @param observableRepositoryIds
101 * @throws ObjectNotFoundException
102 * @throws ArchivaDatabaseException
104 public List<String> getOtherSnapshotVersions( List<String> observableRepositoryIds,
105 String groupId, String artifactId, String version )
106 throws ObjectNotFoundException, ArchivaDatabaseException;