1 /*******************************************************************************
2 * Copyright (c) 2010, 2013 Sonatype, Inc.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
9 * Sonatype, Inc. - initial API and implementation
10 *******************************************************************************/
11 package org
.eclipse
.aether
.collection
;
13 import java
.util
.List
;
15 import org
.eclipse
.aether
.RepositorySystemSession
;
16 import org
.eclipse
.aether
.artifact
.Artifact
;
17 import org
.eclipse
.aether
.graph
.Dependency
;
20 * A context used during dependency collection to update the dependency manager, selector and traverser.
22 * @see DependencyManager#deriveChildManager(DependencyCollectionContext)
23 * @see DependencyTraverser#deriveChildTraverser(DependencyCollectionContext)
24 * @see DependencySelector#deriveChildSelector(DependencyCollectionContext)
25 * @see VersionFilter#deriveChildFilter(DependencyCollectionContext)
26 * @noimplement This interface is not intended to be implemented by clients.
27 * @noextend This interface is not intended to be extended by clients.
29 public interface DependencyCollectionContext
33 * Gets the repository system session during which the dependency collection happens.
35 * @return The repository system session, never {@code null}.
37 RepositorySystemSession
getSession();
40 * Gets the artifact whose children are to be processed next during dependency collection. For all nodes but the
41 * root, this is simply shorthand for {@code getDependency().getArtifact()}. In case of the root node however,
42 * {@link #getDependency()} might be {@code null} while the node still has an artifact which serves as its label and
43 * is not to be resolved.
45 * @return The artifact whose children are going to be processed or {@code null} in case of the root node without
46 * dependency and label.
48 Artifact
getArtifact();
51 * Gets the dependency whose children are to be processed next during dependency collection.
53 * @return The dependency whose children are going to be processed or {@code null} in case of the root node without
56 Dependency
getDependency();
59 * Gets the dependency management information that was contributed by the artifact descriptor of the current
62 * @return The dependency management information, never {@code null}.
64 List
<Dependency
> getManagedDependencies();