1 /*******************************************************************************
2 * Copyright (c) 2007, 2009 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
9 * IBM Corporation - initial API and implementation
10 *******************************************************************************/
11 package org.eclipse.equinox.internal.provisional.p2.installer;
13 import org.eclipse.core.runtime.IProgressMonitor;
14 import org.eclipse.core.runtime.IStatus;
15 import org.eclipse.core.runtime.Status;
18 * The operation that will perform the install. This interface exists to allow
19 * the install advisor to act as the runnable context for the install, handling
20 * progress monitoring and cancelation.
22 * This interface is not intended to be implemented by clients.
23 * @noimplement This interface is not intended to be implemented by clients.
25 public interface IInstallOperation {
27 * Performs the install.
29 * The provided monitor can be used to report progress and respond to
30 * cancellation. If the progress monitor has been canceled, the job
31 * should finish its execution at the earliest convenience and return a result
32 * status of severity {@link IStatus#CANCEL}. The singleton
33 * cancel status {@link Status#CANCEL_STATUS} can be used for
34 * this purpose. The monitor is only valid for the duration of the invocation
37 * @param monitor the monitor to be used for reporting progress and
38 * responding to cancelation, or <code>null</code> if progress reporting
39 * and cancelation are not desired.
40 * @return resulting status of the run. The result must not be <code>null</code>
42 public IStatus install(IProgressMonitor monitor);