org.eclipse.aether

## Class RepositoryEvent.Builder

- java.lang.Object
- - org.eclipse.aether.RepositoryEvent.Builder

- Enclosing class:
    RepositoryEvent

      public static final class RepositoryEvent.Builder
      extends Object

  A builder to create events.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `RepositoryEvent.Builder(RepositorySystemSession session, RepositoryEvent.EventType type)` Creates a new event builder for the specified session and event type.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `RepositoryEvent` | `build()` Builds a new event from the current values of this builder.
    `RepositoryEvent.Builder` | `setArtifact(Artifact artifact)` Sets the artifact involved in the event.
    `RepositoryEvent.Builder` | `setException(Exception exception)` Sets the exception causing the event.
    `RepositoryEvent.Builder` | `setExceptions(List<Exception> exceptions)` Sets the exceptions causing the event.
    `RepositoryEvent.Builder` | `setFile(File file)` Sets the file involved in the event.
    `RepositoryEvent.Builder` | `setMetadata(Metadata metadata)` Sets the metadata involved in the event.
    `RepositoryEvent.Builder` | `setRepository(ArtifactRepository repository)` Sets the repository involved in the event.
    `RepositoryEvent.Builder` | `setTrace(RequestTrace trace)` Sets the trace information about the request during which the event occurred.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### RepositoryEvent.Builder

          public RepositoryEvent.Builder(RepositorySystemSession session,
                                 RepositoryEvent.EventType type)

      Creates a new event builder for the specified session and event type.
      Parameters:
        `session` - The repository system session, must not be `null`.
        `type` - The type of the event, must not be `null`.

  - ### Method Detail

    - #### setArtifact

          public RepositoryEvent.Builder setArtifact(Artifact artifact)

      Sets the artifact involved in the event.
      Parameters:
        `artifact` - The involved artifact, may be `null`.
      Returns:
        This event builder for chaining, never `null`.

    - #### setMetadata

          public RepositoryEvent.Builder setMetadata(Metadata metadata)

      Sets the metadata involved in the event.
      Parameters:
        `metadata` - The involved metadata, may be `null`.
      Returns:
        This event builder for chaining, never `null`.

    - #### setRepository

          public RepositoryEvent.Builder setRepository(ArtifactRepository repository)

      Sets the repository involved in the event.
      Parameters:
        `repository` - The involved repository, may be `null`.
      Returns:
        This event builder for chaining, never `null`.

    - #### setFile

          public RepositoryEvent.Builder setFile(File file)

      Sets the file involved in the event.
      Parameters:
        `file` - The involved file, may be `null`.
      Returns:
        This event builder for chaining, never `null`.

    - #### setException

          public RepositoryEvent.Builder setException(Exception exception)

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

    - #### setExceptions

          public RepositoryEvent.Builder setExceptions(List<Exception> exceptions)

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

    - #### setTrace

          public RepositoryEvent.Builder 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 builder for chaining, never `null`.

    - #### build

          public RepositoryEvent build()

      Builds a new event from the current values of this builder. The state of the builder itself remains unchanged.
      Returns:
        The event, never `null`.

Copyright © 2010-2013 The Eclipse Foundation. All Rights Reserved.