1 package org.sonatype.aether.util.layout; 2 3 /******************************************************************************* 4 * Copyright (c) 2010-2011 Sonatype, Inc. 5 * All rights reserved. This program and the accompanying materials 6 * are made available under the terms of the Eclipse Public License v1.0 7 * which accompanies this distribution, and is available at 8 * http://www.eclipse.org/legal/epl-v10.html 9 *******************************************************************************/ 10 11 import java.net.URI; 12 13 import org.sonatype.aether.artifact.Artifact; 14 import org.sonatype.aether.metadata.Metadata; 15 16 /** 17 * The layout for a remote repository whose artifacts/metadata can be addressed via URIs. 18 * 19 * @author Benjamin Bentmann 20 */ 21 public interface RepositoryLayout 22 { 23 24 /** 25 * Gets the URI to the location within a remote repository where the specified artifact would be stored. The URI is 26 * relative to the root directory of the repository. 27 * 28 * @param artifact The artifact to get the URI for, must not be {@code null}. 29 * @return The relative URI to the artifact, never {@code null}. 30 */ 31 URI getPath( Artifact artifact ); 32 33 /** 34 * Gets the URI to the location within a remote repository where the specified metadata would be stored. The URI is 35 * relative to the root directory of the repository. 36 * 37 * @param metadata The metadata to get the URI for, must not be {@code null}. 38 * @return The relative URI to the metadata, never {@code null}. 39 */ 40 URI getPath( Metadata metadata ); 41 42 }