public static final class RepositoryEvent.Builder
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
(package private) Artifact |
artifact |
(package private) java.util.List<java.lang.Exception> |
exceptions |
(package private) java.io.File |
file |
(package private) Metadata |
metadata |
(package private) ArtifactRepository |
repository |
(package private) RepositorySystemSession |
session |
(package private) RequestTrace |
trace |
(package private) RepositoryEvent.EventType |
type |
Constructor and Description |
---|
Builder(RepositorySystemSession session,
RepositoryEvent.EventType type)
Creates a new event builder for the specified session and event type.
|
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(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.
|
RepositoryEvent.EventType type
RepositorySystemSession session
Artifact artifact
Metadata metadata
ArtifactRepository repository
java.io.File file
java.util.List<java.lang.Exception> exceptions
RequestTrace trace
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
.