public class InstallationController extends Object
InstallationController
class allows installing PEAR files that contain UIMA
compliant components.
java -DUIMA_HOME=%UIMA_HOME% org.apache.uima.pear.tools.InstallationController
{-local pear_file | component_id} [-root] [installation_directory]
-local pear_file
option allows to install local PEAR file in the local
file system (without using SITH services); component_id
is the ID of the component to be installed using SITH services;
-root
option enables component installation directly in the specified
installation directory, as opposed to installing component in a component_id
subdirectory of the specified installation directory; installation_directory
is the directory where the new component will be
installed - if the -root
option is specified, the component is installed in this
directory, otherwise it is installed in a component_id
subdirectory of this
directory; by default - current working directory. UIMA_HOME
variable, using the
setUimaHomePath()
method, immediately after creating a new instance of the
InstallationController
class. installComponent()
method. verifyComponent()
method.
getInstallationMsg()
and
getVerificationMsg()
methods. InstallationController
class
utilizes intra-process message routing (see MessageRouter
).
Applications need to call the terminate()
method on each instance of the
InstallationController
class after all their operations are completed. InstallationController
, by adding standard channel listeners (see the
addMsgListener()
method). By default, the output and error messages are printed to
the standard console streams. Alternatively, the application can use the
InstallationController
constructor that accepts a custom message listener. In this
case, the output and error messages will not be printed to the standard console streams. InstallationController
class
defines the InstallationController.PackageSelector
interface and allows to plug-in custom package
selectors for manually or automatically selecting root directories of installed PEAR packages, as
well as PEAR package files that need to be installed. InstallationController
class
defines the InstallationController.InstallationMonitor
interface and allows to plug-in custom
installation monitors for reporting component installation status and location of installed
components. Modifier and Type | Class and Description |
---|---|
static interface |
InstallationController.InstallationMonitor
The
InstallationMonitor interface defines methods required for notifying of
component installation status and location of the installed PEAR packages. |
static interface |
InstallationController.PackageSelector
The
PackageSelector interface defines methods required for manually or
automatically selecting installed PEAR package root directories and PEAR package files. |
static class |
InstallationController.TestStatus
The
TestStatus class encapsulates attributes related to the results of the
'serviceability' verification test. |
Modifier | Constructor and Description |
---|---|
|
InstallationController(String componentId,
File localPearFile,
File rootDir)
Constructor for the 'local' mode, which specifies component ID, local PEAR file and a local
root directory where the component will be installed.
|
|
InstallationController(String componentId,
File localPearFile,
File rootDir,
boolean installInRootDir)
Constructor for the 'local' mode, which specifies component ID, local PEAR file and a local
root directory where the component will be installed.
|
|
InstallationController(String componentId,
File localPearFile,
File rootDir,
boolean installInRootDir,
boolean cleanInstallDir)
Constructor for the 'local' mode, which specifies component ID, local PEAR file and a local
root directory where the component will be installed.
|
|
InstallationController(String componentId,
File localPearFile,
File rootDir,
boolean installInRootDir,
MessageRouter.StdChannelListener msgListener)
Constructor for the 'local' mode, which specifies component ID, local PEAR file and a local
root directory where the component will be installed.
|
|
InstallationController(String componentId,
File localPearFile,
File rootDir,
boolean installInRootDir,
MessageRouter.StdChannelListener msgListener,
boolean cleanInstallDir)
Constructor for the 'local' mode, which specifies component ID, local PEAR file and a local
root directory where the component will be installed.
|
|
InstallationController(String componentId,
String rootDirPath)
Constructs an instance of the
InstallationController class for a given component
and a given installation root directory. |
|
InstallationController(String componentId,
String rootDirPath,
boolean installInRootDir)
Constructs an instance of the
InstallationController class for a given component
and a given installation root directory. |
|
InstallationController(String componentId,
String rootDirPath,
boolean installInRootDir,
MessageRouter.StdChannelListener msgListener)
Constructs an instance of the
InstallationController class for a given component
and a given installation root directory. |
protected |
InstallationController(String componentId,
String rootDirPath,
boolean installInRootDir,
MessageRouter msgRouter,
MessageRouter.StdChannelListener msgListener,
boolean cleanInstallDir)
Internal constructor that creates an instance of the
InstallationController
class for a given component and a given installation root directory. |
Modifier and Type | Method and Description |
---|---|
protected static StringBuffer |
addListOfJarFiles(File libDir,
StringBuffer listBuffer)
Appends a list of JAR files in a given lib directory, separated with the OS dependent separator
(';' or ':'), to a given initial
StringBuffer object. |
void |
addMsgListener(MessageRouter.StdChannelListener listener)
Adds a given object, implementing the
MessageRouter.StdChannelListener interface
to the list of standard channel listeners. |
protected static boolean |
addToSystemEnvTable(Properties sysEnvTable,
String localKey,
String localValue)
Adds a given local environment variable to appropriate system environment variable (before the
system value).
|
static String[] |
buildArrayOfNetworkParams(InstallationDescriptor insdObject)
Creates a string array that contains network parameters (in the JVM '-Dname=value' format)
specified in a given installation descriptor object.
|
String |
buildComponentClassPath()
Builds
CLASSPATH for the installed component, including CLASSPATH
for all separate delegate components that are utilized by the main installed component, if any. |
static String |
buildComponentClassPath(String compRootDirPath,
InstallationDescriptor insdObject,
boolean addLibDir)
Creates a string that should be added to the CLASSPATH for a given installed component
associated with a given installation descriptor object.
|
String |
buildComponentPath()
Builds
PATH for the installed component, including PATH for all
separate delegate components that are utilized by the main installed component, if any. |
static String |
buildComponentPath(String compRootDirPath,
InstallationDescriptor insdObject)
Creates a string that should be added to the SPATH for a given installed component associated
with a given installation descriptor object.
|
static String |
buildListOfEnvVars(InstallationDescriptor insdObject)
Creates a string that contains the list of environment variables settings (in the JVM
'-Dname=value' format) included in a given installation descriptor object.
|
static String |
buildListOfNetworkParams(InstallationDescriptor insdObject)
Creates a string that contains network parameters (in the JVM '-Dname=value' format) specified
in a given installation descriptor object.
|
Properties |
buildTableOfEnvVars()
Builds
Properties table of required environment variables for the installed
component, including environment variables for all separate delegate components that are
utilized by the main installed component, if any. |
static Properties |
buildTableOfEnvVars(InstallationDescriptor insdObject)
Creates a
Properties table that contains (name, value) pairs of environment
variables settings for a given installation descriptor object. |
static String |
buildUIMAClassPath(String uimaHomeEnv)
Creates a string that should be added to the CLASSPATH environment variable for UIMA framework.
|
static boolean |
deleteInstalledFiles(String componentId,
File parentDir,
boolean includeDelegates)
Deletes all installed files for a given component in a given parent directory.
|
static String |
extractFilesFromPEARFile(String pearFileLocation,
String fileExt,
File targetDir,
boolean cleanTarget)
Extracts files with a given extension from a given PEAR file into a given target directory.
|
protected static String |
extractFilesFromPEARFile(String pearFileLocation,
String fileExt,
File targetDir,
InstallationController controller,
boolean cleanTarget)
Internal implementatiton of the
extractFilesFromPEARFile method, which allows
sending messages to the OUT and ERR queues. |
static String |
extractPEARFile(String pearFileLocation,
File installationDir,
boolean cleanTarget)
Extracts all files of a given component from a given PEAR file into a given target directory.
|
protected static String |
extractPEARFile(String pearFileLocation,
File installationDir,
InstallationController controller,
boolean cleanTarget)
Internal implementation of the
extractPEARFile method, which allows sending
messages to the OUT and ERR queues. |
protected void |
finalize()
Overrides standard
finalize method. |
protected void |
generatePackageConfigFile()
Generates/updates the PEAR configuration file setting the main component root directory, as
well as root directories of all related delegate components.
|
protected static void |
generatePearSpecifier(String mainComponentRootPath,
String mainComponentId)
generates the pearSpecifier to run the installed pear component.
|
protected void |
generateSetEnvFile()
Generates the file (batch file for Windows) containing specific environment variables that
should be used to run the component.
|
protected static Hashtable<String,InstallationDescriptor> |
getDelegateInstallationDescriptors(Hashtable<String,String> installationTable)
Creates a
Hashtable that contains (compId, InsD) pairs for all separate delegate
components specified in a given installation table. |
protected PrintWriter |
getErrMsgWriter() |
static String |
getHostIpAddress() |
String |
getInstallationMsg() |
protected static String |
getInstalledComponentRootPath(String componentId,
InstallationController.PackageSelector pkgSelector)
Retrieves the root directory path of a given component, installed in the local file system, by
using a given
PackageSelector input. |
protected PrintWriter |
getOutMsgWriter() |
protected static String |
getPEARFileLocation(String componentId,
InstallationController.PackageSelector pkgSelector)
Gets the PEAR file location (file path or URL) for a given component by using SITH DB a given
PackageSelector input. |
String |
getVerificationMsg() |
InstallationDescriptor |
installComponent()
Performs installation of the specified component in the specified target directory, including
all delegate components (if exist).
|
InstallationDescriptor |
installComponentDescriptors()
Performs installation of XML descriptors of the specified component in the specified target
directory, including XML descriptors of all the delegate components (if exist).
|
protected void |
installDelegateComponents()
Performs installation of all separate delegate components for the specified main component.
|
protected void |
installDelegateComponentsDescriptors()
Performs installation of XML descriptors for all separate delegate components of the specified
main component.
|
static void |
main(String[] args)
Starts the application.
|
void |
removeMsgListener(MessageRouter.StdChannelListener listener)
Removes a given
MessageRouter.StdChannelListener object from the list of
standard channel listeners. |
void |
saveInstallationDescriptorFile()
Saves modified installation descriptor file.
|
protected void |
setInstallationError(Exception error)
Prints the stack trace of a given
Exception object as the installation error
message. |
void |
setInstallationMonitor(InstallationController.InstallationMonitor monitor)
Plugs-in a given implementation of the
InstallationMonitor interface. |
static void |
setLocalMode(boolean inLocalMode)
Switches between the 'local' and 'DB' modes, depending on a given
boolean flag. |
void |
setPackageSelector(InstallationController.PackageSelector selector)
Plugs-in a given implementation of the
PackageSelector interface. |
void |
setUimaHomePath(String uimaHomePath)
Sets a given UIMA local home directory path.
|
protected void |
setVerificationError(Exception error)
Prints the stack trace of a given
Exception object as the verification error
message. |
void |
terminate()
Terminates the
MessageRouter thread. |
boolean |
verifyComponent()
Verifies installations of the main component, and sets appropriate component status in the SITH
DB.
|
static InstallationController.TestStatus |
verifyComponentInstallation(PackageBrowser pkgBrowser)
Runs the installation test for a given installed pear component, and returns the
TestStatus object with the test results. |
public static final String INSTALLATION_IN_PROGRESS
public static final String INSTALLATION_FAILED
public static final String INSTALLATION_COMPLETED
public static final String VERIFICATION_IN_PROGRESS
public static final String VERIFICATION_FAILED
public static final String VERIFICATION_COMPLETED
public static final String VERIFICATION_CANCELLED
protected static final String INSTALLATION_TESTER_APP
public static final String PACKAGE_CONFIG_FILE
public static final String PACKAGE_METADATA_DIR
public static final String PACKAGE_BIN_DIR
public static final String PACKAGE_CONF_DIR
public static final String PACKAGE_DATA_DIR
public static final String PACKAGE_DESC_DIR
public static final String PACKAGE_DOC_DIR
public static final String PACKAGE_LIB_DIR
public static final String PACKAGE_RESOURCES_DIR
public static final String PACKAGE_SOURCES_DIR
public static final String SET_ENV_FILE
public static final String PEAR_DESC_FILE_POSTFIX
protected static final String UIMA_HOME_ENV
protected static final String UIMA_LIB_DIR
protected static final String VINCI_LIB_DIR
protected static final String JAR_FILE_EXT
public static final String CLASSPATH_VAR
protected static final String PATH_VAR
protected static final String LOCAL_OPT
protected static final String INSTALL_IN_ROOT_OPT
public InstallationController(String componentId, String rootDirPath)
InstallationController
class for a given component
and a given installation root directory. By default, the InstallationController
creates a component_id
subdirectory for the component code and resources. By
default, the InstallationController
class sends all stdout and stderr messages
to the default message listener, which prints them to the standard console streams.componentId
- The given component ID.rootDirPath
- The given installation root directory path.public InstallationController(String componentId, String rootDirPath, boolean installInRootDir)
InstallationController
class for a given component
and a given installation root directory. If the installInRootDir
flag is
true
, the component will be installed in the given root directory, otherwise
the InstallationController
will create a component_id
subdirectory for the component code and resources. By default, the
InstallationController
class sends all stdout and stderr messages to the default
message listener, which prints them to the standard console streams.componentId
- The given component ID.rootDirPath
- The given installation root directory path.installInRootDir
- If true
, the component will be installed in the given root directory,
otherwise it will be installed in the component_id
subdirectory of the
root directory. Note: the installation directory will be cleaned before the PEAR file is
installed to it.public InstallationController(String componentId, String rootDirPath, boolean installInRootDir, MessageRouter.StdChannelListener msgListener)
InstallationController
class for a given component
and a given installation root directory. If the installInRootDir
flag is
true
, the component will be installed in the given root directory, otherwise
the InstallationController
will create a component_id
subdirectory for the component code and resources. If a given custom message listener is not
null
, the InstallationController
instance will sends all stdout
and stderr messages to the given message listener, otherwise these messages are sent to the
default message listener, which prints them to the standard console streams.componentId
- The given component ID.rootDirPath
- The given installation root directory path.installInRootDir
- If true
, the component will be installed in the given root directory,
otherwise it will be installed in the component_id
subdirectory of the
root directory. Note: the installation directory will be cleaned before the PEAR file is
installed to it.msgListener
- The given custom message listener or null
.protected InstallationController(String componentId, String rootDirPath, boolean installInRootDir, MessageRouter msgRouter, MessageRouter.StdChannelListener msgListener, boolean cleanInstallDir)
InstallationController
class for a given component and a given installation root directory. If the
installInRootDir
flag is true
, the component will be installed
in the given root directory, otherwise the InstallationController
will create a
component_id
subdirectory for the component code and resources. If a given
custom MessageRouter
is not null
, the new
InstallationController
instance will use the given message router, otherwise it
will create a new message router object. If a given custom message listener is not
null
, the InstallationController
instance will send all stdout
and stderr messages to the given message listener, otherwise these messages are sent to the
default message listener, which prints them to the standard console streams.componentId
- The given component ID.rootDirPath
- The given installation root directory.installInRootDir
- If true
, the component will be installed in the given root directory,
otherwise it will be installed in the component_id
subdirectory of the
root directory.msgRouter
- The given custom MessageRouter
object or null
.msgListener
- The given custom message listener object or null
.cleanInstallDir
- If true
, the target installation directory will be cleaned before the
PEAR file is installed.public InstallationController(String componentId, File localPearFile, File rootDir)
InstallationController
creates a component_id
subdirectory for
the component code and resources. By default, the InstallationController
class
sends all stdout and stderr messages to the default message listener, which prints them to the
standard console streams.componentId
- The given component ID.localPearFile
- The given local PEAR file.rootDir
- The given local root directory for installation.public InstallationController(String componentId, File localPearFile, File rootDir, boolean installInRootDir, boolean cleanInstallDir)
installInRootDir
flag is true
, the component code and resources will be installed in the
specified root directory, otherwise the InstallationController
will create a
component_id
subdirectory for the component code and resources. By default, the
InstallationController
class sends all stdout and stderr messages to the default
message listener, which prints them to the standard console streams.componentId
- The given component ID.localPearFile
- The given local PEAR file.rootDir
- The given local root directory for installation.installInRootDir
- If true
, the component will be installed in the given root directory,
otherwise it will be installed in the component_id
subdirectory of the
root directory.cleanInstallDir
- If true
, the target installation directory will be cleaned before the
PEAR file is installed.public InstallationController(String componentId, File localPearFile, File rootDir, boolean installInRootDir)
installInRootDir
flag is true
, the component code and resources will be installed in the
specified root directory, otherwise the InstallationController
will create a
component_id
subdirectory for the component code and resources. By default, the
InstallationController
class sends all stdout and stderr messages to the default
message listener, which prints them to the standard console streams.componentId
- The given component ID.localPearFile
- The given local PEAR file.rootDir
- The given local root directory for installation.installInRootDir
- If true
, the component will be installed in the given root directory,
otherwise it will be installed in the component_id
subdirectory of the
root directory. Note: the installation directory will be cleaned before the PEAR file is
installed to it.public InstallationController(String componentId, File localPearFile, File rootDir, boolean installInRootDir, MessageRouter.StdChannelListener msgListener)
installInRootDir
flag is true
, the component code and resources will be installed in the
specified root directory, otherwise the InstallationController
will create a
component_id
subdirectory for the component code and resources. If the custom
message listener is not null
, the InstallationController
class
sends all stdout and stderr messages to this message listener, otherwise these messages are
sent to the default message listener, which prints them to the standard console streams.componentId
- The given component ID.localPearFile
- The given local PEAR file.rootDir
- The given local root directory for installation.installInRootDir
- If true
, the component will be installed in the given root directory,
otherwise it will be installed in the component_id
subdirectory of the
root directory.msgListener
- The given custom message listener or null
.public InstallationController(String componentId, File localPearFile, File rootDir, boolean installInRootDir, MessageRouter.StdChannelListener msgListener, boolean cleanInstallDir)
installInRootDir
flag is true
, the component code and resources will be installed in the
specified root directory, otherwise the InstallationController
will create a
component_id
subdirectory for the component code and resources. If the custom
message listener is not null
, the InstallationController
class
sends all stdout and stderr messages to this message listener, otherwise these messages are
sent to the default message listener, which prints them to the standard console streams.componentId
- The given component ID.localPearFile
- The given local PEAR file.rootDir
- The given local root directory for installation.installInRootDir
- If true
, the component will be installed in the given root directory,
otherwise it will be installed in the component_id
subdirectory of the
root directory.msgListener
- The given custom message listener or null
.cleanInstallDir
- If true
, the target installation directory will be cleaned before the
PEAR file is installed.protected static StringBuffer addListOfJarFiles(File libDir, StringBuffer listBuffer) throws IOException
StringBuffer
object. If null
StringBuffer
object is specified, creates new StringBuffer
object.libDir
- The given lib directory.listBuffer
- The initial StringBuffer
object.StringBuffer
.IOException
- If any I/O exception occurred.protected static boolean addToSystemEnvTable(Properties sysEnvTable, String localKey, String localValue)
sysEnvTable
- The table of system environment variables.localKey
- The given local environment variable key.localValue
- The given local environment variable value.true
if the local value was really added, false
otherwise.public static String[] buildArrayOfNetworkParams(InstallationDescriptor insdObject)
insdObject
- The given installation descriptor object.public static String buildComponentClassPath(String compRootDirPath, InstallationDescriptor insdObject, boolean addLibDir) throws IOException
compRootDirPath
- The given root directory of the installed component.insdObject
- The given installation descriptor object.addLibDir
- Whether we should add jars from the libdir or not (true at packaging time, false at
runtime).IOException
- If any I/O exception occurred.public static String buildComponentPath(String compRootDirPath, InstallationDescriptor insdObject)
compRootDirPath
- The given root directory of the installed component.insdObject
- The given installation descriptor object.public static String buildListOfEnvVars(InstallationDescriptor insdObject)
insdObject
- The given installation descriptor object.public static String buildListOfNetworkParams(InstallationDescriptor insdObject)
insdObject
- The given installation descriptor object.public static Properties buildTableOfEnvVars(InstallationDescriptor insdObject)
Properties
table that contains (name, value) pairs of environment
variables settings for a given installation descriptor object.insdObject
- The given installation descriptor object.Properties
table that contains environment variables settings for
the given installation descriptor object.public static String buildUIMAClassPath(String uimaHomeEnv)
uimaHomeEnv
- The location of UIMA framework (UIMA_HOME environment variable value).public static boolean deleteInstalledFiles(String componentId, File parentDir, boolean includeDelegates) throws IOException
includeDelegates
flag is true
, deletes also all files installed
in a given parent directory for separate delegate components, specified in the main
installation descriptor.componentId
- The given main component ID.parentDir
- The given parent directory of the main component root directory.includeDelegates
- Indicates whether files of the specified separate delegate components should be
deleted.true
, if the deletion operation completed successfully,
false
otherwise.IOException
- if any I/O exception occurred.public static String extractFilesFromPEARFile(String pearFileLocation, String fileExt, File targetDir, boolean cleanTarget) throws IOException
null
, extracts all the files from a given PEAR
file. Returns the path to the new component root directory.pearFileLocation
- The given PEAR file location.fileExt
- The given filename extension.targetDir
- The given target directory.cleanTarget
- If true, the target directory is cleaned before the PEAR file is installed to it.IOException
- if any I/O exception occurred.protected static String extractFilesFromPEARFile(String pearFileLocation, String fileExt, File targetDir, InstallationController controller, boolean cleanTarget) throws IOException
extractFilesFromPEARFile
method, which allows
sending messages to the OUT and ERR queues.pearFileLocation
- The given PEAR file location.fileExt
- The given filename extension.targetDir
- The given target directory.controller
- The instance of the InstallationController
class that provides OUT and ERRcleanTarget
- If true, the target directory is cleaned before the PEAR file is installed to it.
message routing, or null
.IOException
- if any I/O exception occurred.public static String extractPEARFile(String pearFileLocation, File installationDir, boolean cleanTarget) throws IOException
pearFileLocation
- The given PEAR file location.installationDir
- The given target directory.cleanTarget
- If true, the target directory is cleaned before the PEAR file is installed to it.IOException
- if any I/O exception occurred.protected static String extractPEARFile(String pearFileLocation, File installationDir, InstallationController controller, boolean cleanTarget) throws IOException
extractPEARFile
method, which allows sending
messages to the OUT and ERR queues.pearFileLocation
- The given PEAR file location.installationDir
- The given target directory.controller
- The instance of the InstallationController
class that provides OUT and ERR
message routing, or null
.cleanTarget
- If true, the target directory is cleaned before the PEAR file is installed to it.IOException
- if any I/O exception occurred.protected static Hashtable<String,InstallationDescriptor> getDelegateInstallationDescriptors(Hashtable<String,String> installationTable) throws IOException
Hashtable
that contains (compId, InsD) pairs for all separate delegate
components specified in a given installation table.installationTable
- The given installation table that specifies (compId, rootDirPath) pairs for all
separate delegate components.Hashtable
that contains (compId, InsD) pairs for all separate
delegate components specified in the given installation table.IOException
- If an I/O exception occurred while loading the installation descriptor files.public static String getHostIpAddress()
protected static String getInstalledComponentRootPath(String componentId, InstallationController.PackageSelector pkgSelector)
PackageSelector
input. If the given PackageSelector
is null
, the default PackageSelector
implementation is used.componentId
- The given installed component ID.pkgSelector
- The instance of the
PackageSelector
class that allows selecting root directory
of the installed component in the local file system.null
, if the component is not installed.protected static String getPEARFileLocation(String componentId, InstallationController.PackageSelector pkgSelector)
PackageSelector
input. If the given PackageSelector
is
null
, the default PackageSelector
implementation is used.componentId
- The given component ID.pkgSelector
- The instance of the
PackageSelector
class that allows selecting location of the
given component PEAR file in the local file system, or in the network.null
, if the PEAR file was not found.public static void main(String[] args)
args
- {-local pear_file | main_component_id} [-default] [installation_dir]public static void setLocalMode(boolean inLocalMode)
boolean
flag.inLocalMode
- if true
the utility operates in the 'local' mode, otherwise it operates
in the 'DB' mode.public static InstallationController.TestStatus verifyComponentInstallation(PackageBrowser pkgBrowser)
TestStatus
object with the test results.pkgBrowser
- The given package browser object of the installed pear package.TestStatus
object that contains the return code and possible error
message of the test.public void addMsgListener(MessageRouter.StdChannelListener listener)
MessageRouter.StdChannelListener
interface
to the list of standard channel listeners.listener
- The given MessageRouter.StdChannelListener
object to be added to the
list.public String buildComponentClassPath() throws IOException
CLASSPATH
for the installed component, including CLASSPATH
for all separate delegate components that are utilized by the main installed component, if any.CLASSPATH
for the installed component, or null
, if
the component has not been installed.IOException
- If any I/O exception occurred.public String buildComponentPath()
PATH
for the installed component, including PATH
for all
separate delegate components that are utilized by the main installed component, if any.PATH
for the installed component, or null
, if the
component has not been installed.public Properties buildTableOfEnvVars()
Properties
table of required environment variables for the installed
component, including environment variables for all separate delegate components that are
utilized by the main installed component, if any.Properties
table of required environment variables for the installed
component, or null
, if the component has not been installed.protected void finalize()
finalize
method.public InstallationDescriptor installComponent()
InstallationDescriptor
object for the installed component. If the installation
failed, returns null
, and sets the installation error message that can be
retrieved using the getInstallationMsg()
method.InstallationDescriptor
object for the installed component, if the
installation succeeded, null
otherwise.public InstallationDescriptor installComponentDescriptors()
InstallationDescriptor
object
for the partially installed component. If the installation failed, returns null
,
and sets the installation error message that can be retrieved using the
getInstallationMsg()
method.InstallationDescriptor
object for the partially installed component,
if the installation succeeded, null
otherwise.protected void installDelegateComponents()
protected void installDelegateComponentsDescriptors()
protected static void generatePearSpecifier(String mainComponentRootPath, String mainComponentId) throws IOException, SAXException
mainComponentRootPath
- main component root path where the pear was installed tomainComponentId
- main component ID of the installed pear fileIOException
- if IO ExceptionSAXException
- if SAX Exceptionprotected void generateSetEnvFile() throws IOException
IOException
- if any I/O exception occurred.protected void generatePackageConfigFile() throws IOException
IOException
- if any I/O exception occurred.protected PrintWriter getErrMsgWriter()
public String getInstallationMsg()
protected PrintWriter getOutMsgWriter()
public String getVerificationMsg()
public void removeMsgListener(MessageRouter.StdChannelListener listener)
MessageRouter.StdChannelListener
object from the list of
standard channel listeners.listener
- The given MessageRouter.StdChannelListener
object to be removed from
the list.public void saveInstallationDescriptorFile() throws IOException
IOException
- if any I/O exception occurred.protected void setInstallationError(Exception error)
Exception
object as the installation error
message.error
- The given Exception
object.public void setInstallationMonitor(InstallationController.InstallationMonitor monitor)
InstallationMonitor
interface.monitor
- The given implementation of the InstallationMonitor
interface.public void setPackageSelector(InstallationController.PackageSelector selector)
PackageSelector
interface.selector
- The given implementation of the PackageSelector
interface.protected void setVerificationError(Exception error)
Exception
object as the verification error
message.error
- The given Exception
object.public void setUimaHomePath(String uimaHomePath)
uimaHomePath
- The given UIMA local home directory path.public void terminate()
MessageRouter
thread. This method should be called after all the
processing is finished.public boolean verifyComponent()
true
if the verification completed successfully, false
otherwise.Copyright © 2006–2017 The Apache Software Foundation. All rights reserved.