KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > dialogs > IOverwriteQuery


1 /*******************************************************************************
2  * Copyright (c) 2000, 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.dialogs;
12
13 /**
14  * Implementors of this interface answer one of the prescribed return codes
15  * when asked whether to overwrite a certain path string (which could
16  * represent a resource path, a file system path, etc).
17  */

18 public interface IOverwriteQuery {
19     /**
20      * Return code indicating the operation should be canceled.
21      */

22     public static final String JavaDoc CANCEL = "CANCEL"; //$NON-NLS-1$
23

24     /**
25      * Return code indicating the entity should not be overwritten,
26      * but operation should not be canceled.
27      */

28     public static final String JavaDoc NO = "NO"; //$NON-NLS-1$
29

30     /**
31      * Return code indicating the entity should be overwritten.
32      */

33     public static final String JavaDoc YES = "YES"; //$NON-NLS-1$
34

35     /**
36      * Return code indicating the entity should be overwritten,
37      * and all subsequent entities should be overwritten without prompting.
38      */

39     public static final String JavaDoc ALL = "ALL"; //$NON-NLS-1$
40

41     /**
42      * Return code indicating the entity should not be overwritten,
43      * and all subsequent entities should not be overwritten without prompting.
44      */

45     public static final String JavaDoc NO_ALL = "NOALL"; //$NON-NLS-1$
46

47     /**
48      * Returns one of the return code constants declared on this interface,
49      * indicating whether the entity represented by the passed String should be overwritten.
50      * <p>
51      * This method may be called from a non-UI thread, in which case this method must run the query
52      * in a sync exec in the UI thread, if it needs to query the user.
53      * </p>
54      * @param pathString the path representing the entity to be overwritten
55      * @return one of the return code constants declared on this interface
56      */

57     String JavaDoc queryOverwrite(String JavaDoc pathString);
58 }
59
Popular Tags