|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.metamatrix.common.config.xml.XMLHelperImpl
public class XMLHelperImpl
This helper class is used to create JDOM XML Elements from configuration objects and to create Configuration objects from JDOM XML Elements. NOTE - The helper cannot have any calls to LogManager because the bootstrapping of the CurrentConfiguration uses this class and the CurrentConfiguration has to come up before logging is available.
Field Summary |
---|
Fields inherited from interface com.metamatrix.common.config.util.ConfigurationPropertyNames |
---|
APPLICATION_CREATED_BY, APPLICATION_VERSION_CREATED_BY, CONFIG_CURR_VERSION, CONFIG_CURR_VERSION_DBL, CONFIGURATION_VERSION, MEMBERSHIP_ADMIN_PASSWORD, MEMBERSHIP_ADMIN_USERNAME, MEMBERSHIP_DOMAIN_ORDER, MEMBERSHIP_SECURITY_ENABLED, SYSTEM_VERSION, TIME, USER_CREATED_BY |
Constructor Summary | |
---|---|
XMLHelperImpl()
|
Method Summary | |
---|---|
ComponentObject |
addProperties(org.jdom.Element propertiesElement,
ComponentObject object,
ConfigurationObjectEditor editor)
This method will create a ComponentObject configuration object from an XML element that represents a ComponentObject. |
AuthenticationProvider |
createAuthenticationProvider(org.jdom.Element element,
ConfigurationID configID,
ConfigurationObjectEditor editor)
This method will create a Resource configuration object from an XML element that represents a Resource. |
org.jdom.Element |
createAuthenticationProviderElement()
|
org.jdom.Element |
createAuthenticationProviderElement(AuthenticationProvider defn)
This method is used to create a ServiceComponentDefn JDOM Element from a ServiceComponentDefn object. |
ComponentType |
createComponentType(org.jdom.Element element,
ConfigurationObjectEditor editor,
java.lang.String name,
boolean maintainParentID)
This method will create a ComponentType configuration object from an XML element that represents a ComponentType. |
org.jdom.Element |
createComponentTypeDefnElement(ComponentTypeDefn defn)
This method is used to create a ComponentTypeDefn JDOM Element from a ComponentTypeDefn object. |
org.jdom.Element |
createComponentTypeElement(ComponentType type)
This method is used to create a ComponentType JDOM Element from a ComponentType object. |
org.jdom.Element |
createComponentTypesElement()
This method is used to create a ComponentTypes JDOM Element from a Configuration ID object. |
Configuration |
createConfiguration(org.jdom.Element element,
ConfigurationObjectEditor editor,
java.lang.String name)
This method will create a Configuration configuration object from an XML element that represents a Configuration. |
org.jdom.Element |
createConfigurationElement(Configuration configuration)
This method is used to create a Configuration JDOM Element from a Configuration object. |
org.jdom.Element |
createConfigurationsElement()
This method is used to create a Configurations JDOM Element from a Configuration ID object. |
ConnectorBinding |
createConnectorBinding(ConfigurationID configurationID,
org.jdom.Element element,
ConfigurationObjectEditor editor,
java.lang.String name,
boolean isImportConfig)
|
org.jdom.Element |
createConnectorBindingElement(ConnectorBinding connector,
boolean isExportConfig)
|
org.jdom.Element |
createConnectorBindingsElement()
|
DeployedComponent |
createDeployedServiceComponent(org.jdom.Element element,
ConfigurationID configID,
HostID hostID,
VMComponentDefnID vmID,
java.util.Map componentTypeMap,
ConfigurationObjectEditor editor)
|
org.jdom.Element |
createDeployedServiceElement(DeployedComponent deployedComponent)
This method is used to create a DeployedComponent JDOM Element from a DeployedComponent object. |
org.jdom.Element |
createHeaderElement(java.util.Properties props)
This method is used to create a Header JDOM Element from a Properties object. |
Host |
createHost(org.jdom.Element element,
ConfigurationID configID,
ConfigurationObjectEditor editor,
java.lang.String name)
This method will create a Host configuration object from an XML element that represents a Host. |
org.jdom.Element |
createHostElement(Host host)
This method is used to create a Host JDOM Element from a Host object. |
org.jdom.Element |
createIDElement(java.lang.String type,
java.lang.String name)
This method is used to create a Configuration ID JDOM Element from a Configuration ID object. |
BasicVMComponentDefn |
createProcess(org.jdom.Element element,
ConfigurationID configID,
HostID hostID,
ConfigurationObjectEditor editor,
java.lang.String name)
This method will create a VMComponentDefn configuration object from an XML element that represents a VMComponentDefn. |
org.jdom.Element |
createProcessElement(VMComponentDefn defn)
This method is used to create a VMComponentDefn JDOM Element from a VMComponentDefn object. |
org.jdom.Element |
createPropertiesElement(java.util.Properties props)
This method is used to create a Properties JDOM Element from a Properties object. |
PropertyDefinition |
createPropertyDefinition(org.jdom.Element element)
This method is a helper method to create a PropertyDefinition object from an XML element that represents same. |
org.jdom.Element |
createPropertyDefinitionElement(PropertyDefinition defn)
This method is used to create a PropertyDefinition JDOM Element from a PropertyDefinition object. |
org.jdom.Element |
createRootConfigurationDocumentElement()
This method is used to create a root JDOM Element. |
ComponentDefn |
createServiceComponentDefn(org.jdom.Element element,
Configuration config,
ConfigurationObjectEditor editor,
java.lang.String name)
This method will create a ServiceComponentDefn configuration object from an XML element that represents a ServiceComponentDefn. |
ComponentDefn |
createServiceComponentDefn(org.jdom.Element element,
ConfigurationID configID,
ConfigurationObjectEditor editor,
java.lang.String name)
|
org.jdom.Element |
createServiceComponentDefnElement(ServiceComponentDefn defn)
This method is used to create a ServiceComponentDefn JDOM Element from a ServiceComponentDefn object. |
org.jdom.Element |
createServiceComponentDefnsElement()
This method is used to create a ServiceComponentDefns JDOM Element. |
SharedResource |
createSharedResource(org.jdom.Element element,
ConfigurationObjectEditor editor)
This method will create a Resource configuration object from an XML element that represents a Resource. |
org.jdom.Element |
createSharedResourceElement(SharedResource resource)
This method is used to create a ServiceComponentDefn JDOM Element from a ServiceComponentDefn object. |
org.jdom.Element |
createSharedResourcesElement()
|
java.util.Properties |
getHeaderProperties(org.jdom.Element element)
|
ComponentType |
loadComponentType(org.jdom.Element rootElement)
|
ConnectorBinding |
loadConnectorBinding(org.jdom.Element rootElement)
|
void |
orderComponentTypeElementList(java.util.List componentTypeElements)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XMLHelperImpl()
Method Detail |
---|
public org.jdom.Element createConfigurationElement(Configuration configuration)
configuration
- the Object to be converted to a JDOM XML Element
public org.jdom.Element createDeployedServiceElement(DeployedComponent deployedComponent)
deployedComponent
- the Object to be converted to a JDOM XML Element
public org.jdom.Element createProcessElement(VMComponentDefn defn)
defn
- the Object to be converted to a JDOM XML Element
public org.jdom.Element createServiceComponentDefnElement(ServiceComponentDefn defn)
defn
- the Object to be converted to a JDOM XML Element
public org.jdom.Element createAuthenticationProviderElement(AuthenticationProvider defn)
defn
- the Object to be converted to a JDOM XML Element
public org.jdom.Element createComponentTypeElement(ComponentType type)
type
- the Object to be converted to a JDOM XML Element
public org.jdom.Element createPropertyDefinitionElement(PropertyDefinition defn)
defn
- the Object to be converted to a JDOM XML Element
public org.jdom.Element createComponentTypeDefnElement(ComponentTypeDefn defn)
defn
- the Object to be converted to a JDOM XML Element
public org.jdom.Element createHostElement(Host host)
host
- the Object to be converted to a JDOM XML Element
public java.util.Properties getHeaderProperties(org.jdom.Element element) throws InvalidConfigurationElementException
InvalidConfigurationElementException
public org.jdom.Element createHeaderElement(java.util.Properties props)
This method is used to create a Header JDOM Element from a Properties object. The properties object can contain any of the following properties that will be included in the header:
XMLConfig_ElementNames.Header.ApplicationCreatedDate.ELEMENT XMLConfig_ElementNames.Header.ApplicationVersionCreatedBy.ELEMENT XMLConfig_ElementNames.Header.UserName.ELEMENT XMLConfig_ElementNames.Header.DocumentTypeVersion.ELEMENT XMLConfig_ElementNames.Header.MetaMatrixServerVersion.ELEMENT XMLConfig_ElementNames.Header.Time.ELEMENTAny of these properties that are not included in the properties object will not be included in the header Element that is returned.
props
- the properties object that contains the values for the Header
public org.jdom.Element createPropertiesElement(java.util.Properties props)
props
- the Object to be converted to a JDOM XML Element
public org.jdom.Element createIDElement(java.lang.String type, java.lang.String name)
type
- the ID type to be created. @see XMLConfig_ElementNames.Configuration.XXXID.ELEMENT for valid valuesname
- the calue of the name attribute of the ID element to create.
public org.jdom.Element createConfigurationsElement()
public org.jdom.Element createServiceComponentDefnsElement()
public org.jdom.Element createComponentTypesElement()
public org.jdom.Element createConnectorBindingsElement()
public org.jdom.Element createRootConfigurationDocumentElement()
public Host createHost(org.jdom.Element element, ConfigurationID configID, ConfigurationObjectEditor editor, java.lang.String name) throws InvalidConfigurationElementException
element
- the JDOM element to convert to a configuration objecteditor
- the editor to use to create the configuration objectname
- the name of the returned configuration object. Note this
name will override the name in the JDOM element. If the name parameter
is null, the name of the object in the JDOM element will be used as
the name of the object.
InvalidConfigurationElementException
- if the element passed in
or its XML structure do not conform to the XML structure specfied in
the XMLConfig_ElementNames class.public org.jdom.Element createAuthenticationProviderElement()
public AuthenticationProvider createAuthenticationProvider(org.jdom.Element element, ConfigurationID configID, ConfigurationObjectEditor editor) throws InvalidConfigurationElementException
element
- the JDOM element to convert to a configuration objecteditor
- the editor to use to create the configuration objectname
- the name of the returned configuration object. Note this
name will override the name in the JDOM element. If the name parameter
is null, the name of the object in the JDOM element will be used as
the name of the object.
InvalidConfigurationElementException
- if the element passed in
or its XML structure do not conform to the XML structure specfied in
the XMLConfig_ElementNames class.public org.jdom.Element createSharedResourceElement(SharedResource resource)
defn
- the Object to be converted to a JDOM XML Element
public SharedResource createSharedResource(org.jdom.Element element, ConfigurationObjectEditor editor) throws InvalidConfigurationElementException
element
- the JDOM element to convert to a configuration objecteditor
- the editor to use to create the configuration objectname
- the name of the returned configuration object. Note this
name will override the name in the JDOM element. If the name parameter
is null, the name of the object in the JDOM element will be used as
the name of the object.
InvalidConfigurationElementException
- if the element passed in
or its XML structure do not conform to the XML structure specfied in
the XMLConfig_ElementNames class.public org.jdom.Element createSharedResourcesElement()
public ComponentType createComponentType(org.jdom.Element element, ConfigurationObjectEditor editor, java.lang.String name, boolean maintainParentID) throws InvalidConfigurationElementException
element
- the JDOM element to convert to a configuration objecteditor
- the editor to use to create the configuration objectname
- the name of the returned configuration object. Note this
name will override the name in the JDOM element. If the name parameter
is null, the name of the object in the JDOM element will be used as
the name of the object.
InvalidConfigurationElementException
- if the element passed in
or its XML structure do not conform to the XML structure specfied in
the XMLConfig_ElementNames class.public ComponentType loadComponentType(org.jdom.Element rootElement) throws InvalidConfigurationElementException
InvalidConfigurationElementException
public Configuration createConfiguration(org.jdom.Element element, ConfigurationObjectEditor editor, java.lang.String name) throws InvalidConfigurationElementException
element
- the JDOM element to convert to a configuration objecteditor
- the editor to use to create the configuration objectname
- the name of the returned configuration object. Note this
name will override the name in the JDOM element. If the name parameter
is null, the name of the object in the JDOM element will be used as
the name of the object.
InvalidConfigurationElementException
- if the element passed in
or its XML structure do not conform to the XML structure specfied in
the XMLConfig_ElementNames class.public org.jdom.Element createConnectorBindingElement(ConnectorBinding connector, boolean isExportConfig)
public ConnectorBinding createConnectorBinding(ConfigurationID configurationID, org.jdom.Element element, ConfigurationObjectEditor editor, java.lang.String name, boolean isImportConfig) throws InvalidConfigurationElementException
InvalidConfigurationElementException
public ConnectorBinding loadConnectorBinding(org.jdom.Element rootElement) throws InvalidConfigurationElementException
InvalidConfigurationElementException
public ComponentDefn createServiceComponentDefn(org.jdom.Element element, Configuration config, ConfigurationObjectEditor editor, java.lang.String name) throws InvalidConfigurationElementException
element
- the JDOM element to convert to a configuration objecteditor
- the editor to use to create the configuration objectname
- the name of the returned configuration object. Note this
name will override the name in the JDOM element. If the name parameter
is null, the name of the object in the JDOM element will be used as
the name of the object.
InvalidConfigurationElementException
- if the element passed in
or its XML structure do not conform to the XML structure specfied in
the XMLConfig_ElementNames class.public ComponentDefn createServiceComponentDefn(org.jdom.Element element, ConfigurationID configID, ConfigurationObjectEditor editor, java.lang.String name) throws InvalidConfigurationElementException
InvalidConfigurationElementException
public DeployedComponent createDeployedServiceComponent(org.jdom.Element element, ConfigurationID configID, HostID hostID, VMComponentDefnID vmID, java.util.Map componentTypeMap, ConfigurationObjectEditor editor) throws InvalidConfigurationElementException
InvalidConfigurationElementException
public BasicVMComponentDefn createProcess(org.jdom.Element element, ConfigurationID configID, HostID hostID, ConfigurationObjectEditor editor, java.lang.String name) throws InvalidConfigurationElementException
element
- the JDOM element to convert to a configuration objecteditor
- the editor to use to create the configuration objectname
- the name of the returned configuration object. Note this
name will override the name in the JDOM element. If the name parameter
is null, the name of the object in the JDOM element will be used as
the name of the object.
InvalidConfigurationElementException
- if the element passed in
or its XML structure do not conform to the XML structure specfied in
the XMLConfig_ElementNames class.public PropertyDefinition createPropertyDefinition(org.jdom.Element element) throws InvalidConfigurationElementException
element
- the XML element that represents a PropertyDefinition object
InvalidConfigurationElementException
- if the element passed in
or its XML structure do not conform to the XML structure specfied in
the XMLConfig_ElementNames class.public ComponentObject addProperties(org.jdom.Element propertiesElement, ComponentObject object, ConfigurationObjectEditor editor) throws InvalidConfigurationElementException
element
- the JDOM element to convert to a configuration objecteditor
- the editor to use to create the configuration objectname
- the name of the returned configuration object. Note this
name will override the name in the JDOM element. If the name parameter
is null, the name of the object in the JDOM element will be used as
the name of the object.
InvalidConfigurationElementException
- if the element passed in
or its XML structure do not conform to the XML structure specfied in
the XMLConfig_ElementNames class.public void orderComponentTypeElementList(java.util.List componentTypeElements)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |