public class InstallationDescriptor extends Object implements Serializable
InstallationDescriptor
class encapsulates all elements and parameters included
in the XML Installation Descriptor file.InstallationDescriptorHandler
,
Serialized FormModifier and Type | Class and Description |
---|---|
static class |
InstallationDescriptor.ActionInfo
The
ActionInfo class defines 'installation action' attributes. |
static class |
InstallationDescriptor.ArgInfo
The
ArgInfo class defines attributes of a service command argument. |
static class |
InstallationDescriptor.ComponentInfo
The
ComponentInfo class defines UIMA component attributes. |
static class |
InstallationDescriptor.ServiceInfo
The
ServiceInfo class defines attributes of a 'service' component. |
Modifier and Type | Field and Description |
---|---|
static String |
PROPERTY_DELIMITER |
static String |
VNS_HOST |
static String |
VNS_PORT |
static String |
VNS_SPECS |
Constructor and Description |
---|
InstallationDescriptor()
Default constructor.
|
InstallationDescriptor(File insdFile)
Constructor that takes a given original InsD file as an argument.
|
Modifier and Type | Method and Description |
---|---|
void |
addDelegateComponent(String id,
String name)
Creates and adds a delegate component specification to the list (for aggregate component).
|
void |
addFrameworkSpec(String specName,
String specValue)
Adds a specification defined by given name and value to the set of Framework specifications.
|
void |
addInstallationAction(InstallationDescriptor.ActionInfo action)
Adds a specified 'installation action' to the list.
|
void |
addOSSpec(String specName,
String specValue)
Adds a specification defined by given name and value to the set of OS specifications.
|
protected static Properties |
addProperty(Properties props,
String name,
String value)
Adds a property specified by given name and value to a given
Properties object. |
void |
addToolkitsSpec(String specName,
String specValue)
Adds a specification defined by given name and value to the set of Toolkits specifications.
|
void |
clearDelegateComponents()
Removes all specified delegate components.
|
void |
clearFrameworkSpecs()
Removes all Framework specifications.
|
void |
clearInstallationActions()
Removes all specified installation actions.
|
void |
clearOSSpecs()
Removes all OS specifications.
|
void |
clearToolkitsSpecs()
Removes all Toolkits specifications.
|
void |
deleteDelegateComponent(String id)
Removes a specified delegate component associated with a given component ID.
|
void |
deleteFrameworkSpec(String specName,
String specValue)
Removes a specification defined by given name and value from the set of Framework
specifications.
|
void |
deleteInstallationActions(String actionName)
Removes all installation actions associated with a given action name (FIND_AND_REPLACE_PATH_ACT
or SET_ENV_VARIABLE_ACT).
|
void |
deleteOSSpec(String specName,
String specValue)
Removes a specification defined by given name and value from the set of OS specifications.
|
protected static Properties |
deleteProperty(Properties props,
String name,
String value)
Deletes a property specified by given name and value from a given
Properties
object. |
void |
deleteToolkitsSpec(String specName,
String specValue)
Removes a specification defined by given name and value from the set of Toolkits
specifications.
|
Hashtable<String,InstallationDescriptor.ComponentInfo> |
getDelegateComponents() |
Properties |
getFrameworkSpecs() |
Collection<InstallationDescriptor.ActionInfo> |
getInstallationActions() |
Collection<InstallationDescriptor.ActionInfo> |
getInstallationActions(String actionName)
Returns the list of specified
ActionInfo objects that have a given action name. |
File |
getInstallationDescriptorFile() |
String |
getMainCasConsumerDesc() |
String |
getMainCasConsumerDesc(boolean relativePath)
Returns absolute or relative path to the specified CAS Consumer descriptor for the main
(submitted) component, or
null , if the main component was not specified. |
String |
getMainCasInitializerDesc() |
String |
getMainCasInitializerDesc(boolean relativePath)
Returns absolute or relative path to the specified CAS Initializer descriptor for the main
(submitted) component, or
null , if the main component was not specified. |
String |
getMainCollIteratorDesc() |
String |
getMainCollIteratorDesc(boolean relativePath)
Returns absolute or relative path to the specified Collection Iterator descriptor for the main
(submitted) component, or
null , if the main component was not specified. |
String |
getMainComponentDeployment() |
String |
getMainComponentDesc() |
String |
getMainComponentDesc(boolean relativePath)
Returns absolute or relative path to the specified XML AE descriptor for the main (submitted)
component, or
null , if the main component was not specified. |
String |
getMainComponentId() |
String |
getMainComponentName() |
Properties |
getMainComponentNetworkParam(String paramName) |
Set<String> |
getMainComponentNetworkParamNames() |
Properties |
getMainComponentProps() |
String |
getMainComponentRoot() |
InstallationDescriptor.ServiceInfo |
getMainComponentService() |
Properties |
getOSSpecs() |
protected static String |
getRelativePathForComponentObject(String absolutePath,
InstallationDescriptor.ComponentInfo component)
Constructs a relative path of a given component object, based on its absolute path.
|
Properties |
getToolkitsSpecs() |
void |
setDelegateComponentDesc(String id,
String descFilePath)
Sets a given descriptor file path to a given delegate component.
|
void |
setDelegateComponentName(String id,
String name)
Assignes a given name to a given delegate component.
|
void |
setDelegateComponentProperty(String id,
String propName,
String propValue)
Assignes a given property to a given delegate component.
|
void |
setDelegateComponentRoot(String id,
String rootDirPath)
Sets a given directory path as the root path for a given delegate component.
|
void |
setInstallationDescriptorFile(File insdFile)
Assignes a given installation descriptor file to this object.
|
void |
setMainCasConsumerDesc(String descFilePath)
Sets a given main CAS consumer descriptor file.
|
void |
setMainCasInitializerDesc(String descFilePath)
Sets a given main CAS initializer descriptor file.
|
void |
setMainCollIteratorDesc(String descFilePath)
Sets a given main Collection iterator descriptor file.
|
void |
setMainComponent(String id)
Sets a given main component using a given component ID.
|
void |
setMainComponent(String id,
String name)
Sets a given main component using given component ID and name.
|
void |
setMainComponentDeployment(String deplType)
Sets a given main component deployment type:
standard , service
or network . |
void |
setMainComponentDesc(String descFilePath)
Sets a given main component descriptor file.
|
void |
setMainComponentId(String id)
Replaces existing main component ID with a given new ID.
|
void |
setMainComponentName(String name)
Sets a given main component name.
|
void |
setMainComponentNetworkParam(String paramName,
Properties paramSpecs)
Sets a specifications of a given network component parameter.
|
void |
setMainComponentProperty(String propNname,
String propValue)
Sets a given main component property.
|
void |
setMainComponentRoot(String rootDirPath)
Sets a given main component root directory.
|
void |
setMainComponentService(InstallationDescriptor.ServiceInfo serviceInfo)
Sets a given main component service specifications.
|
String |
toString() |
void |
updateMainComponentId(String id)
Deprecated.
Use setMainComponentId() method instead.
|
public static final String PROPERTY_DELIMITER
public static final String VNS_SPECS
public static final String VNS_HOST
public static final String VNS_PORT
public InstallationDescriptor()
public InstallationDescriptor(File insdFile)
insdFile
- The given original InsD file.protected static Properties addProperty(Properties props, String name, String value)
Properties
object.
If the given object already contains a property with the given name, adds a new value to this
property using PROPERTY_DELIMITER as the delimiter, unless the existing property value list
already contains the given new value.props
- The given Properties
object to be modified.name
- The given property name.value
- The given new value of the property.Properties
object.protected static Properties deleteProperty(Properties props, String name, String value)
Properties
object. If the given object contains one or more PROPERTY_DELIMITER separated values under the
given property name, removes the value that is equal to the specified value. If no values
remain under the given name, removes the property associated with the specified name from the
given object.props
- The given Properties
object to be modified.name
- The given property name.value
- The given new value of the property.Properties
object.protected static String getRelativePathForComponentObject(String absolutePath, InstallationDescriptor.ComponentInfo component)
absolutePath
- The given absolute path of the object.component
- The given component instance.public void addDelegateComponent(String id, String name)
id
- The given delegate component ID.name
- The given delegate component name.public void addFrameworkSpec(String specName, String specValue)
specName
- The given specification name.specValue
- The given specification value.public void addInstallationAction(InstallationDescriptor.ActionInfo action)
action
- The specified 'installation action' object.public void addOSSpec(String specName, String specValue)
specName
- The given specification name.specValue
- The given specification value.public void addToolkitsSpec(String specName, String specValue)
specName
- The given specification name.specValue
- The given specification value.public void clearDelegateComponents()
public void clearFrameworkSpecs()
public void clearInstallationActions()
public void clearOSSpecs()
public void clearToolkitsSpecs()
public void deleteDelegateComponent(String id)
id
- The given delegate component ID to be removed.public void deleteFrameworkSpec(String specName, String specValue)
specName
- The given specification name.specValue
- The given specification value.public void deleteInstallationActions(String actionName)
actionName
- The given action name.public void deleteOSSpec(String specName, String specValue)
specName
- The given specification name.specValue
- The given specification value.public void deleteToolkitsSpec(String specName, String specValue)
specName
- The given specification name.specValue
- The given specification value.public Hashtable<String,InstallationDescriptor.ComponentInfo> getDelegateComponents()
ComponentInfo
objects that encapsulate specifications of
the registered delegate components (for aggregate component).public Properties getFrameworkSpecs()
public Collection<InstallationDescriptor.ActionInfo> getInstallationActions()
ActionInfo
objects that encapsulate specifications of
all requested installation actions.public Collection<InstallationDescriptor.ActionInfo> getInstallationActions(String actionName)
ActionInfo
objects that have a given action name.actionName
- The given action name.ActionInfo
objects that have the given action name.public File getInstallationDescriptorFile()
public String getMainCasConsumerDesc()
null
, if the main component was not specified.public String getMainCasConsumerDesc(boolean relativePath)
null
, if the main component was not specified. If the
relative path is requested, returns the path relative to the main component root dir.relativePath
- If true
, returns relative path, otherwise returns absolute path.null
, if the main component was not
specified.public String getMainCasInitializerDesc()
null
if the main component was not specified.public String getMainCasInitializerDesc(boolean relativePath)
null
, if the main component was not specified. If the
relative path is requested, returns the path relative to the main component root dir.relativePath
- If true
, returns relative path, otherwise returns absolute path.null
, if the main component was not
specified.public String getMainCollIteratorDesc()
null
if the main component was not specified.public String getMainCollIteratorDesc(boolean relativePath)
null
, if the main component was not specified. If the
relative path is requested, returns the path relative to the main component root dir.relativePath
- If true
, returns relative path, otherwise returns absolute path.null
, if the main component was not
specified.public String getMainComponentDeployment()
standard
),
if no deployment type specified.public String getMainComponentDesc()
null
if the main component was not specified.public String getMainComponentDesc(boolean relativePath)
null
, if the main component was not specified. If the relative
path is requested, returns the path relative to the main component root dir.relativePath
- If true
, returns relative path, otherwise returns absolute path.null
, if the main component was not specified.public String getMainComponentId()
null
if the main
component was not specified.public String getMainComponentName()
null
if the
main component was not specified.public Properties getMainComponentNetworkParam(String paramName)
paramName
- The given network component parameter name.public Set<String> getMainComponentNetworkParamNames()
Set
of the network component parameter names.public Properties getMainComponentProps()
null
if the main component was not specified.public String getMainComponentRoot()
null
if the main component was not specified.public InstallationDescriptor.ServiceInfo getMainComponentService()
public Properties getOSSpecs()
public Properties getToolkitsSpecs()
public void setInstallationDescriptorFile(File insdFile)
insdFile
- The given installation descriptor file.public void setDelegateComponentDesc(String id, String descFilePath)
id
- The given delegate component ID.descFilePath
- The given descriptor file path.public void setDelegateComponentName(String id, String name)
id
- The given delegate component ID.name
- The given delegate component name.public void setDelegateComponentProperty(String id, String propName, String propValue)
id
- The given delegate component ID.propName
- The given property name.propValue
- The given property value.public void setDelegateComponentRoot(String id, String rootDirPath)
id
- The given delegate component ID.rootDirPath
- The given root directory path.public void setMainCasConsumerDesc(String descFilePath)
descFilePath
- The given CAS consumer descriptor file path.public void setMainCasInitializerDesc(String descFilePath)
descFilePath
- The given CAS initializer descriptor file path.public void setMainCollIteratorDesc(String descFilePath)
descFilePath
- The given Collection iterator descriptor file path.public void setMainComponent(String id)
id
- The given main component ID.public void setMainComponent(String id, String name)
id
- The given main component ID.name
- The given main component name.public void setMainComponentDeployment(String deplType)
standard
, service
or network
.deplType
- The specified deployment type.public void setMainComponentDesc(String descFilePath)
descFilePath
- The given main component descriptor file path.public void setMainComponentId(String id)
id
- The given new ID of the main component.public void setMainComponentName(String name)
name
- The given main component name.public void setMainComponentNetworkParam(String paramName, Properties paramSpecs)
paramName
- The given network component parameter name.paramSpecs
- The specifications of the given network component parameter.public void setMainComponentProperty(String propNname, String propValue)
propNname
- The given property name.propValue
- The given property value.public void setMainComponentRoot(String rootDirPath)
rootDirPath
- The given main component root directory path.public void setMainComponentService(InstallationDescriptor.ServiceInfo serviceInfo)
service
deployment type.serviceInfo
- The given main component service specifications.public String toString()
toString
in class Object
Object.toString()
@Deprecated public void updateMainComponentId(String id)
id
- The given new ID of the main component.Copyright © 2006–2017 The Apache Software Foundation. All rights reserved.