KickJava   Java API By Example, From Geeks To Geeks.

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


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.update.operations;
12
13 import org.eclipse.core.runtime.*;
14 import org.eclipse.update.configuration.*;
15 import org.eclipse.update.core.*;
16
17 /**
18  * This class contains various validation methods to be invoked before or during executing update manager
19  * operations.
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 IOperationValidator {
29
30     /**
31      * Called before performing install.
32      * @return the error status, or null if no errors
33      */

34     public IStatus validatePendingInstall(IFeature oldFeature, IFeature newFeature);
35
36     /**
37      * Called before performing operation.
38      * @return the error status, or null if no errors
39      */

40     public IStatus validatePendingConfig(IFeature feature);
41     
42     /**
43      * Called before performing operation.
44      * @return the error status, or null if no errors
45      */

46     public IStatus validatePendingUnconfig(IFeature feature);
47     
48     /**
49      * Called before performing operation.
50      * @return the error status, or null if no errors
51      */

52     public IStatus validatePendingReplaceVersion(IFeature feature, IFeature anotherFeature);
53     
54     /**
55      * Called before doing a revert/ restore operation
56      * @return the error status, or null if no errors
57      */

58     public IStatus validatePendingRevert(IInstallConfiguration config);
59
60     /**
61      * Called by the UI before doing a batched processing of
62      * several pending changes.
63      * @return the error status, or null if no errors
64      */

65     public IStatus validatePendingChanges(IInstallFeatureOperation[] jobs);
66
67     /**
68      * Check the current state.
69      * @return the error status, or null if no errors
70      */

71     public IStatus validateCurrentState();
72     
73     /**
74      * Checks if the platform configuration has been modified outside this program.
75      * @return the error status, or null if no errors
76      */

77     public IStatus validatePlatformConfigValid();
78 }
79
Popular Tags