public final class CollectRequest extends java.lang.Object
| Constructor | Description |
|---|---|
CollectRequest() |
Creates an uninitialized request.
|
CollectRequest(java.util.List<Dependency> dependencies,
java.util.List<Dependency> managedDependencies,
java.util.List<RemoteRepository> repositories) |
Creates a new request with the specified properties.
|
CollectRequest(Dependency root,
java.util.List<Dependency> dependencies,
java.util.List<RemoteRepository> repositories) |
Creates a new request with the specified properties.
|
CollectRequest(Dependency root,
java.util.List<RemoteRepository> repositories) |
Creates a request with the specified properties.
|
| Modifier and Type | Method | Description |
|---|---|---|
CollectRequest |
addDependency(Dependency dependency) |
Adds the specified direct dependency.
|
CollectRequest |
addManagedDependency(Dependency managedDependency) |
Adds the specified managed dependency.
|
CollectRequest |
addRepository(RemoteRepository repository) |
Adds the specified repository for collection.
|
java.util.List<Dependency> |
getDependencies() |
Gets the direct dependencies.
|
java.util.List<Dependency> |
getManagedDependencies() |
Gets the dependency management to apply to transitive dependencies.
|
java.util.List<RemoteRepository> |
getRepositories() |
Gets the repositories to use for the collection.
|
java.lang.String |
getRequestContext() |
Gets the context in which this request is made.
|
Dependency |
getRoot() |
Gets the root dependency of the graph.
|
Artifact |
getRootArtifact() |
Gets the root artifact for the dependency graph.
|
RequestTrace |
getTrace() |
Gets the trace information that describes the higher level request/operation in which this request is issued.
|
CollectRequest |
setDependencies(java.util.List<Dependency> dependencies) |
Sets the direct dependencies.
|
CollectRequest |
setManagedDependencies(java.util.List<Dependency> managedDependencies) |
Sets the dependency management to apply to transitive dependencies.
|
CollectRequest |
setRepositories(java.util.List<RemoteRepository> repositories) |
Sets the repositories to use for the collection.
|
CollectRequest |
setRequestContext(java.lang.String context) |
Sets the context in which this request is made.
|
CollectRequest |
setRoot(Dependency root) |
Sets the root dependency of the graph.
|
CollectRequest |
setRootArtifact(Artifact rootArtifact) |
Sets the root artifact for the dependency graph.
|
CollectRequest |
setTrace(RequestTrace trace) |
Sets the trace information that describes the higher level request/operation in which this request is issued.
|
java.lang.String |
toString() |
public CollectRequest()
public CollectRequest(Dependency root, java.util.List<RemoteRepository> repositories)
root - The root dependency whose transitive dependencies should be collected, may be null.repositories - The repositories to use for the collection, may be null.public CollectRequest(Dependency root, java.util.List<Dependency> dependencies, java.util.List<RemoteRepository> repositories)
root - The root dependency whose transitive dependencies should be collected, may be null.dependencies - The direct dependencies to merge with the direct dependencies from the root dependency's
artifact descriptor.repositories - The repositories to use for the collection, may be null.public CollectRequest(java.util.List<Dependency> dependencies, java.util.List<Dependency> managedDependencies, java.util.List<RemoteRepository> repositories)
dependencies - The direct dependencies of some imaginary root, may be null.managedDependencies - The dependency management information to apply to the transitive dependencies, may be
null.repositories - The repositories to use for the collection, may be null.public Artifact getRootArtifact()
null if none.public CollectRequest setRootArtifact(Artifact rootArtifact)
setRoot(Dependency): The
root dependency, like any other specified dependency, will be subject to dependency
collection/resolution, i.e. should have an artifact descriptor and a corresponding artifact file. The root
artifact on the other hand is only used as a label for the root node of the graph in case no root
dependency was specified. As such, the configured root artifact is ignored if getRoot() does not return
null.rootArtifact - The root artifact for the dependency graph, may be null.null.public Dependency getRoot()
null if none.public CollectRequest setRoot(Dependency root)
root - The root dependency of the graph, may be null.null.public java.util.List<Dependency> getDependencies()
null.public CollectRequest setDependencies(java.util.List<Dependency> dependencies)
dependencies - The direct dependencies, may be null.null.public CollectRequest addDependency(Dependency dependency)
dependency - The dependency to add, may be null.null.public java.util.List<Dependency> getManagedDependencies()
null.public CollectRequest setManagedDependencies(java.util.List<Dependency> managedDependencies)
managedDependencies - The dependency management, may be null.null.public CollectRequest addManagedDependency(Dependency managedDependency)
managedDependency - The managed dependency to add, may be null.null.public java.util.List<RemoteRepository> getRepositories()
null.public CollectRequest setRepositories(java.util.List<RemoteRepository> repositories)
repositories - The repositories to use for the collection, may be null.null.public CollectRequest addRepository(RemoteRepository repository)
repository - The repository to collect dependency information from, may be null.null.public java.lang.String getRequestContext()
null.public CollectRequest setRequestContext(java.lang.String context)
context - The context, may be null.null.public RequestTrace getTrace()
null if none.public CollectRequest setTrace(RequestTrace trace)
trace - The trace information about the higher level operation, may be null.null.public java.lang.String toString()
toString in class java.lang.Object