Dekoh platform API

com.pramati.bfly.vm.api
Class InstallEnv

java.lang.Object
  extended by com.pramati.bfly.vm.api.InstallEnv

public class InstallEnv
extends Object

A data object holding information about the installation environment. The installation runtime creates this object and passes it to callback classes.

Since:
Dec 6, 2006

Constructor Summary
InstallEnv()
           
 
Method Summary
 String getApplicationId()
           
 String getComponentRoot()
           
 String getInstallDir()
          File path where the platform is installed.
 String getInstallRoot()
          Deprecated. use InstallEnv.getInstallDir() instead.
 InstallListener getListener()
          Returns the InstallListener object, if set.
 String getNewArchivePath()
           
 Version getNewVersion()
          Returns the version of the component which is being installed/updated/uninstalled.
 Version getOldVersion()
          Returns the current version of the component, if it is installed, else null if the component is not installed (i.e.
 void setApplicationId(String applicationId)
           
 void setComponentRoot(String componentRoot)
           
 void setInstallDir(String installDir)
           
 void setListener(InstallListener listener)
          Sets an InstallListener object.
 void setNewArchivePath(String newArchivePath)
           
 void setNewVersion(Version newVersion)
          Sets the new/current version of the component being installed.
 void setOldVersion(Version oldVersion)
          Sets the old version (current version) of the component.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InstallEnv

public InstallEnv()
Method Detail

getOldVersion

public Version getOldVersion()
Returns the current version of the component, if it is installed, else null if the component is not installed (i.e. this is a first time installation).

Returns:

setOldVersion

public void setOldVersion(Version oldVersion)
Sets the old version (current version) of the component.

Parameters:
oldVersion -

getNewVersion

public Version getNewVersion()
Returns the version of the component which is being installed/updated/uninstalled.

Returns:

setNewVersion

public void setNewVersion(Version newVersion)
Sets the new/current version of the component being installed.

Parameters:
newVersion -

getListener

public InstallListener getListener()
Returns the InstallListener object, if set.

Returns:

setListener

public void setListener(InstallListener listener)
Sets an InstallListener object.

Parameters:
listener -

getComponentRoot

public String getComponentRoot()
Returns:
document root where the content of this application is available. Value for this is set only after deployment of the archive is complete. Hence only UpdateHandler.postInstall(InstallEnv) method can access this value.

setComponentRoot

public void setComponentRoot(String componentRoot)

getInstallDir

public String getInstallDir()
File path where the platform is installed. E.g. C:\Dekoh, /home/user/Dekoh, etc.

Returns:
absoulute path to install dir

setInstallDir

public void setInstallDir(String installDir)

toString

public String toString()
Overrides:
toString in class Object

setNewArchivePath

public void setNewArchivePath(String newArchivePath)

getNewArchivePath

public String getNewArchivePath()
Returns:
Path to the archive that has been downloaded and needs to be installed.

setApplicationId

public void setApplicationId(String applicationId)

getApplicationId

public String getApplicationId()
Returns:
application Id is a unique identifier for components. Identical to the component ID of the component.
See Also:
Component#getId()

getInstallRoot

public String getInstallRoot()
Deprecated. use InstallEnv.getInstallDir() instead.

Returns:

Dekoh platform API

© 2009 Pramati Technologies - Dekoh - Portal for Developers