All Packages Class Hierarchy This Package Previous Next Index
Class utilities.AS400ToolboxInstaller
java.lang.Object
|
+----utilities.AS400ToolboxInstaller
- public class AS400ToolboxInstaller
- extends Object
The AS400ToolboxInstaller class
performs install, updates, and un-installs of the AS/400 Java
Toolbox packages. Note that this class writes to the local file system,
so it may be rejected if used in an applet.
-
getClasspathAdditions()
- Returns the set of paths that should be added to the CLASSPATH as a
result of the latest install or uninstall operation.
-
getClasspathRemovals()
- Returns the set of paths that should be removed from the CLASSPATH as a
result of the latest install or uninstall operation.
-
getUnexpandedFiles()
- Returns the set of files that should be expanded as a
result of the latest install or uninstall operation.
-
install(String, String, URL)
- Installs/updates an AS/400 Java Toolbox package.
-
isInstalled(String, String)
- Indicates if the package is installed.
-
isUpdateNeeded(String, String, URL)
- Returns whether the package is downlevel.
-
unInstall(String, String)
- Removes a package from the target.
getClasspathAdditions
public static Vector getClasspathAdditions()
- Returns the set of paths that should be added to the CLASSPATH as a
result of the latest install or uninstall operation. The returned
vector will always be empty after an uninstall.
- Returns:
- The vector of Strings which contain the paths that should be
added to the CLASSPATH
as a result of the latest install or uninstall operation.
getClasspathRemovals
public static Vector getClasspathRemovals()
- Returns the set of paths that should be removed from the CLASSPATH as a
result of the latest install or uninstall operation.
Note:
Removing directories from the classpath may cause Java programs
to fail if the directory contains code required by the Java program.
Extraneous directories in the CLASSPATH
do no harm. Therefore, you may not wish to remove any CLASSPATH
entries, or remove only directories which do not contain any Java
code.
- Returns:
- The vector of Strings which contain the paths that should be
removed from the CLASSPATH
as a result of the latest install or uninstall operation.
getUnexpandedFiles
public static Vector getUnexpandedFiles()
- Returns the set of files that should be expanded as a
result of the latest install or uninstall operation.
Note that not all *.zip files will be in this list. Only those files
designated to be expanded by the package will be included. The returned
vector will always be empty after an uninstall.
- Returns:
- The vector of Strings which contain the files that should be
expanded as a result of the latest install or uninstall operation.
install
public static boolean install(String packageName,
String targetPath,
URL source) throws IOException
- Installs/updates an AS/400 Java Toolbox package.
If the package is already installed,
it will be updated if needed. This method just copies files, it will
not modify the CLASSPATH, or expand any 'zipped' files.
URL sourceURL = new URL("http://myAS400/QIBM/ProdData/HTTP/Public/jt400/");
AS400ToolboxInstaller.install("ACCESS", "C:\\java\\", sourceURL);
- Parameters:
- packageName - The package which to install.
"*ALL" can be used to install all the AS/400
Java Toolbox packages.
- targetPath - The path in which to install. The directory will be
created if it does not exist.
- source - The URL which contains the location which contains the
current package. File names will be appended
to this location, so a trailing path separator
is required.
- Returns:
- true if an install/update occurred, false if no updates were
needed.
- Throws: IOException
- If an error occurs while communicating with the AS/400.
isInstalled
public static boolean isInstalled(String packageName,
String targetPath)
- Indicates if the package is installed. Installation is determined
by examining the target directory for the *.LVL file. This method
does not check for a partial installation, if installation is
incomplete, this method may return true or false.
AS400ToolboxInstaller.isInstalled("ACCESS", "C:\\java\\");
- Parameters:
- packageName - The package which will be checked.
Note that *ALL is not supported.
- targetPath - The path in which the package is installed.
- Returns:
- true if the package has been installed, false if the
package has not been installed.
isUpdateNeeded
public static boolean isUpdateNeeded(String packageName,
String targetPath,
URL source) throws IOException
- Returns whether the package is downlevel. This method will return
true if the package is not installed.
URL sourceURL = new URL("http://myAS400/QIBM/ProdData/HTTP/Public/jt400/");
AS400ToolboxInstaller.isUpdateNeeded("ACCESS", "C:\\java\\", sourceURL);
- Parameters:
- packageName - The package which will be checked.
"*ALL" can be used to check all the AS/400
Java Toolbox packages.
- targetPath - The path in which the package is installed.
- source - The URL which contains the location which contains the
current package. File names will be appended
to this location, so a trailing path separator
is required.
- Returns:
- true if an update is needed, false if no updates are
needed.
- Throws: IOException
- If an error occurs while communicating with the AS/400.
unInstall
public static Vector unInstall(String packageName,
String targetPath) throws IOException
- Removes a package from the target. This method deletes all the files
in the package, and deletes directories if they are empty.
It does not modify the CLASSPATH.
AS400ToolboxInstaller.unInstall("ACCESS", "C:\\java\\");
- Parameters:
- packageName - The package to remove.
"*ALL" can be used to remove all the AS/400
Java Toolbox packages.
- targetPath - The path from which to remove the package.
- Returns:
- The vector of Strings which contain the names (including path) of
files and directories which exist but could not be deleted.
- Throws: IOException
- If the package is not installed.
All Packages Class Hierarchy This Package Previous Next Index