org.sonatype.aether.repository
Class LocalArtifactRequest

java.lang.Object
  extended by org.sonatype.aether.repository.LocalArtifactRequest

public class LocalArtifactRequest
extends java.lang.Object

A query to the local repository for the existence of an artifact.

Author:
Benjamin Bentmann
See Also:
LocalRepositoryManager.find(RepositorySystemSession, LocalArtifactRequest)

Constructor Summary
LocalArtifactRequest()
          Creates an uninitialized query.
LocalArtifactRequest(Artifact artifact, java.util.List<RemoteRepository> repositories, java.lang.String context)
          Creates a query with the specified properties.
 
Method Summary
 Artifact getArtifact()
          Gets the artifact to query for.
 java.lang.String getContext()
          Gets the resolution context.
 java.util.List<RemoteRepository> getRepositories()
          Gets the remote repositories to consider as sources of the artifact.
 LocalArtifactRequest setArtifact(Artifact artifact)
          Sets the artifact to query for.
 LocalArtifactRequest setContext(java.lang.String context)
          Sets the resolution context.
 LocalArtifactRequest setRepositories(java.util.List<RemoteRepository> repositories)
          Sets the remote repositories to consider as sources of the artifact.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LocalArtifactRequest

public LocalArtifactRequest()
Creates an uninitialized query.


LocalArtifactRequest

public LocalArtifactRequest(Artifact artifact,
                            java.util.List<RemoteRepository> repositories,
                            java.lang.String context)
Creates a query with the specified properties.

Parameters:
artifact - The artifact to query for, may be null.
repositories - The remote repositories that should be considered as potential sources for the artifact, may be null.
context - The resolution context for the artifact, may be null.
Method Detail

getArtifact

public Artifact getArtifact()
Gets the artifact to query for.

Returns:
The artifact or null if not set.

setArtifact

public LocalArtifactRequest setArtifact(Artifact artifact)
Sets the artifact to query for.

Parameters:
artifact - The artifact, may be null.
Returns:
This query for chaining, never null.

getContext

public java.lang.String getContext()
Gets the resolution context.

Returns:
The resolution context, never null.

setContext

public LocalArtifactRequest setContext(java.lang.String context)
Sets the resolution context.

Parameters:
context - The resolution context, may be null.
Returns:
This query for chaining, never null.

getRepositories

public java.util.List<RemoteRepository> getRepositories()
Gets the remote repositories to consider as sources of the artifact.

Returns:
The remote repositories, never null.

setRepositories

public LocalArtifactRequest setRepositories(java.util.List<RemoteRepository> repositories)
Sets the remote repositories to consider as sources of the artifact.

Parameters:
repositories - The remote repositories, may be null.
Returns:
This query for chaining, never null.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2010-2011 Sonatype, Inc.. All Rights Reserved.