Dekoh platform API

com.pramati.bfly.vm.api
Interface UpdateHandler

All Known Implementing Classes:
PortalAppsUpdateHelper, UpdateAdapter

public interface UpdateHandler

Interface to be implemented by Component providers wishing to customize the installation/uninstallation/updation of their components. Typically implementations of this class would take care of migration when an already installed component is being updated, or installation of third party software applications packaged as Components.

Implementations of this class should be present in an archive called UpdateHandler.CALLBACK_JAR_NAME at the top level of the archive containing the application/component. A Component can have multiple UpdateHandlers, and they will be invoked in the order they are specified in the component.xml for that component. Each UpdateHandler must have a public no-arg constructor.

Note that the same preInstall/postInstall methods are called for first time installation as well as updation of an already installed component.

Since:
Nov 24, 2006
See Also:
"Versioning HowTo documentation"

Field Summary
static String CALLBACK_JAR_NAME
          The name of the jar where the implementation(s) of this interface should be present.
 
Method Summary
 void init(Map initParams)
          This method is currently not used.
 void postInstall(InstallEnv env)
          Invoked after the component is actually installed or updated.
 void postUninstall(InstallEnv env)
          Invoked after the component is uninstalled.
 void preInstall(InstallEnv env)
          Invoked before the component is actually installed or updated.
 void preUninstall(InstallEnv env)
          Invoked before the component is uninstalled.
 

Field Detail

CALLBACK_JAR_NAME

static final String CALLBACK_JAR_NAME
The name of the jar where the implementation(s) of this interface should be present.

See Also:
Constant Field Values
Method Detail

init

void init(Map initParams)
This method is currently not used.

Parameters:
initParams -

preInstall

void preInstall(InstallEnv env)
                throws InstallationException
Invoked before the component is actually installed or updated. This callback can be used to perform migration during update operations, or perform other pre installation tasks.

Parameters:
env - An environment object containing data about the installation environment.
Throws:
InstallationException - If there was an error during invoking this method.

postInstall

void postInstall(InstallEnv env)
                 throws InstallationException
Invoked after the component is actually installed or updated. This callback can be used to perform cleanup or other operations which are specific to the component being installed.

Parameters:
env - An environment object containing data about the installation environment.
Throws:
InstallationException - If there was an error during invoking this method.

preUninstall

void preUninstall(InstallEnv env)
                  throws InstallationException
Invoked before the component is uninstalled.

Parameters:
env - An environment object containing data about the installation environment.
Throws:
InstallationException - If there was an error during invoking this method.

postUninstall

void postUninstall(InstallEnv env)
                   throws InstallationException
Invoked after the component is uninstalled.

Parameters:
env - An environment object containing data about the installation environment.
Throws:
InstallationException - If there was an error during invoking this method.

Dekoh platform API

© 2009 Pramati Technologies - Dekoh - Portal for Developers