1 /******************************************************************************* 2 * Copyright (c) 2010, 2012 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 7 * 8 * Contributors: 9 * Sonatype, Inc. - initial API and implementation 10 *******************************************************************************/ 11 package org.eclipse.aether.collection; 12 13 import org.eclipse.aether.RepositorySystemSession; 14 15 /** 16 * A context used during dependency collection to exchange information within a chain of dependency graph transformers. 17 * 18 * @see DependencyGraphTransformer 19 * @noimplement This interface is not intended to be implemented by clients. 20 * @noextend This interface is not intended to be extended by clients. 21 */ 22 public interface DependencyGraphTransformationContext 23 { 24 25 /** 26 * Gets the repository system session during which the graph transformation happens. 27 * 28 * @return The repository system session, never {@code null}. 29 */ 30 RepositorySystemSession getSession(); 31 32 /** 33 * Gets a keyed value from the context. 34 * 35 * @param key The key used to query the value, must not be {@code null}. 36 * @return The queried value or {@code null} if none. 37 */ 38 Object get( Object key ); 39 40 /** 41 * Puts a keyed value into the context. 42 * 43 * @param key The key used to store the value, must not be {@code null}. 44 * @param value The value to store, may be {@code null} to remove the mapping. 45 * @return The previous value associated with the key or {@code null} if none. 46 */ 47 Object put( Object key, Object value ); 48 49 }