View Javadoc
1   /*******************************************************************************
2    * Copyright (c) 2010, 2012 Sonatype, Inc.
3    * All rights reserved. This program and the accompanying materials
4    * are made available under the terms of the Eclipse Public License v1.0
5    * which accompanies this distribution, and is available at
6    * http://www.eclipse.org/legal/epl-v10.html
7    *
8    * Contributors:
9    *    Sonatype, Inc. - initial API and implementation
10   *******************************************************************************/
11  package org.eclipse.aether.repository;
12  
13  import java.io.File;
14  import java.util.List;
15  
16  import org.eclipse.aether.artifact.Artifact;
17  
18  /**
19   * Manages a repository backed by the IDE workspace, a build session or a similar ad-hoc collection of artifacts.
20   * 
21   * @see org.eclipse.aether.RepositorySystemSession#getWorkspaceReader()
22   */
23  public interface WorkspaceReader
24  {
25  
26      /**
27       * Gets a description of the workspace repository.
28       * 
29       * @return The repository description, never {@code null}.
30       */
31      WorkspaceRepository getRepository();
32  
33      /**
34       * Locates the specified artifact.
35       * 
36       * @param artifact The artifact to locate, must not be {@code null}.
37       * @return The path to the artifact or {@code null} if the artifact is not available.
38       */
39      File findArtifact( Artifact artifact );
40  
41      /**
42       * Determines all available versions of the specified artifact.
43       * 
44       * @param artifact The artifact whose versions should be listed, must not be {@code null}.
45       * @return The available versions of the artifact, must not be {@code null}.
46       */
47      List<String> findVersions( Artifact artifact );
48  
49  }