org.sonatype.aether.installation
Class InstallResult

java.lang.Object
  extended by org.sonatype.aether.installation.InstallResult

public class InstallResult
extends java.lang.Object

The result of installing artifacts and their accompanying metadata into the a remote repository.

Author:
Benjamin Bentmann
See Also:
RepositorySystem.install(RepositorySystemSession, InstallRequest)

Constructor Summary
InstallResult(InstallRequest request)
          Creates a new result for the specified request.
 
Method Summary
 InstallResult addArtifact(Artifact artifact)
          Adds the specified artifacts to the result.
 InstallResult addMetadata(Metadata metadata)
          Adds the specified metadata to this result.
 java.util.Collection<Artifact> getArtifacts()
          Gets the artifact that got installed.
 java.util.Collection<Metadata> getMetadata()
          Gets the metadata that got installed.
 InstallRequest getRequest()
          Gets the install request that was made.
 InstallResult setArtifacts(java.util.Collection<Artifact> artifacts)
          Sets the artifacts that got installed.
 InstallResult setMetadata(java.util.Collection<Metadata> metadata)
          Sets the metadata that got installed.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InstallResult

public InstallResult(InstallRequest request)
Creates a new result for the specified request.

Parameters:
request - The installation request, must not be null.
Method Detail

getRequest

public InstallRequest getRequest()
Gets the install request that was made.

Returns:
The install request, never null.

getArtifacts

public java.util.Collection<Artifact> getArtifacts()
Gets the artifact that got installed.

Returns:
The artifacts to install, never null.

setArtifacts

public InstallResult setArtifacts(java.util.Collection<Artifact> artifacts)
Sets the artifacts that got installed.

Parameters:
artifacts - The installed artifacts, may be null.
Returns:
This result for chaining, never null.

addArtifact

public InstallResult addArtifact(Artifact artifact)
Adds the specified artifacts to the result.

Parameters:
artifact - The installed artifact to add, may be null.
Returns:
This result for chaining, never null.

getMetadata

public java.util.Collection<Metadata> getMetadata()
Gets the metadata that got installed. Note that due to automatically generated metadata, there might have been more metadata installed than originally specified in the install request.

Returns:
The installed metadata, never null.

setMetadata

public InstallResult setMetadata(java.util.Collection<Metadata> metadata)
Sets the metadata that got installed.

Parameters:
metadata - The installed metadata, may be null.
Returns:
This result for chaining, never null.

addMetadata

public InstallResult addMetadata(Metadata metadata)
Adds the specified metadata to this result.

Parameters:
metadata - The installed metadata to add, may be null.
Returns:
This result for chaining, never null.

toString

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


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