Eclipse Platform
2.0

org.eclipse.update.core
Interface IInstallHandler

All Known Implementing Classes:
BaseInstallHandler

public interface IInstallHandler

Custom install handler. Custom install handlers can optionally be associated with a feature. The actual install handler implementation can be physically delivered as part of the feature package, or can already be installed on the client machine and registered via the org.eclipse.update.core.installHandlers extension point. The install handler methods are called at predetermined point during update actions.

Clients may implement this interface. However, in most cases clients should directly subclass the provided implementation of this interface.

Since:
2.0
See Also:
BaseInstallHandler

Field Summary
static int HANDLER_ACTION_CONFIGURE
          Indicates the handler is being initialized for feature configure.
static int HANDLER_ACTION_INSTALL
          Indicates the handler is being initialized for feature install.
static int HANDLER_ACTION_UNCONFIGURE
          Indicates the handler is being initialized for feature unconfigure.
static int HANDLER_ACTION_UNINSTALL
          Indicates the handler is being initialized for feature uninstall.
 
Method Summary
 void completeConfigure()
          Called after the feature has been configured.
 void completeInstall(IFeatureContentConsumer consumer)
          Called after the feature files and any downloaded plug-ins have been installed.
 void completeUnconfigure()
          Called after the feature has been unconfigured.
 void completeUninstall()
          Called after the feature has been uninstalled.
 void configureCompleted(boolean success)
          Called at the end of the configure action.
 void configureInitiated()
          Called at the start of the configure action
 void initialize(int type, IFeature feature, IInstallHandlerEntry entry, InstallMonitor monitor)
          Initialize the install handler.
 void installCompleted(boolean success)
          Called at the end of the install action.
 void installInitiated()
          Called at the start of the install action.
 void nonPluginDataDownloaded(INonPluginEntry[] nonPluginData, IVerificationListener listener)
          Called after files corresponding to non-plug-in entries have been downloaded.
 void pluginsDownloaded(IPluginEntry[] plugins)
          Called after files corresponding to plug-in entries have been downloaded, but before they are actully unpacked and installed.
 void unconfigureCompleted(boolean success)
          Called at the end of the unconfigure action.
 void unconfigureInitiated()
          Called at the start of the unconfigure action
 void uninstallCompleted(boolean success)
          Called at the end of the uninstall action.
 void uninstallInitiated()
          Called at the start of the uninstall action
 

Field Detail

HANDLER_ACTION_INSTALL

public static final int HANDLER_ACTION_INSTALL
Indicates the handler is being initialized for feature install.

Since:
2.0
See Also:
Constant Field Values

HANDLER_ACTION_CONFIGURE

public static final int HANDLER_ACTION_CONFIGURE
Indicates the handler is being initialized for feature configure.

Since:
2.0
See Also:
Constant Field Values

HANDLER_ACTION_UNCONFIGURE

public static final int HANDLER_ACTION_UNCONFIGURE
Indicates the handler is being initialized for feature unconfigure.

Since:
2.0
See Also:
Constant Field Values

HANDLER_ACTION_UNINSTALL

public static final int HANDLER_ACTION_UNINSTALL
Indicates the handler is being initialized for feature uninstall.

Since:
2.0
See Also:
Constant Field Values
Method Detail

initialize

public void initialize(int type,
                       IFeature feature,
                       IInstallHandlerEntry entry,
                       InstallMonitor monitor)
                throws CoreException
Initialize the install handler. Install handlers are always constructed using the default constructor. The are initialized immediately following construction.

Parameters:
type - update action type
feature - the target of the action
entry - model entry that defines this handler
monitor - optional progress monitor, can be null
Throws:
CoreException
Since:
2.0

installInitiated

public void installInitiated()
                      throws CoreException
Called at the start of the install action. At this point, no install processing has taken place.

Throws:
CoreException - terminates the action
Since:
2.0
See Also:
HANDLER_ACTION_INSTALL

pluginsDownloaded

public void pluginsDownloaded(IPluginEntry[] plugins)
                       throws CoreException
Called after files corresponding to plug-in entries have been downloaded, but before they are actully unpacked and installed.

Parameters:
plugins - downloaded plug-in entries. Note this may be a subset of the plug-ins actually references by the feature.
Throws:
CoreException - terminates the action
Since:
2.0
See Also:
HANDLER_ACTION_INSTALL

