| java.lang.Object com.memoire.vainstall.AbstractCustomPrePost
AbstractCustomPrePost | public class AbstractCustomPrePost (Code) | | To provide custom pre-install and post-install steps,
create a subclass of this one and pass the name of the subclass
to the package builder by as the value of the key
"vainstall.install.customprepost.className" in the config file for
your project.
If you are overriding this class, note that the class VAGlobals
has many useful static fields and methods that provide things
such as the application name, version, destination directory,
and language in use for localization.
|
Method Summary | |
public static boolean | postInstall(PrintWriter filelog, VAInstallStep step) Method called just after intallation ends.
Parameters: write - PrintWriter a writer to which you can write the namesof files that you create and want to add to the list ofpackage files so that they will be deleted whenyour package is uninstalled. | public static boolean | postUninstall(VAInstallStep step) Method called just after uninstall ends.
Parameters: step - VAInstallStep interface containing methods thatprovide access to the GUI. exception: java.lang.Exception - Could be anything. | public static boolean | postUpgrade(String oldversion, PrintWriter filelog, VAInstallStep step) | public static boolean | preInstall(PrintWriter filelog, VAInstallStep step) Method called just before intallation begins.
Parameters: write - PrintWriter a writer to which you can write the namesof files that you create and want to add to the list ofpackage files so that they will be deleted whenyour package is uninstalled. | public static boolean | preUninstall(VAInstallStep step) Method called just before uninstall begins.
Parameters: step - VAInstallStep interface containing methods thatprovide access to the GUI. exception: java.lang.Exception - could be anything. | public static boolean | preUpgrade(String oldversion, PrintWriter filelog, VAInstallStep step) Method called just before upgrade begins.
Parameters: oldversion - String containing existing version. Parameters: write - PrintWriter a writer to which you can write the namesof files that you create and want to add to the list ofpackage files so that they will be deleted whenyour package is uninstalled. | final protected static int | runCommand(File workdir, String[] args, VAInstallStep step) Use Runtime.exec to run the given command in the given working
directory. |
postInstall | public static boolean postInstall(PrintWriter filelog, VAInstallStep step) throws Exception(Code) | | Method called just after intallation ends.
Parameters: write - PrintWriter a writer to which you can write the namesof files that you create and want to add to the list ofpackage files so that they will be deleted whenyour package is uninstalled. File names are fully qualified.See a copy of uninstall.vaiin the .vainstall directory of an installed package fordetail. Parameters: step - VAInstallStep interface containing methods thatprovide access to the GUI. exception: java.lang.Exception - could be anything. You are likelyto throw exceptions if you do anything interesting. |
postUninstall | public static boolean postUninstall(VAInstallStep step) throws Exception(Code) | | Method called just after uninstall ends.
Parameters: step - VAInstallStep interface containing methods thatprovide access to the GUI. exception: java.lang.Exception - Could be anything. You are likelyto throw exceptions if you do anything interesting. |
preInstall | public static boolean preInstall(PrintWriter filelog, VAInstallStep step) throws Exception(Code) | | Method called just before intallation begins.
Parameters: write - PrintWriter a writer to which you can write the namesof files that you create and want to add to the list ofpackage files so that they will be deleted whenyour package is uninstalled. File names are fully qualified.See a copy of uninstall.vaiin the .vainstall directory of an installed package fordetail. Parameters: step - VAInstallStep interface containing methods thatprovide access to the GUI. exception: java.lang.Exception - could be anything. You are likelyto throw exceptions if you do anything interesting. |
preUninstall | public static boolean preUninstall(VAInstallStep step) throws Exception(Code) | | Method called just before uninstall begins.
Parameters: step - VAInstallStep interface containing methods thatprovide access to the GUI. exception: java.lang.Exception - could be anything. You are likelyto throw exceptions if you do anything interesting. |
preUpgrade | public static boolean preUpgrade(String oldversion, PrintWriter filelog, VAInstallStep step) throws Exception(Code) | | Method called just before upgrade begins.
Parameters: oldversion - String containing existing version. Parameters: write - PrintWriter a writer to which you can write the namesof files that you create and want to add to the list ofpackage files so that they will be deleted whenyour package is uninstalled. File names are fully qualified.See a copy of uninstall.vaiin the .vainstall directory of an installed package fordetail. Parameters: step - VAInstallStep interface containing methods thatprovide access to the GUI. exception: java.lang.Exception - could be anything. You are likelyto throw exceptions if you do anything interesting. |
runCommand | final protected static int runCommand(File workdir, String[] args, VAInstallStep step) throws IOException, InterruptedException(Code) | | Use Runtime.exec to run the given command in the given working
directory. Standard output of the command is captured
and fed to the the details method of the VAInstallStep object
provided as well as to VAGlobals.printDebug.
Parameters: workdir - File directory that will be the working directory ofthe command run. Parameters: args - String[] the command to be run. Each argument is onemember of the array. Parameters: step - VAInstallStep the interface to the GUI through whichoutput from the command will be fed. exception: java.io.IOException - should only occur with problemsrunning the command and reading the standard out as input. exception: java.lang.InterruptedException - may occur whilewaiting for the command to finish running. |
|
|