1 /*******************************************************************************
2 * Copyright (c) 2010, 2014 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 org
.eclipse
.aether
.RepositoryException
;
14 import org
.eclipse
.aether
.graph
.DependencyNode
;
17 * Transforms a given dependency graph.
19 * <strong>Note:</strong> Implementations must be stateless.
21 * <em>Warning:</em> Dependency graphs may generally contain cycles. As such a graph transformer that cannot assume for
22 * sure that cycles have already been eliminated must gracefully handle cyclic graphs, e.g. guard against infinite
25 * @see org.eclipse.aether.RepositorySystemSession#getDependencyGraphTransformer()
27 public interface DependencyGraphTransformer
31 * Transforms the dependency graph denoted by the specified root node. The transformer may directly change the
32 * provided input graph or create a new graph, the former is recommended for performance reasons.
34 * @param node The root node of the (possibly cyclic!) graph to transform, must not be {@code null}.
35 * @param context The graph transformation context, must not be {@code null}.
36 * @return The result graph of the transformation, never {@code null}.
37 * @throws RepositoryException If the transformation failed.
39 DependencyNode
transformGraph( DependencyNode node
, DependencyGraphTransformationContext context
)
40 throws RepositoryException
;