This project has retired. For details please refer to its Attic page.
Source code
001package org.apache.archiva.repository;
002
003/*
004 * Licensed to the Apache Software Foundation (ASF) under one
005 * or more contributor license agreements.  See the NOTICE file
006 * distributed with this work for additional information
007 * regarding copyright ownership.  The ASF licenses this file
008 * to you under the Apache License, Version 2.0 (the
009 * "License"); you may not use this file except in compliance
010 * with the License.  You may obtain a copy of the License at
011 *
012 *  http://www.apache.org/licenses/LICENSE-2.0
013 *
014 * Unless required by applicable law or agreed to in writing,
015 * software distributed under the License is distributed on an
016 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
017 * KIND, either express or implied.  See the License for the
018 * specific language governing permissions and limitations
019 * under the License.
020 */
021
022import org.apache.archiva.model.ArtifactReference;
023import org.apache.archiva.model.RepositoryURL;
024
025/**
026 * RemoteRepositoryContent interface for interacting with a remote repository in an abstract way, 
027 * without the need for processing based on URLs, or working with the database. 
028 *
029 *
030 */
031public interface RemoteRepositoryContent extends RepositoryContent
032{
033    /**
034     * <p>
035     * Convenience method to get the repository id.
036     * </p>
037     * 
038     * <p>
039     * Equivalent to calling <code>.getRepository().getId()</code>
040     * </p>
041     * 
042     * @return the repository id.
043     */
044    String getId();
045
046    /**
047     * Get the repository configuration associated with this
048     * repository content.
049     * 
050     * @return the repository that is associated with this repository content.
051     */
052    RemoteRepository getRepository();
053
054    /**
055     * <p>
056     * Convenience method to get the repository url.
057     * </p>
058     * 
059     * <p>
060     * Equivalent to calling <code>new RepositoryURL( this.getRepository().getUrl() )</code>
061     * </p>
062     * 
063     * @return the repository url.
064     */
065    RepositoryURL getURL();
066
067    /**
068     * Set the repository configuration to associate with this
069     * repository content.
070     * 
071     * @param repo the repository to associate with this repository content.
072     */
073    void setRepository( RemoteRepository repo );
074
075    /**
076     * Given an ArtifactReference, return the url to the artifact.
077     *
078     * @param reference the artifact reference to use.
079     * @return the relative path to the artifact.
080     */
081    RepositoryURL toURL( ArtifactReference reference );
082}