X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=org.argeo.slc.repo%2Fsrc%2Forg%2Feclipse%2Faether%2Fcollection%2FDependencyCollectionContext.java;fp=org.argeo.slc.repo%2Fsrc%2Forg%2Feclipse%2Faether%2Fcollection%2FDependencyCollectionContext.java;h=3b8fbc204c0c1d41e25ba024b0bcbc4c7c77053d;hb=825d60c5348dbe3f5be25b0bccf7bdebfe694219;hp=0000000000000000000000000000000000000000;hpb=5e991fff5cba01858dcc5747a27e637325bc5c8e;p=gpl%2Fargeo-jcr.git diff --git a/org.argeo.slc.repo/src/org/eclipse/aether/collection/DependencyCollectionContext.java b/org.argeo.slc.repo/src/org/eclipse/aether/collection/DependencyCollectionContext.java new file mode 100644 index 0000000..3b8fbc2 --- /dev/null +++ b/org.argeo.slc.repo/src/org/eclipse/aether/collection/DependencyCollectionContext.java @@ -0,0 +1,66 @@ +/******************************************************************************* + * Copyright (c) 2010, 2013 Sonatype, Inc. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Sonatype, Inc. - initial API and implementation + *******************************************************************************/ +package org.eclipse.aether.collection; + +import java.util.List; + +import org.eclipse.aether.RepositorySystemSession; +import org.eclipse.aether.artifact.Artifact; +import org.eclipse.aether.graph.Dependency; + +/** + * A context used during dependency collection to update the dependency manager, selector and traverser. + * + * @see DependencyManager#deriveChildManager(DependencyCollectionContext) + * @see DependencyTraverser#deriveChildTraverser(DependencyCollectionContext) + * @see DependencySelector#deriveChildSelector(DependencyCollectionContext) + * @see VersionFilter#deriveChildFilter(DependencyCollectionContext) + * @noimplement This interface is not intended to be implemented by clients. + * @noextend This interface is not intended to be extended by clients. + */ +public interface DependencyCollectionContext +{ + + /** + * Gets the repository system session during which the dependency collection happens. + * + * @return The repository system session, never {@code null}. + */ + RepositorySystemSession getSession(); + + /** + * Gets the artifact whose children are to be processed next during dependency collection. For all nodes but the + * root, this is simply shorthand for {@code getDependency().getArtifact()}. In case of the root node however, + * {@link #getDependency()} might be {@code null} while the node still has an artifact which serves as its label and + * is not to be resolved. + * + * @return The artifact whose children are going to be processed or {@code null} in case of the root node without + * dependency and label. + */ + Artifact getArtifact(); + + /** + * Gets the dependency whose children are to be processed next during dependency collection. + * + * @return The dependency whose children are going to be processed or {@code null} in case of the root node without + * dependency. + */ + Dependency getDependency(); + + /** + * Gets the dependency management information that was contributed by the artifact descriptor of the current + * dependency. + * + * @return The dependency management information, never {@code null}. + */ + List getManagedDependencies(); + +}