KickJava   Java API By Example, From Geeks To Geeks.

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


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

27 public interface IOperationFactory {
28     /**
29      * Creates an operation for configuring an installed feature in the specified site.
30      * @param targetSite site containing the feature to configure
31      * @param feature feature to be configured
32      * @return the configure operation
33      */

34     public IConfigFeatureOperation createConfigOperation(
35         IConfiguredSite targetSite,
36         IFeature feature);
37         
38     /**
39      * Creates an operation for unconfiguring a feature
40      * @param targetSite site containing the feature to unconfigure
41      * @param feature feature to be unconfigured
42      * @return the unconfigure operation
43      */

44     public IUnconfigFeatureOperation createUnconfigOperation(
45         IConfiguredSite targetSite,
46         IFeature feature);
47     
48     /**
49      * Creates an operation for installing a feature.
50      * @param targetSite site in which the feature is to be installed
51      * @param feature feature to be installed
52      * @param optionalFeatures optionally included features to be installed (if any)
53      * @param unconfiguredOptionalFeatures when installing optional features, some can be left unconfigured
54      * @param verifier operation verification listener
55      * @return the install operation
56      */

57     public IInstallFeatureOperation createInstallOperation(
58         IConfiguredSite targetSite,
59         IFeature feature,
60         IFeatureReference[] optionalFeatures,
61         IFeature[] unconfiguredOptionalFeatures,
62         IVerificationListener verifier);
63         
64     /**
65      * Creates an operation to uninstall a feature
66      * @param targetSite site containing the feature to uninstall
67      * @param feature feature to be uninstalled
68      * @return the uninstall operation
69      */

70     public IUninstallFeatureOperation createUninstallOperation(
71         IConfiguredSite targetSite,
72         IFeature feature);
73         
74     /**
75      * Creates an operation for replacing this feature by a previous version
76      * @param feature current feature
77      * @param anotherFeature the new feature to be swapped in
78      * @return the revert feature version operation
79      */

80     public IConfigFeatureOperation createReplaceFeatureVersionOperation(
81         IFeature feature,
82         IFeature anotherFeature);
83         
84     /**
85      * Creates an operation for executing a set of feature operation in batch mode
86      * @param operations operation to execute in batch mode
87      * @return the batch operation
88      */

89     public IBatchOperation createBatchInstallOperation(IInstallFeatureOperation[] operations);
90     
91     /**
92      * Creates ann operation to configure/unconfigure an installation site (also known as enable/disable site)
93      * @param site site to configure/unconfigure
94      * @return the toggle site operation
95      */

96     public IToggleSiteOperation createToggleSiteOperation(
97         IConfiguredSite site);
98         
99
100     /**
101      * Creates an operation to revert to a previous installation configuration.
102      * @param config configuration to revert to
103      * @param problemHandler error handler
104      * @return the revert operation
105      */

106     public IRevertConfigurationOperation createRevertConfigurationOperation(
107         IInstallConfiguration config,
108         IProblemHandler problemHandler);
109 }
110
Popular Tags