1 package org.apache.archiva.repository;
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.archiva.model.ArtifactReference;
23 import org.apache.archiva.model.RepositoryURL;
24 import org.apache.archiva.repository.layout.LayoutException;
27 * RemoteRepositoryContent interface for interacting with a remote repository in an abstract way,
28 * without the need for processing based on URLs, or working with the database.
32 public interface RemoteRepositoryContent extends RepositoryContent
36 * Convenience method to get the repository id.
40 * Equivalent to calling <code>.getRepository().getId()</code>
43 * @return the repository id.
48 * Get the repository configuration associated with this
51 * @return the repository that is associated with this repository content.
53 RemoteRepository getRepository();
57 * Convenience method to get the repository url.
61 * Equivalent to calling <code>new RepositoryURL( this.getRepository().getUrl() )</code>
64 * @return the repository url.
66 RepositoryURL getURL();
69 * Set the repository configuration to associate with this
72 * @param repo the repository to associate with this repository content.
74 void setRepository( RemoteRepository repo );
77 * Given an ArtifactReference, return the url to the artifact.
79 * @param reference the artifact reference to use.
80 * @return the relative path to the artifact.
82 RepositoryURL toURL( ArtifactReference reference );