org.sonatype.aether.util.listener
Class DefaultRepositoryEvent

java.lang.Object
  extended by org.sonatype.aether.util.listener.DefaultRepositoryEvent
All Implemented Interfaces:
RepositoryEvent

public class DefaultRepositoryEvent
extends Object
implements RepositoryEvent

A simple repository event.

Author:
Benjamin Bentmann

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.sonatype.aether.RepositoryEvent
RepositoryEvent.EventType
 
Constructor Summary
DefaultRepositoryEvent(RepositoryEvent.EventType type, RepositorySystemSession session)
          Deprecated. As of version 1.11, use DefaultRepositoryEvent(org.sonatype.aether.RepositoryEvent.EventType, RepositorySystemSession, RequestTrace) instead.
DefaultRepositoryEvent(RepositoryEvent.EventType type, RepositorySystemSession session, RequestTrace trace)
          Creates a new event with the specified properties.
 
Method Summary
 Artifact getArtifact()
           
 Exception getException()
           
 List<Exception> getExceptions()
           
 File getFile()
           
 Metadata getMetadata()
           
 ArtifactRepository getRepository()
           
 RepositorySystemSession getSession()
           
 RequestTrace getTrace()
           
 RepositoryEvent.EventType getType()
           
 DefaultRepositoryEvent setArtifact(Artifact artifact)
          Sets the artifact involved in the event.
 DefaultRepositoryEvent setException(Exception exception)
          Sets the exception causing the event.
 DefaultRepositoryEvent setExceptions(List<Exception> exceptions)
          Sets the exceptions causing the event.
 DefaultRepositoryEvent setFile(File file)
          Sets the file involved in the event.
 DefaultRepositoryEvent setMetadata(Metadata metadata)
          Sets the metadata involved in the event.
 DefaultRepositoryEvent setRepository(ArtifactRepository repository)
          Sets the repository involved in the event.
 DefaultRepositoryEvent setTrace(RequestTrace trace)
          Sets the trace information about the request during which the event occurred.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefaultRepositoryEvent

@Deprecated
public DefaultRepositoryEvent(RepositoryEvent.EventType type,
                                         RepositorySystemSession session)
Deprecated. As of version 1.11, use DefaultRepositoryEvent(org.sonatype.aether.RepositoryEvent.EventType, RepositorySystemSession, RequestTrace) instead.

Creates a new event with the specified properties.

Parameters:
type - The type of the event, must not be null.
session - The repository system session, must not be null.

DefaultRepositoryEvent

public DefaultRepositoryEvent(RepositoryEvent.EventType type,
                              RepositorySystemSession session,
                              RequestTrace trace)
Creates a new event with the specified properties.

Parameters:
type - The type of the event, must not be null.
session - The repository system session, must not be null.
trace - The trace information, may be null.
Method Detail

getType

public RepositoryEvent.EventType getType()
Specified by:
getType in interface RepositoryEvent

getSession

public RepositorySystemSession getSession()
Specified by:
getSession in interface RepositoryEvent

getArtifact

public Artifact getArtifact()
Specified by:
getArtifact in interface RepositoryEvent

setArtifact

public DefaultRepositoryEvent setArtifact(Artifact artifact)
Sets the artifact involved in the event.

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

getMetadata

public Metadata getMetadata()
Specified by:
getMetadata in interface RepositoryEvent

setMetadata

public DefaultRepositoryEvent setMetadata(Metadata metadata)
Sets the metadata involved in the event.

Parameters:
metadata - The involved metadata, may be null.
Returns:
This event for chaining, never null.

getRepository

public ArtifactRepository getRepository()
Specified by:
getRepository in interface RepositoryEvent

setRepository

public DefaultRepositoryEvent setRepository(ArtifactRepository repository)
Sets the repository involved in the event.

Parameters:
repository - The involved repository, may be null.
Returns:
This event for chaining, never null.

getFile

public File getFile()
Specified by:
getFile in interface RepositoryEvent

setFile

public DefaultRepositoryEvent setFile(File file)
Sets the file involved in the event.

Parameters:
file - The involved file, may be null.
Returns:
This event for chaining, never null.

getException

public Exception getException()
Specified by:
getException in interface RepositoryEvent

setException

public DefaultRepositoryEvent setException(Exception exception)
Sets the exception causing the event.

Parameters:
exception - The exception causing the event, may be null.
Returns:
This event for chaining, never null.

getExceptions

public List<Exception> getExceptions()
Specified by:
getExceptions in interface RepositoryEvent

setExceptions

public DefaultRepositoryEvent setExceptions(List<Exception> exceptions)
Sets the exceptions causing the event.

Parameters:
exceptions - The exceptions causing the event, may be null.
Returns:
This event for chaining, never null.

getTrace

public RequestTrace getTrace()
Specified by:
getTrace in interface RepositoryEvent

setTrace

public DefaultRepositoryEvent setTrace(RequestTrace trace)
Sets the trace information about the request during which the event occurred.

Parameters:
trace - The trace information, may be null.
Returns:
This event for chaining, never null.

toString

public String toString()
Overrides:
toString in class Object


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