1 /******************************************************************************* 2 * Copyright (c) 2004, 2005 IBM Corporation and others. 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 * IBM Corporation - initial API and implementation 10 *******************************************************************************/ 11 package org.eclipse.core.internal.resources.mapping; 12 13 14 /** 15 * A resource mapping context is provided to a resource mapping when traversing 16 * the resources of the mapping. The type of context may determine what resources 17 * are included in the traversals of a mapping. 18 * <p> 19 * There are currently two resource mapping contexts: the local mapping context 20 * (represented by the singleton {@link #LOCAL_CONTEXT}), 21 * and {@link RemoteResourceMappingContext}. Implementors of {@link ResourceMapping} 22 * should not assume that these are the only valid contexts (in order to allow future 23 * extensibility). Therefore, if the provided context is not of one of the above mentioed types, 24 * the implementor can assume that the context is a local context. 25 * </p> 26 * <p> 27 * This class may be subclassed by clients; this class is not intended to be 28 * instantiated directly. 29 * </p> 30 * 31 * @see ResourceMapping 32 * @see RemoteResourceMappingContext 33 * @since 3.1 34 */ 35 public class ResourceMappingContext { 36 37 /** 38 * This resource mapping context is used to indicate that the operation 39 * that is requesting the traversals is performing a local operation. 40 * Because the operation is local, the resource mapping is free to be 41 * as precise as desired about what resources make up the mapping without 42 * concern for performing optimized remote operations. 43 */ 44 public static final ResourceMappingContext LOCAL_CONTEXT = new ResourceMappingContext(); 45 46 } 47