org.apache.maven.repository.legacy.metadata
Class DefaultMetadataResolutionRequest

java.lang.Object
  extended by org.apache.maven.repository.legacy.metadata.DefaultMetadataResolutionRequest
All Implemented Interfaces:
RepositoryRequest, MetadataResolutionRequest

public class DefaultMetadataResolutionRequest
extends Object
implements MetadataResolutionRequest

Forms a request to retrieve artifact metadata.

Author:
Benjamin Bentmann

Constructor Summary
DefaultMetadataResolutionRequest()
           
DefaultMetadataResolutionRequest(ArtifactResolutionRequest resolutionRequest)
           
DefaultMetadataResolutionRequest(RepositoryRequest repositoryRequest)
           
 
Method Summary
 Artifact getArtifact()
          Gets the artifact to resolve metadata for.
 ArtifactRepository getLocalRepository()
          Gets the local repository to use for the resolution.
 List<ArtifactRepository> getRemoteRepositories()
          Gets the remote repositories to use for the resolution.
 boolean isForceUpdate()
          Indicates whether remote repositories should be re-checked for updated artifacts/metadata regardless of their configured update policy.
 boolean isOffline()
          Indicates whether network access to remote repositories has been disabled.
 boolean isResolveManagedVersions()
          Determines whether the managed version information should be retrieved.
 DefaultMetadataResolutionRequest setArtifact(Artifact artifact)
          Sets the artifact for which to resolve metadata.
 DefaultMetadataResolutionRequest setForceUpdate(boolean forceUpdate)
          Enables/disabled forced checks for updated artifacts/metadata on remote repositories.
 DefaultMetadataResolutionRequest setLocalRepository(ArtifactRepository localRepository)
          Sets the local repository to use for the resolution.
 DefaultMetadataResolutionRequest setOffline(boolean offline)
          Enables/disables network access to remote repositories.
 DefaultMetadataResolutionRequest setRemoteRepositories(List<ArtifactRepository> remoteRepositories)
          Sets the remote repositories to use for the resolution.
 DefaultMetadataResolutionRequest setResolveManagedVersions(boolean resolveManagedVersions)
          Enables/disables resolution of the dependency manageemnt information.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultMetadataResolutionRequest

public DefaultMetadataResolutionRequest()

DefaultMetadataResolutionRequest

public DefaultMetadataResolutionRequest(RepositoryRequest repositoryRequest)

DefaultMetadataResolutionRequest

public DefaultMetadataResolutionRequest(ArtifactResolutionRequest resolutionRequest)
Method Detail

getArtifact

public Artifact getArtifact()
Description copied from interface: MetadataResolutionRequest
Gets the artifact to resolve metadata for.

Specified by:
getArtifact in interface MetadataResolutionRequest
Returns:
The artifact to resolve metadata for or null if not set.

setArtifact

public DefaultMetadataResolutionRequest setArtifact(Artifact artifact)
Description copied from interface: MetadataResolutionRequest
Sets the artifact for which to resolve metadata.

Specified by:
setArtifact in interface MetadataResolutionRequest
Parameters:
artifact - The artifact for which to resolve metadata.
Returns:
This request, never null.

getLocalRepository

public ArtifactRepository getLocalRepository()
Description copied from interface: MetadataResolutionRequest
Gets the local repository to use for the resolution.

Specified by:
getLocalRepository in interface RepositoryRequest
Specified by:
getLocalRepository in interface MetadataResolutionRequest
Returns:
The local repository to use for the resolution or null if not set.

setLocalRepository

public DefaultMetadataResolutionRequest setLocalRepository(ArtifactRepository localRepository)
Description copied from interface: MetadataResolutionRequest
Sets the local repository to use for the resolution.

Specified by:
setLocalRepository in interface RepositoryRequest
Specified by:
setLocalRepository in interface MetadataResolutionRequest
Parameters:
localRepository - The local repository to use for the resolution.
Returns:
This request, never null.

getRemoteRepositories

public List<ArtifactRepository> getRemoteRepositories()
Description copied from interface: MetadataResolutionRequest
Gets the remote repositories to use for the resolution.

Specified by:
getRemoteRepositories in interface RepositoryRequest
Specified by:
getRemoteRepositories in interface MetadataResolutionRequest
Returns:
The remote repositories to use for the resolution, never null.

setRemoteRepositories

public DefaultMetadataResolutionRequest setRemoteRepositories(List<ArtifactRepository> remoteRepositories)
Description copied from interface: MetadataResolutionRequest
Sets the remote repositories to use for the resolution.

Specified by:
setRemoteRepositories in interface RepositoryRequest
Specified by:
setRemoteRepositories in interface MetadataResolutionRequest
Parameters:
remoteRepositories - The remote repositories to use for the resolution.
Returns:
This request, never null.

isResolveManagedVersions

public boolean isResolveManagedVersions()
Description copied from interface: MetadataResolutionRequest
Determines whether the managed version information should be retrieved.

Specified by:
isResolveManagedVersions in interface MetadataResolutionRequest
Returns:
true if the dependency management information should be retrieved, false otherwise.

setResolveManagedVersions

public DefaultMetadataResolutionRequest setResolveManagedVersions(boolean resolveManagedVersions)
Description copied from interface: MetadataResolutionRequest
Enables/disables resolution of the dependency manageemnt information.

Specified by:
setResolveManagedVersions in interface MetadataResolutionRequest
Parameters:
resolveManagedVersions - true if the dependency management information should be retrieved, false otherwise.
Returns:
This request, never null.

isOffline

public boolean isOffline()
Description copied from interface: MetadataResolutionRequest
Indicates whether network access to remote repositories has been disabled.

Specified by:
isOffline in interface RepositoryRequest
Specified by:
isOffline in interface MetadataResolutionRequest
Returns:
true if remote access has been disabled, false otherwise.

setOffline

public DefaultMetadataResolutionRequest setOffline(boolean offline)
Description copied from interface: MetadataResolutionRequest
Enables/disables network access to remote repositories.

Specified by:
setOffline in interface RepositoryRequest
Specified by:
setOffline in interface MetadataResolutionRequest
Parameters:
offline - true to disable remote access, false to allow network access.
Returns:
This request, never null.

isForceUpdate

public boolean isForceUpdate()
Description copied from interface: RepositoryRequest
Indicates whether remote repositories should be re-checked for updated artifacts/metadata regardless of their configured update policy.

Specified by:
isForceUpdate in interface RepositoryRequest
Returns:
true if remote repositories should be re-checked for updated artifacts/metadata, false otherwise.

setForceUpdate

public DefaultMetadataResolutionRequest setForceUpdate(boolean forceUpdate)
Description copied from interface: RepositoryRequest
Enables/disabled forced checks for updated artifacts/metadata on remote repositories.

Specified by:
setForceUpdate in interface RepositoryRequest
Parameters:
forceUpdate - true to forcibly check the remote repositories for updated artifacts/metadata, false to use the update policy configured on each repository.
Returns:
This request, never null.


Copyright © 2001-2013 The Apache Software Foundation. All Rights Reserved.