KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > core > filebuffers > IStateValidationSupport


1 /*******************************************************************************
2  * Copyright (c) 2000, 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.filebuffers;
12
13 import org.eclipse.core.runtime.IStatus;
14
15 /**
16  * Implementers of {@link org.eclipse.core.filebuffers.IFileBuffer} may also
17  * implement <code>IStateValidationSupport</code> in order to allow a
18  * {@link org.eclipse.core.filebuffers.IFileBufferManager} to batch the stages
19  * of state validation when calling
20  * {@link org.eclipse.core.filebuffers.IFileBufferManager#validateState(IFileBuffer[], org.eclipse.core.runtime.IProgressMonitor, Object)}.
21  *
22  * @see org.eclipse.core.filebuffers.IFileBuffer
23  * @since 3.1
24  */

25 public interface IStateValidationSupport {
26
27     /**
28      * Tells this buffer that the validation state is about to be changed. File
29      * buffer listeners will receive a
30      * {@link IFileBufferListener#stateChanging(IFileBuffer)} notification in
31      * response.
32      */

33     void validationStateAboutToBeChanged();
34
35     /**
36      * Tells this buffer that the validation state has been changed to the given
37      * value. After that call, {@link IFileBuffer#isStateValidated()} will
38      * return the given value. Also {@link IFileBuffer#getStatus()} will returns
39      * the provided status. File buffer listeners will receive a
40      * {@link IFileBufferListener#stateValidationChanged(IFileBuffer, boolean)}
41      * notification.
42      *
43      * @param validationState <code>true</code> if validated,
44      * <code>false</code> otherwise
45      * @param status the status of the executed validate state operation
46      */

47     void validationStateChanged(boolean validationState, IStatus status);
48
49     /**
50      * Tells this buffer that a initiated state validation failed. File buffer
51      * listeners will receive a
52      * {@link IFileBufferListener#stateChangeFailed(IFileBuffer)} notification
53      * in response.
54      */

55     void validationStateChangeFailed();
56 }
57
Popular Tags