Eclipse Platform
2.0

org.eclipse.update.core
Class BaseInstallHandler

java.lang.Object
  |
  +--org.eclipse.update.core.BaseInstallHandler
All Implemented Interfaces:
IInstallHandler

public class BaseInstallHandler
extends Object
implements IInstallHandler

Base implementation of an install handler. This is a convenience implementation of an install handler with null implementation of its methods. It allows subclasses to selectively implement only the methods required for their installation tasks.

This class should be subclassed by clients.

Since:
2.0
See Also:
IInstallHandler

Field Summary
protected  IInstallHandlerEntry entry
          Model entry that defines this handler
protected  IFeature feature
          The target of the action
protected  boolean initialized
          Indicates if handler has been initialized
protected  InstallMonitor monitor
          Optional progress monitor, can be null
protected  INonPluginEntry[] nonPluginEntries
          Non-plug-in entries downloaded
protected  IPluginEntry[] pluginEntries
          Plug-in entries downloaded
protected  int type
          Update action type
 
Fields inherited from interface org.eclipse.update.core.IInstallHandler
HANDLER_ACTION_CONFIGURE, HANDLER_ACTION_INSTALL, HANDLER_ACTION_UNCONFIGURE, HANDLER_ACTION_UNINSTALL
 
Constructor Summary
BaseInstallHandler()
           
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

type

protected int type
Update action type

Since:
2.0
See Also:
IInstallHandler.HANDLER_ACTION_INSTALL, IInstallHandler.HANDLER_ACTION_CONFIGURE, IInstallHandler.HANDLER_ACTION_UNCONFIGURE, IInstallHandler.HANDLER_ACTION_UNINSTALL

feature

protected IFeature feature
The target of the action

Since:
2.0

entry

protected IInstallHandlerEntry entry
Model entry that defines this handler

Since:
2.0

monitor

protected InstallMonitor monitor
Optional progress monitor, can be null

Since:
2.0

pluginEntries

protected IPluginEntry[] pluginEntries
Plug-in entries downloaded

Since:
2.0
See Also:
IInstallHandler.HANDLER_ACTION_INSTALL

nonPluginEntries

protected INonPluginEntry[] nonPluginEntries
Non-plug-in entries downloaded

Since:
2.0
See Also:
IInstallHandler.HANDLER_ACTION_INSTALL

initialized

protected boolean initialized
Indicates if handler has been initialized

Since:
2.0
Constructor Detail

BaseInstallHandler

public BaseInstallHandler()
Method Detail

initialize

public void initialize(int type,
                       IFeature feature,
                       IInstallHandlerEntry entry,
                       InstallMonitor monitor)
                throws CoreException
Initialize the install handler.

Specified by:
initialize in interface IInstallHandler
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
See Also:
IInstallHandler.initialize(int, IFeature, IInstallHandlerEntry, InstallMonitor)

installInitiated

public void installInitiated()
                      throws CoreException
Called at the start of the install action.

Specified by:
installInitiated in interface IInstallHandler
Throws:
CoreException - terminates the action
Since:
2.0
See Also:
IInstallHandler.installInitiated()

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.

Specified by:
pluginsDownloaded in interface IInstallHandler
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:
IInstallHandler.pluginsDownloaded(IPluginEntry[])

nonPluginDataDownloaded

public void nonPluginDataDownloaded(INonPluginEntry[] nonPluginData,
                                    IVerificationListener listener)
                             throws CoreException
Called after files corresponding to non-plug-in entries have been downloaded.

Specified by:
nonPluginDataDownloaded in interface IInstallHandler
Parameters:
nonPluginData - downloaded non-plug-in entries.
listener - verification listener, may be null.
Throws:
CoreException - terminates the action
Since:
2.0
See Also:
IInstallHandler.nonPluginDataDownloaded(INonPluginEntry[], IVerificationListener)

completeInstall

public void completeInstall(IFeatureContentConsumer consumer)
                     throws CoreException
Called after the feature files and any downloaded plug-ins have been installed.

Specified by:
completeInstall in interface IInstallHandler
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:
IInstallHandler#pluginsInstalled(IFeatureContentConsumer)

installCompleted

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

Specified by:
installCompleted in interface IInstallHandler
Parameters:
success - indicates action success.
Throws:
CoreException - terminates the action
Since:
2.0
See Also:
IInstallHandler.installCompleted(boolean)

configureInitiated

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

Specified by:
configureInitiated in interface IInstallHandler
Throws:
CoreException - terminates the action
Since:
2.0
See Also:
IInstallHandler.configureInitiated()

completeConfigure

public void completeConfigure()
                       throws CoreException
Called after the feature has been configured.

Specified by:
completeConfigure in interface IInstallHandler
Throws:
CoreException - terminates the action
Since:
2.0
See Also:
IInstallHandler.completeConfigure()

configureCompleted

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

Specified by:
configureCompleted in interface IInstallHandler
Parameters:
success - indicates action success.
Throws:
CoreException - terminates the action
Since:
2.0
See Also:
IInstallHandler.configureCompleted(boolean)

unconfigureInitiated

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

Specified by:
unconfigureInitiated in interface IInstallHandler
Throws:
CoreException - terminates the action
Since:
2.0
See Also:
IInstallHandler.unconfigureInitiated()

completeUnconfigure

public void completeUnconfigure()
                         throws CoreException
Called after the feature has been unconfigured.

Specified by:
completeUnconfigure in interface IInstallHandler
Throws:
CoreException - terminates the action
Since:
2.0
See Also:
IInstallHandler.completeUnconfigure()

unconfigureCompleted

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

Specified by:
unconfigureCompleted in interface IInstallHandler
Parameters:
success - indicates action success.
Throws:
CoreException - terminates the action
Since:
2.0
See Also:
IInstallHandler.unconfigureCompleted(boolean)

uninstallInitiated

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

Specified by:
uninstallInitiated in interface IInstallHandler
Throws:
CoreException - terminates the action
Since:
2.0
See Also:
IInstallHandler.uninstallInitiated()

completeUninstall

public void completeUninstall()
                       throws CoreException
Called after the feature has been uninstalled.

Specified by:
completeUninstall in interface IInstallHandler
Throws:
CoreException - terminates the action
Since:
2.0
See Also:
IInstallHandler.completeUninstall()

uninstallCompleted

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

Specified by:
uninstallCompleted in interface IInstallHandler
Parameters:
success - indicates action success.
Throws:
CoreException - terminates the action
Since:
2.0
See Also:
IInstallHandler.uninstallCompleted(boolean)

Eclipse Platform
2.0

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