|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.sonatype.aether.collection.CollectRequest
public class CollectRequest
A request to collect the transitive dependencies and to build a dependency graph from them. There are three ways to create a dependency graph. First, only the root dependency can be given. Second, a root dependency and direct dependencies can be specified in which case the specified direct dependencies are merged with the direct dependencies retrieved from the artifact descriptor of the root dependency. And last, only direct dependencies can be specified in which case the root node of the resulting graph has no associated dependency.
RepositorySystem.collectDependencies(RepositorySystemSession, CollectRequest)
Constructor Summary | |
---|---|
CollectRequest()
Creates an unitialized request. |
|
CollectRequest(Dependency root,
List<Dependency> dependencies,
List<RemoteRepository> repositories)
Creates a new request with the specified properties. |
|
CollectRequest(Dependency root,
List<RemoteRepository> repositories)
Creates a request with the specified properties. |
|
CollectRequest(List<Dependency> dependencies,
List<Dependency> managedDependencies,
List<RemoteRepository> repositories)
Creates a new request with the specified properties. |
Method Summary | |
---|---|
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. |
List<Dependency> |
getDependencies()
Gets the direct dependencies. |
List<Dependency> |
getManagedDependencies()
Gets the dependency management to apply to transitive dependencies. |
List<RemoteRepository> |
getRepositories()
Gets the repositories to use for the collection. |
String |
getRequestContext()
Gets the context in which this request is made. |
Dependency |
getRoot()
Gets the root dependency of the graph. |
RequestTrace |
getTrace()
Gets the trace information that describes the higher level request/operation in which this request is issued. |
CollectRequest |
setDependencies(List<Dependency> dependencies)
Sets the direct dependencies. |
CollectRequest |
setManagedDependencies(List<Dependency> managedDependencies)
Sets the dependency management to apply to transitive dependencies. |
CollectRequest |
setRepositories(List<RemoteRepository> repositories)
Sets the repositories to use for the collection. |
CollectRequest |
setRequestContext(String context)
Sets the context in which this request is made. |
CollectRequest |
setRoot(Dependency root)
Sets the root dependency of the graph. |
CollectRequest |
setTrace(RequestTrace trace)
Sets the trace information that describes the higher level request/operation in which this request is issued. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public CollectRequest()
public CollectRequest(Dependency root, 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, List<Dependency> dependencies, 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(List<Dependency> dependencies, List<Dependency> managedDependencies, 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
.Method Detail |
---|
public Dependency getRoot()
null
if none.public CollectRequest setRoot(Dependency root)
root
- The root dependency of the graph, may be null
.
null
.public List<Dependency> getDependencies()
null
.public CollectRequest setDependencies(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 List<Dependency> getManagedDependencies()
null
.public CollectRequest setManagedDependencies(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 List<RemoteRepository> getRepositories()
null
.public CollectRequest setRepositories(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 String getRequestContext()
null
.public CollectRequest setRequestContext(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 String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |