KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > update > operations > IOperation


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
12 package org.eclipse.update.operations;
13
14 import java.lang.reflect.*;
15
16 import org.eclipse.core.runtime.*;
17
18 /**
19  * Base update manager operation.
20  * <p>
21  * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
22  * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
23  * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
24  * (repeatedly) as the API evolves.
25  * </p>
26  * @since 3.0
27  */

28 public interface IOperation {
29     /**
30      * Returns true when the operation has been processed.
31      * @return true when the operation completed.
32      */

33     public abstract boolean isProcessed();
34     /**
35      * Marks the operation as processed.
36      */

37     public abstract void markProcessed();
38     /**
39      * Executes operation.
40      * @param pm Progress monitor for the operation
41      * @param listener Operation listener
42      * @return true if operation was successful and a restart is needed.
43      * @throws CoreException
44      * @throws InvocationTargetException
45      */

46     public abstract boolean execute(IProgressMonitor pm, IOperationListener listener) throws CoreException, InvocationTargetException;
47 }
48
Popular Tags