public class InstallationProcessor
extends java.lang.Object
InstallationProcessor class implements operations specified in the
installation descriptor. This class also allows generating the default Vinci Service descriptor
for the specified component.InstallationDescriptor| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.String |
DELEGATE_ROOT_PREFIX_REGEX |
protected static java.lang.String |
DELEGATE_ROOT_REL_SUFFIX_REGEX |
protected static java.lang.String |
DELEGATE_ROOT_SUFFIX_REGEX |
protected static java.lang.String |
DELEGATE_ROOT_URL_SUFFIX_REGEX |
static java.lang.String |
INSD_FILE_PATH |
protected static java.lang.String |
MAIN_ROOT_REGEX |
protected static java.lang.String |
MAIN_ROOT_REL_REGEX |
protected static java.lang.String |
MAIN_ROOT_URL_REGEX |
static java.lang.String |
VS_DESCRIPTOR_PATH |
| Constructor and Description |
|---|
InstallationProcessor(java.lang.String mainRootPath,
java.util.Hashtable<java.lang.String,java.lang.String> installationTable)
Constructs an instance of the
InstallationProcessor class, using given main
component root path and a table of installed delegate components. |
InstallationProcessor(java.lang.String mainRootPath,
java.util.Hashtable<java.lang.String,java.lang.String> installationTable,
InstallationController controller)
Similar to previous constructor, but sets a given
InstallationController object
as the requestor. |
| Modifier and Type | Method and Description |
|---|---|
protected static java.lang.String |
componentIdRootRegExp(java.lang.String componentId,
java.lang.String suffix)
Builds $component_id$
|
protected static void |
findAndReplacePath(InstallationDescriptor.ActionInfo action)
Performs a specified 'find_and_replace_path' installation action.
|
static void |
generateVSDescriptor(InstallationDescriptor insdObject,
java.io.File mainRootDir)
Generates default Vinci Service descriptor for a specified component, and puts it to a
specified location.
|
static java.io.InputStream |
generateVSDescriptorAsStream(InstallationDescriptor insdObject)
Generates default Vinci Service descriptor for a specified component, and returns the content
of the descriptor as a stream (for Eclipse plug-in).
|
protected static java.lang.String |
generateVSDescriptorContent(InstallationDescriptor insdObject)
Generates the default Vinci Service descriptor content for a specified component.
|
InstallationDescriptor |
getInstallationDescriptor() |
protected void |
initSubstitutionTables(java.lang.String mainRootPath)
Initializes two
Hashtable objects that are used to substitute $dlg_comp_id$root
macros in URL and absolute path expressions. |
void |
process()
Starts processing installation instructions from the specified installation descriptor.
|
protected static java.lang.String |
substituteCompIdRootInString(java.lang.String source,
java.lang.String compId,
java.lang.String compRootPath)
Substitutes '$dlg_comp_id$root_url' and '$dlg_comp_id$root' macros in a given string for a
given delegate component.
|
protected static java.lang.String |
substituteMainRootInString(java.lang.String source,
java.lang.String mainRootPath)
Substitutes '$main_root_url' and '$main_root' macros in a given string.
|
protected void |
substituteStringVariablesInAction(java.util.Properties params)
Substitutes two $main_root as well as two $comp_id$root macros in a given 'action'
Properties object values. |
protected void |
substituteStringVariablesInFiles(java.io.File dir)
Substitutes two $main_root as well as three $comp_id$root macros in all files in a given
directory, including its sub-directories.
|
public static final java.lang.String INSD_FILE_PATH
public static final java.lang.String VS_DESCRIPTOR_PATH
protected static final java.lang.String MAIN_ROOT_REGEX
protected static final java.lang.String MAIN_ROOT_REL_REGEX
protected static final java.lang.String MAIN_ROOT_URL_REGEX
protected static final java.lang.String DELEGATE_ROOT_PREFIX_REGEX
protected static final java.lang.String DELEGATE_ROOT_SUFFIX_REGEX
protected static final java.lang.String DELEGATE_ROOT_REL_SUFFIX_REGEX
protected static final java.lang.String DELEGATE_ROOT_URL_SUFFIX_REGEX
public InstallationProcessor(java.lang.String mainRootPath,
java.util.Hashtable<java.lang.String,java.lang.String> installationTable)
InstallationProcessor class, using given main
component root path and a table of installed delegate components.mainRootPath - The given main component root path.installationTable - The given table of installed delegate components.public InstallationProcessor(java.lang.String mainRootPath,
java.util.Hashtable<java.lang.String,java.lang.String> installationTable,
InstallationController controller)
InstallationController object
as the requestor.mainRootPath - The given main component root path.installationTable - The given table of installed delegate components.controller - The given InstallationController requestor.protected static java.lang.String componentIdRootRegExp(java.lang.String componentId,
java.lang.String suffix)
componentId - The given component ID.public static void generateVSDescriptor(InstallationDescriptor insdObject, java.io.File mainRootDir) throws java.io.IOException
insdObject - The given installation descriptor of the component.mainRootDir - The given root directory of the component.java.io.IOException - if any I/O exception occurred.public static java.io.InputStream generateVSDescriptorAsStream(InstallationDescriptor insdObject) throws java.io.IOException
insdObject - The given installation descriptor of the component.java.io.IOException - if any I/O exception occurred.protected static java.lang.String generateVSDescriptorContent(InstallationDescriptor insdObject)
insdObject - The given installation descriptor of the component.protected static void findAndReplacePath(InstallationDescriptor.ActionInfo action) throws java.io.IOException
action - The given 'find_and_replace_path' installation action.java.io.IOException - if any I/O exception occurred.protected static java.lang.String substituteCompIdRootInString(java.lang.String source,
java.lang.String compId,
java.lang.String compRootPath)
source - The given source string.compId - The given component ID.compRootPath - The given component root directory path.protected static java.lang.String substituteMainRootInString(java.lang.String source,
java.lang.String mainRootPath)
source - The given source string.mainRootPath - The given main component root directory path.public InstallationDescriptor getInstallationDescriptor()
InstallationDescriptor object, if the processing completed,
null otherwise.protected void initSubstitutionTables(java.lang.String mainRootPath)
Hashtable objects that are used to substitute $dlg_comp_id$root
macros in URL and absolute path expressions.mainRootPath - The given main component root directory path.public void process()
throws java.io.IOException
java.io.IOException - if any I/O exception occurred.protected void substituteStringVariablesInAction(java.util.Properties params)
Properties object values.params - The given Properties object.protected void substituteStringVariablesInFiles(java.io.File dir)
throws java.io.IOException
dir - The given directory.java.io.IOException - if any I/O exception occurred.Copyright © 2013. All Rights Reserved.