1 package org.sonatype.aether.repository; 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.io.File; 12 import java.util.List; 13 14 import org.sonatype.aether.artifact.Artifact; 15 16 /** 17 * Manages a repository backed by the IDE workspace or a build session. 18 * 19 * @author Benjamin Bentmann 20 */ 21 public interface WorkspaceReader 22 { 23 24 /** 25 * Gets a description of the workspace repository. 26 * 27 * @return The repository description, never {@code null}. 28 */ 29 WorkspaceRepository getRepository(); 30 31 /** 32 * Locates the specified artifact. 33 * 34 * @param artifact The artifact to locate, must not be {@code null}. 35 * @return The path to the artifact or {@code null} if the artifact is not available. 36 */ 37 File findArtifact( Artifact artifact ); 38 39 /** 40 * Determines all available versions of the specified artifact. 41 * 42 * @param artifact The artifact whose versions should be listed, must not be {@code null}. 43 * @return The available versions of the artifact, must not be {@code null}. 44 */ 45 List<String> findVersions( Artifact artifact ); 46 47 }