1 11 package org.eclipse.update.internal.operations; 12 13 import org.eclipse.update.configuration.*; 14 import org.eclipse.update.core.*; 15 import org.eclipse.update.operations.*; 16 17 public class OperationFactory implements IOperationFactory { 18 19 public OperationFactory() { 20 } 21 22 public IConfigFeatureOperation createConfigOperation( 23 IConfiguredSite targetSite, 24 IFeature feature) { 25 return new ConfigOperation(targetSite, feature); 26 } 27 28 public IBatchOperation createBatchInstallOperation(IInstallFeatureOperation[] operations) { 29 return new BatchInstallOperation(operations); 30 } 31 32 public IInstallFeatureOperation createInstallOperation( 33 IConfiguredSite targetSite, 34 IFeature feature, 35 IFeatureReference[] optionalFeatures, 36 IFeature[] unconfiguredOptionalFeatures, 37 IVerificationListener verifier) { 38 return new InstallOperation( 39 targetSite, 40 feature, 41 optionalFeatures, 42 unconfiguredOptionalFeatures, 43 verifier); 44 } 45 46 public IUnconfigFeatureOperation createUnconfigOperation( 47 IConfiguredSite targetSite, 48 IFeature feature) { 49 return new UnconfigOperation(targetSite, feature); 50 } 51 52 public IConfigFeatureOperation createReplaceFeatureVersionOperation( 53 IFeature feature, 54 IFeature anotherFeature) { 55 56 return new ReplaceFeatureVersionOperation(feature, anotherFeature); 57 } 58 59 public IUninstallFeatureOperation createUninstallOperation( 60 IConfiguredSite targetSite, 61 IFeature feature) { 62 return new UninstallOperation(targetSite, feature); 63 } 64 65 public IRevertConfigurationOperation createRevertConfigurationOperation( 66 IInstallConfiguration config, 67 IProblemHandler problemHandler) { 68 return new RevertConfigurationOperation( 69 config, 70 problemHandler); 71 } 72 73 public IToggleSiteOperation createToggleSiteOperation( 74 IConfiguredSite site) { 75 return new ToggleSiteOperation(site); 76 } 77 78 public IUnconfigureAndUninstallFeatureOperation createUnconfigureAndUninstallFeatureOperation( 79 IConfiguredSite targetSite, 80 IFeature feature) { 81 return new UnconfigureAndUninstallFeatureOperation(targetSite, feature); 82 } 83 84 public IUnconfigureFeaturesOperation createUnconfigureFeaturesOperation ( 85 IConfiguredSite[] targetSites, 86 IFeature[] features) { 87 return new UnconfigureFeaturesOperation(targetSites, features); 88 } 89 90 public IConfigureFeaturesOperation createConfigureFeaturesOperation( 91 IConfiguredSite[] targetSites, 92 IFeature[] features) { 93 94 return new ConfigureFeaturesOperation(targetSites, features); 95 } 96 97 public IUninstallFeaturesOperation createUninstallFeaturesOperation( 98 IConfiguredSite[] targetSites, 99 IFeature[] features) { 100 return new UninstallFeaturesOperation(targetSites, features); 101 } 102 103 public IUnconfigureAndUninstallFeaturesOperation createUnconfigureAndUninstallFeaturesOperation( 104 IConfiguredSite[] targetSites, 105 IFeature[] features) { 106 return new UnconfigureAndUninstallFeaturesOperation(targetSites, features); 107 } 108 } 109 | Popular Tags |