nonPluginDataDownloaded

public void nonPluginDataDownloaded(INonPluginEntry[] nonPluginData,
                                    IVerificationListener listener)
                             throws CoreException
Called after files corresponding to non-plug-in entries have been downloaded. The custom install handler can perform any custom verification of the non-plug-in entries (these are not interpreted in any way by the platform (beyond downloading)).

Parameters:
nonPluginData - downloaded non-plug-in entries.
listener - verification listener, may be null.
Throws:
CoreException - terminates the action
Since:
2.0
See Also:
HANDLER_ACTION_INSTALL

completeInstall

public void completeInstall(IFeatureContentConsumer consumer)
                     throws CoreException
Called after the feature files and any downloaded plug-ins have been installed. Typically this is the point where the custom install handler can install any non-plug-in entries (these are not interpreted in any way by the platform (beyond downloading)).

Parameters:
consumer - content consumer for the feature. The install handler can choose to use this consumer to install the non-plug-in data, or can handle the data in any other way. If using the consumer, the install handler should only call
Throws:
CoreException - terminates the action
Since:
2.0
See Also:
HANDLER_ACTION_INSTALL, and @see IFeatureContentConsumer#open(INonPluginEntry) methods of the consumer.

installCompleted

public void installCompleted(boolean success)
                      throws CoreException
Called at the end of the install action.

Parameters:
success - indicates action success.
Throws:
CoreException - terminates the action
Since:
2.0
See Also:
HANDLER_ACTION_INSTALL

configureInitiated

public void configureInitiated()
                        throws CoreException
Called at the start of the configure action

Throws:
CoreException - terminates the action
Since:
2.0
See Also:
HANDLER_ACTION_CONFIGURE

completeConfigure

public void completeConfigure()
                       throws CoreException
Called after the feature has been configured. The install handler should perform any completion tasks. No arguments are passed to the method. If needed, the install handler can use arguments passed on the initialization call.

Throws:
CoreException - terminates the action
Since:
2.0
See Also:
HANDLER_ACTION_CONFIGURE

configureCompleted

public void configureCompleted(boolean success)
                        throws CoreException
Called at the end of the configure action.

Parameters:
success - indicates action success.
Throws:
CoreException - terminates the action
Since:
2.0
See Also:
HANDLER_ACTION_CONFIGURE

unconfigureInitiated

public void unconfigureInitiated()
                          throws CoreException
Called at the start of the unconfigure action

Throws:
CoreException - terminates the action
Since:
2.0
See Also:
HANDLER_ACTION_UNCONFIGURE

completeUnconfigure

public void completeUnconfigure()
                         throws CoreException
Called after the feature has been unconfigured. The install handler should perform any completion tasks. No arguments are passed to the method. If needed, the install handler can use arguments passed on the initialization call.

Throws:
CoreException - terminates the action
Since:
2.0
See Also:
HANDLER_ACTION_UNCONFIGURE

unconfigureCompleted

public void unconfigureCompleted(boolean success)
                          throws CoreException
Called at the end of the unconfigure action.

Parameters:
success - indicates action success.
Throws:
CoreException - terminates the action
Since:
2.0
See Also:
HANDLER_ACTION_UNCONFIGURE

uninstallInitiated

public void uninstallInitiated()
                        throws CoreException
Called at the start of the uninstall action

Throws:
CoreException - terminates the action
Since:
2.0
See Also:
HANDLER_ACTION_UNINSTALL

completeUninstall

public void completeUninstall()
                       throws CoreException
Called after the feature has been uninstalled. The install handler should perform any completion tasks. No arguments are passed to the method. If needed, the install handler can use arguments passed on the initialization call. Note, that at this point the feature files and any unreferenced plug-ins have been removed.

Throws:
CoreException - terminates the action
Since:
2.0
See Also:
HANDLER_ACTION_UNINSTALL

uninstallCompleted

public void uninstallCompleted(boolean success)
                        throws CoreException
Called at the end of the uninstall action.

Parameters:
success - indicates action success.
Throws:
CoreException - terminates the action
Since:
2.0
See Also:
HANDLER_ACTION_UNINSTALL

Eclipse Platform
2.0

Copyright (c) IBM Corp. and others 2000, 2002. All Rights Reserved.