1 /*******************************************************************************
\r
2 * Copyright (c) 2007, 2009 IBM Corporation and others.
\r
3 * All rights reserved. This program and the accompanying materials
\r
4 * are made available under the terms of the Eclipse Public License v1.0
\r
5 * which accompanies this distribution, and is available at
\r
6 * http://www.eclipse.org/legal/epl-v10.html
\r
9 * IBM Corporation - initial API and implementation
\r
10 *******************************************************************************/
\r
11 package org.eclipse.equinox.internal.provisional.p2.installer;
\r
13 import org.eclipse.core.runtime.IProgressMonitor;
\r
14 import org.eclipse.core.runtime.IStatus;
\r
15 import org.eclipse.core.runtime.Status;
\r
18 * The operation that will perform the install. This interface exists to allow
\r
19 * the install advisor to act as the runnable context for the install, handling
\r
20 * progress monitoring and cancelation.
\r
22 * This interface is not intended to be implemented by clients.
\r
23 * @noimplement This interface is not intended to be implemented by clients.
\r
25 public interface IInstallOperation {
\r
27 * Performs the install.
\r
29 * The provided monitor can be used to report progress and respond to
\r
30 * cancellation. If the progress monitor has been canceled, the job
\r
31 * should finish its execution at the earliest convenience and return a result
\r
32 * status of severity {@link IStatus#CANCEL}. The singleton
\r
33 * cancel status {@link Status#CANCEL_STATUS} can be used for
\r
34 * this purpose. The monitor is only valid for the duration of the invocation
\r
37 * @param monitor the monitor to be used for reporting progress and
\r
38 * responding to cancelation, or <code>null</code> if progress reporting
\r
39 * and cancelation are not desired.
\r
40 * @return resulting status of the run. The result must not be <code>null</code>
\r
42 public IStatus install(IProgressMonitor monitor);
\r