public static final class RepositoryEvent.Builder extends Object
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(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.
|
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(File file)
file
- The involved file, may be null
.null
.public RepositoryEvent.Builder setException(Exception exception)
exception
- The exception causing the event, may be null
.null
.public RepositoryEvent.Builder setExceptions(List<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
.Copyright © 2010–2021 The Apache Software Foundation. All rights reserved.