public static final class RepositoryEvent.Builder extends java.lang.Object
| Constructor | Description |
|---|---|
Builder(RepositorySystemSession session,
RepositoryEvent.EventType type) |
Creates a new event builder for the specified session and event type.
|
| Modifier and Type | Method | 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(java.lang.Exception exception) |
Sets the exception causing the event.
|
RepositoryEvent.Builder |
setExceptions(java.util.List<java.lang.Exception> exceptions) |
Sets the exceptions causing the event.
|
RepositoryEvent.Builder |
setFile(java.io.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.
|
public Builder(RepositorySystemSession session, RepositoryEvent.EventType type)
session - The repository system session, must not be null.type - The type of the event, must not be null.public RepositoryEvent.Builder setArtifact(Artifact artifact)
artifact - The involved artifact, may be null.null.public RepositoryEvent.Builder setMetadata(Metadata metadata)
metadata - The involved metadata, may be null.null.public RepositoryEvent.Builder setRepository(ArtifactRepository repository)
repository - The involved repository, may be null.null.public RepositoryEvent.Builder setFile(java.io.File file)
file - The involved file, may be null.null.public RepositoryEvent.Builder setException(java.lang.Exception exception)
exception - The exception causing the event, may be null.null.public RepositoryEvent.Builder setExceptions(java.util.List<java.lang.Exception> exceptions)
exceptions - The exceptions causing the event, may be null.null.public RepositoryEvent.Builder setTrace(RequestTrace trace)
trace - The trace information, may be null.null.public RepositoryEvent build()
null.