X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=org.argeo.slc.repo%2Fsrc%2Forg%2Feclipse%2Faether%2Fcollection%2FDependencyGraphTransformationContext.java;fp=org.argeo.slc.repo%2Fsrc%2Forg%2Feclipse%2Faether%2Fcollection%2FDependencyGraphTransformationContext.java;h=d3980da74733cacc1950a14b1b5b172250ddf16b;hb=825d60c5348dbe3f5be25b0bccf7bdebfe694219;hp=0000000000000000000000000000000000000000;hpb=5e991fff5cba01858dcc5747a27e637325bc5c8e;p=gpl%2Fargeo-jcr.git diff --git a/org.argeo.slc.repo/src/org/eclipse/aether/collection/DependencyGraphTransformationContext.java b/org.argeo.slc.repo/src/org/eclipse/aether/collection/DependencyGraphTransformationContext.java new file mode 100644 index 0000000..d3980da --- /dev/null +++ b/org.argeo.slc.repo/src/org/eclipse/aether/collection/DependencyGraphTransformationContext.java @@ -0,0 +1,49 @@ +/******************************************************************************* + * Copyright (c) 2010, 2012 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 org.eclipse.aether.RepositorySystemSession; + +/** + * A context used during dependency collection to exchange information within a chain of dependency graph transformers. + * + * @see DependencyGraphTransformer + * @noimplement This interface is not intended to be implemented by clients. + * @noextend This interface is not intended to be extended by clients. + */ +public interface DependencyGraphTransformationContext +{ + + /** + * Gets the repository system session during which the graph transformation happens. + * + * @return The repository system session, never {@code null}. + */ + RepositorySystemSession getSession(); + + /** + * Gets a keyed value from the context. + * + * @param key The key used to query the value, must not be {@code null}. + * @return The queried value or {@code null} if none. + */ + Object get( Object key ); + + /** + * Puts a keyed value into the context. + * + * @param key The key used to store the value, must not be {@code null}. + * @param value The value to store, may be {@code null} to remove the mapping. + * @return The previous value associated with the key or {@code null} if none. + */ + Object put( Object key, Object value ); + +}