]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.project/src/org/eclipse/equinox/internal/provisional/p2/installer/IInstallOperation.java
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.project / src / org / eclipse / equinox / internal / provisional / p2 / installer / IInstallOperation.java
diff --git a/bundles/org.simantics.project/src/org/eclipse/equinox/internal/provisional/p2/installer/IInstallOperation.java b/bundles/org.simantics.project/src/org/eclipse/equinox/internal/provisional/p2/installer/IInstallOperation.java
new file mode 100644 (file)
index 0000000..1dc36cb
--- /dev/null
@@ -0,0 +1,43 @@
+/*******************************************************************************\r
+ *  Copyright (c) 2007, 2009 IBM Corporation and others.\r
+ *  All rights reserved. This program and the accompanying materials\r
+ *  are made available under the terms of the Eclipse Public License v1.0\r
+ *  which accompanies this distribution, and is available at\r
+ *  http://www.eclipse.org/legal/epl-v10.html\r
+ * \r
+ *  Contributors:\r
+ *     IBM Corporation - initial API and implementation\r
+ *******************************************************************************/\r
+package org.eclipse.equinox.internal.provisional.p2.installer;\r
+\r
+import org.eclipse.core.runtime.IProgressMonitor;\r
+import org.eclipse.core.runtime.IStatus;\r
+import org.eclipse.core.runtime.Status;\r
+\r
+/**\r
+ * The operation that will perform the install. This interface exists to allow\r
+ * the install advisor to act as the runnable context for the install, handling\r
+ * progress monitoring and cancelation.\r
+ * <p>\r
+ * This interface is not intended to be implemented by clients.\r
+ * @noimplement This interface is not intended to be implemented by clients.\r
+ */\r
+public interface IInstallOperation {\r
+       /**\r
+        * Performs the install.\r
+        * <p>\r
+        * The provided monitor can be used to report progress and respond to \r
+        * cancellation.  If the progress monitor has been canceled, the job\r
+        * should finish its execution at the earliest convenience and return a result\r
+        * status of severity {@link IStatus#CANCEL}.  The singleton\r
+        * cancel status {@link Status#CANCEL_STATUS} can be used for\r
+        * this purpose.  The monitor is only valid for the duration of the invocation\r
+        * of this method.\r
+        * \r
+        * @param monitor the monitor to be used for reporting progress and\r
+        * responding to cancelation, or <code>null</code> if progress reporting\r
+        * and cancelation are not desired.\r
+        * @return resulting status of the run. The result must not be <code>null</code>\r
+        */\r
+       public IStatus install(IProgressMonitor monitor);\r
+}\r