1 /******************************************************************************* 2 * Copyright (c) 2005, 2006 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.ui.preferences; 12 13 import org.eclipse.core.runtime.preferences.IEclipsePreferences; 14 import org.osgi.service.prefs.BackingStoreException; 15 16 /** 17 * IWorkingCopyManager is the interface for the working copy 18 * support for references to shared preference nodes. 19 * @since 3.1 20 * 21 */ 22 public interface IWorkingCopyManager { 23 /** 24 * Return a working copy instance based on the given preference node. If a 25 * working copy already exists then return it, otherwise create one and keep 26 * track of it for other clients who are looking for it. 27 * 28 * @param original 29 * the original node 30 * @return the working copy node 31 */ 32 public IEclipsePreferences getWorkingCopy(IEclipsePreferences original); 33 34 /** 35 * Apply the changes for <em>all</em> working copies, to their original 36 * preference nodes. Alternatively, if a client wishes to apply the changes 37 * for a single working copy they can call <code>#flush</code> on that 38 * working copy node. 39 * 40 * @throws BackingStoreException 41 * if there were problems accessing the backing store 42 */ 43 public void applyChanges() throws BackingStoreException; 44 45 46 } 47