com.metamatrix.common.config.xml
Class XMLConfig_42_HelperImpl

java.lang.Object
  extended by com.metamatrix.common.config.xml.XMLConfig_42_HelperImpl
All Implemented Interfaces:
ConfigurationPropertyNames, XMLHelper

public class XMLConfig_42_HelperImpl
extends java.lang.Object
implements XMLHelper, ConfigurationPropertyNames

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, CONFIGURATION_VERSION, MEMBERSHIP_ADMIN_PASSWORD, MEMBERSHIP_ADMIN_USERNAME, MEMBERSHIP_DOMAIN_ORDER, MEMBERSHIP_SECURITY_ENABLED, METAMATRIX_SYSTEM_VERSION, MM_CONFIG_3_0_VERSION, MM_CONFIG_4_2_VERSION, MM_LATEST_CONFIG_VERSION, TIME, USER_CREATED_BY
 
Constructor Summary
XMLConfig_42_HelperImpl()
           
 
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 createConfigurationInfoElement(ConfigurationInfo info)
          This method is used to create a ConfigurationInfo JDOM Element from a ConfigurationInfo 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)
          This method will create a ConnectorBinding object from an XML element that represents a ServiceComponentDefn.
 org.jdom.Element createConnectorBindingElement(ConnectorBinding connector, boolean isExportConfig)
          This method will create a LogConfiguration configuration object from an XML element that represents a LogConfiguration.
 org.jdom.Element createConnectorBindingsElement()
          This method is used to create a ConnectorBindings JDOM Element.
 DeployedComponent createDeployedComponent(org.jdom.Element element, Configuration config, ConfigurationObjectEditor editor, java.util.Map serviceComponentDefnMap, java.util.Map vmComponentDefnMap, java.util.Map componentTypeMap, java.lang.String name)
          This method will create a DeployedComponent configuration object from an XML element that represents a DeployedComponent.
 DeployedComponent createDeployedComponent(org.jdom.Element element, ConfigurationID configID, HostID hostID, VMComponentDefnID vmID, ProductServiceConfigID pscID, java.util.Map componentTypeMap, ConfigurationObjectEditor editor)
           
 org.jdom.Element createDeployedComponentElement(DeployedComponent deployedComponent)
          This method is used to create a DeployedComponent JDOM Element from a DeployedComponent object.
 org.jdom.Element createDeployedHostElement(Host host)
          This method is used to create a Host JDOM Element from a Host object.
 org.jdom.Element createDeployedProductServiceConfigElement(ProductServiceConfig config)
          This method is used to create a ServiceComponentDefn JDOM Element from a ServiceComponentDefn object.
 DeployedComponent createDeployedServiceComponent(org.jdom.Element element, ConfigurationID configID, HostID hostID, VMComponentDefnID vmID, ProductServiceConfigID pscID, java.util.Map componentTypeMap, ConfigurationObjectEditor editor)
           
 org.jdom.Element createDeployedServiceComponentDefnElement(ServiceComponentDefn defn)
           
 DeployedComponent createDeployedVMComponentDefnx(org.jdom.Element element, ConfigurationID configID, HostID hostID, ComponentTypeID typeID, ConfigurationObjectEditor editor)
           
 org.jdom.Element createDeployedVMElementx(DeployedComponent vm)
           
 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 createHostsElement()
          This method is used to create a Hosts JDOM Element from a Configuration ID 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.
 org.jdom.Element createLogConfigurationElement(LogConfiguration logConfiguration)
          This method is used to create a LogConfiguration JDOM Element from a LogConfiguration object.
 ProductServiceConfig createProductServiceConfig(org.jdom.Element element, ConfigurationID configID, ConfigurationObjectEditor editor, java.lang.String name)
          This method will create a ProductServiceConfig configuration object from an XML element that represents a ProductServiceConfig.
 org.jdom.Element createProductServiceConfigElement(ProductServiceConfig config)
          This method is used to create a ProductServiceConfig JDOM Element from a ProductServiceConfig object.
 org.jdom.Element createProductServiceConfigsElement()
          This method is used to create a ProductServiceConfig JDOM Element from a ProductServiceConfig object.
 ProductType createProductType(org.jdom.Element element, ConfigurationObjectEditor editor, java.util.Map componentTypeMap, java.lang.String name)
          This method will create a ProductType configuration object from an XML element that represents a ProductType.
 org.jdom.Element createProductTypeElement(ProductType type)
          This method is used to create a ProductType JDOM Element from a ProductType object.
 org.jdom.Element createProductTypesElement()
          This method is used to create a ProductType JDOM Element from a ProductType 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.
 ResourceDescriptor createResourcePool(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 createResourcePoolElement(ResourceDescriptor resource)
          This method is used to create a ResourceDescriptor JDOM Element from a ServiceComponentDefn object.
 org.jdom.Element createResourcePoolsElement()
          This method is used to create a ResourceDescriptors JDOM Element.
 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)
          This method will create a ServiceComponentDefn configuration object from an XML element that represents a ServiceComponentDefn.
 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()
          This method is used to create a Resources JDOM Element.
 VMComponentDefn createVMComponentDefn(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 createVMComponentDefnElement(VMComponentDefn defn)
          This method is used to create a VMComponentDefn JDOM Element from a VMComponentDefn object.
 java.util.Properties getHeaderProperties(org.jdom.Element element)
          Return the properties stored in the header section.
 boolean is42ConfigurationCompatible(org.jdom.Element root)
          Returns true if the information in the element indicates that it is compatible with the 4.2 configuration format.
 ComponentType loadComponentType(org.jdom.Element rootElement)
           
 ConnectorBinding loadConnectorBinding(org.jdom.Element rootElement)
           
 void orderComponentTypeElementList(java.util.List componentTypeElements)
          This helper method will order a List of XML JDOM elements that represent ComponentTypes or ProductTypes so that types that are referenced by other types in the list are in the returned list before the object that is referencing it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLConfig_42_HelperImpl

public XMLConfig_42_HelperImpl()
Method Detail

createDeployedComponent

public DeployedComponent createDeployedComponent(org.jdom.Element element,
                                                 ConfigurationID configID,
                                                 HostID hostID,
                                                 VMComponentDefnID vmID,
                                                 ProductServiceConfigID pscID,
                                                 java.util.Map componentTypeMap,
                                                 ConfigurationObjectEditor editor)
                                          throws InvalidConfigurationElementException
Specified by:
createDeployedComponent in interface XMLHelper
Throws:
InvalidConfigurationElementException
Since:
4.1
See Also:
XMLHelper.createDeployedComponent(org.jdom.Element, com.metamatrix.common.config.api.ConfigurationID, com.metamatrix.common.config.api.HostID, com.metamatrix.common.config.api.VMComponentDefnID, com.metamatrix.common.config.api.ProductServiceConfigID, java.util.Map, com.metamatrix.common.config.api.ConfigurationObjectEditor)

createConfigurationElement

public org.jdom.Element createConfigurationElement(Configuration configuration)
This method is used to create a Configuration JDOM Element from a Configuration object.

Specified by:
createConfigurationElement in interface XMLHelper
Parameters:
configuration - the Object to be converted to a JDOM XML Element
Returns:
a JDOM XML Element

createLogConfigurationElement

public org.jdom.Element createLogConfigurationElement(LogConfiguration logConfiguration)
This method is used to create a LogConfiguration JDOM Element from a LogConfiguration object.

Parameters:
info - the Object to be converted to a JDOM XML Element
Returns:
a JDOM XML Element

createConfigurationInfoElement

public org.jdom.Element createConfigurationInfoElement(ConfigurationInfo info)
This method is used to create a ConfigurationInfo JDOM Element from a ConfigurationInfo object.

Specified by:
createConfigurationInfoElement in interface XMLHelper
Parameters:
info - the Object to be converted to a JDOM XML Element
Returns:
a JDOM XML Element

createDeployedComponentElement

public org.jdom.Element createDeployedComponentElement(DeployedComponent deployedComponent)
This method is used to create a DeployedComponent JDOM Element from a DeployedComponent object.

Parameters:
deployedComponent - the Object to be converted to a JDOM XML Element
Returns:
a JDOM XML Element

createVMComponentDefnElement

public org.jdom.Element createVMComponentDefnElement(VMComponentDefn defn)
This method is used to create a VMComponentDefn JDOM Element from a VMComponentDefn object.

Specified by:
createVMComponentDefnElement in interface XMLHelper
Parameters:
defn - the Object to be converted to a JDOM XML Element
Returns:
a JDOM XML Element

createDeployedServiceComponentDefnElement

public org.jdom.Element createDeployedServiceComponentDefnElement(ServiceComponentDefn defn)

createServiceComponentDefnElement

public org.jdom.Element createServiceComponentDefnElement(ServiceComponentDefn defn)
This method is used to create a ServiceComponentDefn JDOM Element from a ServiceComponentDefn object.

Specified by:
createServiceComponentDefnElement in interface XMLHelper
Parameters:
defn - the Object to be converted to a JDOM XML Element
Returns:
a JDOM XML Element

createAuthenticationProviderElement

public org.jdom.Element createAuthenticationProviderElement(AuthenticationProvider defn)
This method is used to create a ServiceComponentDefn JDOM Element from a ServiceComponentDefn object.

Parameters:
defn - the Object to be converted to a JDOM XML Element
Returns:
a JDOM XML Element

createDeployedProductServiceConfigElement

public org.jdom.Element createDeployedProductServiceConfigElement(ProductServiceConfig config)
This method is used to create a ServiceComponentDefn JDOM Element from a ServiceComponentDefn object.

Specified by:
createDeployedProductServiceConfigElement in interface XMLHelper
Parameters:
defn - the Object to be converted to a JDOM XML Element
Returns:
a JDOM XML Element

createProductServiceConfigsElement

public org.jdom.Element createProductServiceConfigsElement()
Description copied from interface: XMLHelper
This method is used to create a ProductServiceConfig JDOM Element from a ProductServiceConfig object.

Specified by:
createProductServiceConfigsElement in interface XMLHelper
Returns:
a JDOM XML Element

createProductServiceConfigElement

public org.jdom.Element createProductServiceConfigElement(ProductServiceConfig config)
This method is used to create a ProductServiceConfig JDOM Element from a ProductServiceConfig object.

Specified by:
createProductServiceConfigElement in interface XMLHelper
Parameters:
config - the Object to be converted to a JDOM XML Element
Returns:
a JDOM XML Element

createComponentTypeElement

public org.jdom.Element createComponentTypeElement(ComponentType type)
This method is used to create a ComponentType JDOM Element from a ComponentType object.

Specified by:
createComponentTypeElement in interface XMLHelper
Parameters:
type - the Object to be converted to a JDOM XML Element
Returns:
a JDOM XML Element

createPropertyDefinitionElement

public org.jdom.Element createPropertyDefinitionElement(PropertyDefinition defn)
This method is used to create a PropertyDefinition JDOM Element from a PropertyDefinition object.

Specified by:
createPropertyDefinitionElement in interface XMLHelper
Parameters:
defn - the Object to be converted to a JDOM XML Element
Returns:
a JDOM XML Element

createComponentTypeDefnElement

public org.jdom.Element createComponentTypeDefnElement(ComponentTypeDefn defn)
This method is used to create a ComponentTypeDefn JDOM Element from a ComponentTypeDefn object.

Specified by:
createComponentTypeDefnElement in interface XMLHelper
Parameters:
defn - the Object to be converted to a JDOM XML Element
Returns:
a JDOM XML Element

createProductTypeElement

public org.jdom.Element createProductTypeElement(ProductType type)
This method is used to create a ProductType JDOM Element from a ProductType object.

Specified by:
createProductTypeElement in interface XMLHelper
Parameters:
type - the Object to be converted to a JDOM XML Element
Returns:
a JDOM XML Element

createDeployedHostElement

public org.jdom.Element createDeployedHostElement(Host host)
This method is used to create a Host JDOM Element from a Host object.

Parameters:
host - the Object to be converted to a JDOM XML Element
Returns:
a JDOM XML Element

createDeployedVMElementx

public org.jdom.Element createDeployedVMElementx(DeployedComponent vm)

is42ConfigurationCompatible

public final boolean is42ConfigurationCompatible(org.jdom.Element root)
                                          throws InvalidConfigurationElementException
Description copied from interface: XMLHelper
Returns true if the information in the element indicates that it is compatible with the 4.2 configuration format. Otherwise, it considered to be pre 4.2 compatible.

Specified by:
is42ConfigurationCompatible in interface XMLHelper
Returns:
Throws:
InvalidConfigurationElementException

getHeaderProperties

public java.util.Properties getHeaderProperties(org.jdom.Element element)
                                         throws InvalidConfigurationElementException
Description copied from interface: XMLHelper
Return the properties stored in the header section.

Specified by:
getHeaderProperties in interface XMLHelper
Returns:
Properties containing the header information
Throws:
InvalidConfigurationElementException - if the element passed in is not the header element or its XML structure do not conform to the XML structure specfied in the XMLElementNames class.

createHeaderElement

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_42_ElementNames.Header.ApplicationCreatedDate.ELEMENT
 XMLConfig_42_ElementNames.Header.ApplicationVersionCreatedBy.ELEMENT
 XMLConfig_42_ElementNames.Header.UserName.ELEMENT
 XMLConfig_42_ElementNames.Header.DocumentTypeVersion.ELEMENT
 XMLConfig_42_ElementNames.Header.MetaMatrixServerVersion.ELEMENT
 XMLConfig_42_ElementNames.Header.Time.ELEMENT
 
 

Any of these properties that are not included in the properties object will not be included in the header Element that is returned.

Specified by:
createHeaderElement in interface XMLHelper
Parameters:
props - the properties object that contains the values for the Header
Returns:
a JDOM XML Element

createPropertiesElement

public org.jdom.Element createPropertiesElement(java.util.Properties props)
This method is used to create a Properties JDOM Element from a Properties object.

Specified by:
createPropertiesElement in interface XMLHelper
Parameters:
props - the Object to be converted to a JDOM XML Element
Returns:
a JDOM XML Element

createIDElement

public 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.

Specified by:
createIDElement in interface XMLHelper
Parameters:
type - the ID type to be created. @see XMLConfig_42_ElementNames.Configuration.XXXID.ELEMENT for valid values
name - the calue of the name attribute of the ID element to create.
Returns:
a JDOM XML Element

createConfigurationsElement

public org.jdom.Element createConfigurationsElement()
This method is used to create a Configurations JDOM Element from a Configuration ID object. This element is for structural organization only and does not represent any real configuration object.

Specified by:
createConfigurationsElement in interface XMLHelper
Returns:
a JDOM XML Element

createHostsElement

public org.jdom.Element createHostsElement()
This method is used to create a Hosts JDOM Element from a Configuration ID object. This element is for structural organization only and does not represent any real configuration object.

Specified by:
createHostsElement in interface XMLHelper
Returns:
a JDOM XML Element

createHostElement

public org.jdom.Element createHostElement(Host host)
This method is used to create a Host JDOM Element from a Host object.

Specified by:
createHostElement in interface XMLHelper
Parameters:
host - the Object to be converted to a JDOM XML Element
Returns:
a JDOM XML Element

createServiceComponentDefnsElement

public org.jdom.Element createServiceComponentDefnsElement()
This method is used to create a ServiceComponentDefns JDOM Element. This element is for structural organization only and does not represent any real configuration object.

Specified by:
createServiceComponentDefnsElement in interface XMLHelper
Returns:
a JDOM XML Element

createComponentTypesElement

public org.jdom.Element createComponentTypesElement()
This method is used to create a ComponentTypes JDOM Element from a Configuration ID object. This element is for structural organization only and does not represent any real configuration object.

Specified by:
createComponentTypesElement in interface XMLHelper
Returns:
a JDOM XML Element

createProductTypesElement

public org.jdom.Element createProductTypesElement()
Description copied from interface: XMLHelper
This method is used to create a ProductType JDOM Element from a ProductType object.

Specified by:
createProductTypesElement in interface XMLHelper
Returns:
a JDOM XML Element

createConnectorBindingsElement

public org.jdom.Element createConnectorBindingsElement()
Description copied from interface: XMLHelper
This method is used to create a ConnectorBindings JDOM Element. This element is for structural organization only and does not represent any real configuration object.

Specified by:
createConnectorBindingsElement in interface XMLHelper
Returns:
a JDOM XML Element

createRootConfigurationDocumentElement

public org.jdom.Element createRootConfigurationDocumentElement()
This method is used to create a root JDOM Element. This element is for structural organization only and does not represent any real configuration object.

Specified by:
createRootConfigurationDocumentElement in interface XMLHelper
Returns:
a JDOM XML Element

createHost

public Host createHost(org.jdom.Element element,
                       ConfigurationID configID,
                       ConfigurationObjectEditor editor,
                       java.lang.String name)
                throws InvalidConfigurationElementException
This method will create a Host configuration object from an XML element that represents a Host.

Specified by:
createHost in interface XMLHelper
Parameters:
element - the JDOM element to convert to a configuration object
editor - the editor to use to create the configuration object
name - 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.
Returns:
the Host configuration object
Throws:
InvalidConfigurationElementException - if the element passed in or its XML structure do not conform to the XML structure specfied in the XMLConfig_42_ElementNames class.

createResourcePoolElement

public org.jdom.Element createResourcePoolElement(ResourceDescriptor resource)
This method is used to create a ResourceDescriptor JDOM Element from a ServiceComponentDefn object.

Specified by:
createResourcePoolElement in interface XMLHelper
Parameters:
defn - the Object to be converted to a JDOM XML Element
Returns:
a JDOM XML Element

createResourcePoolsElement

public org.jdom.Element createResourcePoolsElement()
Description copied from interface: XMLHelper
This method is used to create a ResourceDescriptors JDOM Element. This element is for structural organization only and does not represent any real configuration object.

Specified by:
createResourcePoolsElement in interface XMLHelper
Returns:
a JDOM XML Element

createAuthenticationProviderElement

public org.jdom.Element createAuthenticationProviderElement()

createResourcePool

public ResourceDescriptor createResourcePool(org.jdom.Element element,
                                             ConfigurationID configID,
                                             ConfigurationObjectEditor editor)
                                      throws InvalidConfigurationElementException
This method will create a Resource configuration object from an XML element that represents a Resource.

Specified by:
createResourcePool in interface XMLHelper
Parameters:
element - the JDOM element to convert to a configuration object
editor - the editor to use to create the configuration object
name - 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.
Returns:
the SharedResource configuration object
Throws:
InvalidConfigurationElementException - if the element passed in or its XML structure do not conform to the XML structure specfied in the XMLConfig_42_ElementNames class.

createAuthenticationProvider

public AuthenticationProvider createAuthenticationProvider(org.jdom.Element element,
                                                           ConfigurationID configID,
                                                           ConfigurationObjectEditor editor)
                                                    throws InvalidConfigurationElementException
This method will create a Resource configuration object from an XML element that represents a Resource.

Parameters:
element - the JDOM element to convert to a configuration object
editor - the editor to use to create the configuration object
name - 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.
Returns:
the SharedResource configuration object
Throws:
InvalidConfigurationElementException - if the element passed in or its XML structure do not conform to the XML structure specfied in the XMLConfig_42_ElementNames class.

createSharedResourceElement

public org.jdom.Element createSharedResourceElement(SharedResource resource)
This method is used to create a ServiceComponentDefn JDOM Element from a ServiceComponentDefn object.

Specified by:
createSharedResourceElement in interface XMLHelper
Parameters:
defn - the Object to be converted to a JDOM XML Element
Returns:
a JDOM XML Element

createSharedResource

public SharedResource createSharedResource(org.jdom.Element element,
                                           ConfigurationObjectEditor editor)
                                    throws InvalidConfigurationElementException
This method will create a Resource configuration object from an XML element that represents a Resource.

Specified by:
createSharedResource in interface XMLHelper
Parameters:
element - the JDOM element to convert to a configuration object
editor - the editor to use to create the configuration object
name - 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.
Returns:
the SharedResource configuration object
Throws:
InvalidConfigurationElementException - if the element passed in or its XML structure do not conform to the XML structure specfied in the XMLConfig_42_ElementNames class.

createSharedResourcesElement

public org.jdom.Element createSharedResourcesElement()
Description copied from interface: XMLHelper
This method is used to create a Resources JDOM Element. This element is for structural organization only and does not represent any real configuration object.

Specified by:
createSharedResourcesElement in interface XMLHelper
Returns:
a JDOM XML Element

createComponentType

public ComponentType createComponentType(org.jdom.Element element,
                                         ConfigurationObjectEditor editor,
                                         java.lang.String name,
                                         boolean maintainParentID)
                                  throws InvalidConfigurationElementException
This method will create a ComponentType configuration object from an XML element that represents a ComponentType.

Specified by:
createComponentType in interface XMLHelper
Parameters:
element - the JDOM element to convert to a configuration object
editor - the editor to use to create the configuration object
name - 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.
Returns:
the ComponentType configuration object
Throws:
InvalidConfigurationElementException - if the element passed in or its XML structure do not conform to the XML structure specfied in the XMLConfig_42_ElementNames class.

loadComponentType

public ComponentType loadComponentType(org.jdom.Element rootElement)
                                throws InvalidConfigurationElementException
Throws:
InvalidConfigurationElementException

createProductType

public ProductType createProductType(org.jdom.Element element,
                                     ConfigurationObjectEditor editor,
                                     java.util.Map componentTypeMap,
                                     java.lang.String name)
                              throws InvalidConfigurationElementException
This method will create a ProductType configuration object from an XML element that represents a ProductType.

Specified by:
createProductType in interface XMLHelper
Parameters:
element - the JDOM element to convert to a configuration object
editor - the editor to use to create the configuration object
name - 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.
componentTypeMap - this is a map of ComponentTypeID--->ComponentType it must contain all of the Component types that the ProductType that is represented by the passed in XML element references.
Returns:
the ProductType configuration object
Throws:
InvalidConfigurationElementException - if the element passed in or its XML structure do not conform to the XML structure specfied in the XMLConfig_42_ElementNames class.

createConfiguration

public Configuration createConfiguration(org.jdom.Element element,
                                         ConfigurationObjectEditor editor,
                                         java.lang.String name)
                                  throws InvalidConfigurationElementException
This method will create a Configuration configuration object from an XML element that represents a Configuration.

Specified by:
createConfiguration in interface XMLHelper
Parameters:
element - the JDOM element to convert to a configuration object
editor - the editor to use to create the configuration object
name - 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.
Returns:
the Configuration configuration object
Throws:
InvalidConfigurationElementException - if the element passed in or its XML structure do not conform to the XML structure specfied in the XMLConfig_42_ElementNames class.

createConnectorBindingElement

public org.jdom.Element createConnectorBindingElement(ConnectorBinding connector,
                                                      boolean isExportConfig)
This method will create a LogConfiguration configuration object from an XML element that represents a LogConfiguration.

Specified by:
createConnectorBindingElement in interface XMLHelper
Parameters:
element - the JDOM element to convert to a configuration object
editor - the editor to use to create the configuration object
name - 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.
Returns:
the LogConfiguration configuration object
Throws:
InvalidConfigurationElementException - if the element passed in or its XML structure do not conform to the XML structure specfied in the XMLConfig_42_ElementNames class.

createConnectorBinding

public ConnectorBinding createConnectorBinding(ConfigurationID configurationID,
                                               org.jdom.Element element,
                                               ConfigurationObjectEditor editor,
                                               java.lang.String name,
                                               boolean isImportConfig)
                                        throws InvalidConfigurationElementException
Description copied from interface: XMLHelper
This method will create a ConnectorBinding object from an XML element that represents a ServiceComponentDefn.

Specified by:
createConnectorBinding in interface XMLHelper
element - the JDOM element to convert to a configuration object
editor - the editor to use to create the configuration object
name - 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.
Returns:
the ConnectorBinding configuration object
Throws:
InvalidConfigurationElementException - if the element passed in or its XML structure do not conform to the XML structure specfied in the XMLElementNames class.

loadConnectorBinding

public ConnectorBinding loadConnectorBinding(org.jdom.Element rootElement)
                                      throws InvalidConfigurationElementException
Throws:
InvalidConfigurationElementException

createServiceComponentDefn

public ComponentDefn createServiceComponentDefn(org.jdom.Element element,
                                                Configuration config,
                                                ConfigurationObjectEditor editor,
                                                java.lang.String name)
                                         throws InvalidConfigurationElementException
This method will create a ServiceComponentDefn configuration object from an XML element that represents a ServiceComponentDefn.

Specified by:
createServiceComponentDefn in interface XMLHelper
Parameters:
element - the JDOM element to convert to a configuration object
editor - the editor to use to create the configuration object
name - 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.
Returns:
the ServiceComponentDefn configuration object
Throws:
InvalidConfigurationElementException - if the element passed in or its XML structure do not conform to the XML structure specfied in the XMLConfig_42_ElementNames class.

createServiceComponentDefn

public ComponentDefn createServiceComponentDefn(org.jdom.Element element,
                                                ConfigurationID configID,
                                                ConfigurationObjectEditor editor,
                                                java.lang.String name)
                                         throws InvalidConfigurationElementException
Description copied from interface: XMLHelper
This method will create a ServiceComponentDefn configuration object from an XML element that represents a ServiceComponentDefn.

Specified by:
createServiceComponentDefn in interface XMLHelper
Parameters:
element - the JDOM element to convert to a configuration object
editor - the editor to use to create the configuration object
name - 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.
Returns:
the ServiceComponentDefn configuration object
Throws:
InvalidConfigurationElementException - if the element passed in or its XML structure do not conform to the XML structure specfied in the XMLElementNames class.

createProductServiceConfig

public ProductServiceConfig createProductServiceConfig(org.jdom.Element element,
                                                       ConfigurationID configID,
                                                       ConfigurationObjectEditor editor,
                                                       java.lang.String name)
                                                throws InvalidConfigurationElementException
This method will create a ProductServiceConfig configuration object from an XML element that represents a ProductServiceConfig.

Specified by:
createProductServiceConfig in interface XMLHelper
Parameters:
element - the JDOM element to convert to a configuration object
editor - the editor to use to create the configuration object
name - 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.
configID - is the configuration this PSC will become a part of
Returns:
the ProductServiceConfig configuration object
Throws:
InvalidConfigurationElementException - if the element passed in or its XML structure do not conform to the XML structure specfied in the XMLConfig_42_ElementNames class.

createDeployedServiceComponent

public DeployedComponent createDeployedServiceComponent(org.jdom.Element element,
                                                        ConfigurationID configID,
                                                        HostID hostID,
                                                        VMComponentDefnID vmID,
                                                        ProductServiceConfigID pscID,
                                                        java.util.Map componentTypeMap,
                                                        ConfigurationObjectEditor editor)
                                                 throws InvalidConfigurationElementException
Throws:
InvalidConfigurationElementException

createDeployedVMComponentDefnx

public DeployedComponent createDeployedVMComponentDefnx(org.jdom.Element element,
                                                        ConfigurationID configID,
                                                        HostID hostID,
                                                        ComponentTypeID typeID,
                                                        ConfigurationObjectEditor editor)
                                                 throws InvalidConfigurationElementException
Throws:
InvalidConfigurationElementException

createDeployedComponent

public DeployedComponent createDeployedComponent(org.jdom.Element element,
                                                 Configuration config,
                                                 ConfigurationObjectEditor editor,
                                                 java.util.Map serviceComponentDefnMap,
                                                 java.util.Map vmComponentDefnMap,
                                                 java.util.Map componentTypeMap,
                                                 java.lang.String name)
                                          throws InvalidConfigurationElementException
This method will create a DeployedComponent configuration object from an XML element that represents a DeployedComponent.

Specified by:
createDeployedComponent in interface XMLHelper
Parameters:
element - the JDOM element to convert to a configuration object
editor - the editor to use to create the configuration object
name - 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.
serviceComponentDefnMap - a map of ServiceComponentDefnID-->ServiceComponentDefn this map must contain at the very least the ServiceComponentDefn that is the service definition of the deployed component that the XML element references. This is used if the deployedComponent is a Service. Otherwise it is ignored.
vmComponentDefnMap - a map of vmComponentDefnID-->vmComponentDefn this map must contain at the very least the vmComponentDefn that is the VM definition of the deployed component that the XML element references. This is used if the deployedComponent is a VM. Otherwise it is ignored.
Returns:
the DeployedComponent configuration object
Throws:
InvalidConfigurationElementException - if the element passed in or its XML structure do not conform to the XML structure specfied in the XMLConfig_42_ElementNames class.

createVMComponentDefn

public VMComponentDefn createVMComponentDefn(org.jdom.Element element,
                                             ConfigurationID configID,
                                             HostID hostID,
                                             ConfigurationObjectEditor editor,
                                             java.lang.String name)
                                      throws InvalidConfigurationElementException
This method will create a VMComponentDefn configuration object from an XML element that represents a VMComponentDefn.

Specified by:
createVMComponentDefn in interface XMLHelper
Parameters:
element - the JDOM element to convert to a configuration object
editor - the editor to use to create the configuration object
name - 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.
configID - is the configuration the vm will become a part of
Returns:
the VMComponentDefn configuration object
Throws:
InvalidConfigurationElementException - if the element passed in or its XML structure do not conform to the XML structure specfied in the XMLConfig_42_ElementNames class.

createPropertyDefinition

public PropertyDefinition createPropertyDefinition(org.jdom.Element element)
                                            throws InvalidConfigurationElementException
This method is a helper method to create a PropertyDefinition object from an XML element that represents same.

Parameters:
element - the XML element that represents a PropertyDefinition object
Throws:
InvalidConfigurationElementException - if the element passed in or its XML structure do not conform to the XML structure specfied in the XMLConfig_42_ElementNames class.

addProperties

public ComponentObject addProperties(org.jdom.Element propertiesElement,
                                     ComponentObject object,
                                     ConfigurationObjectEditor editor)
                              throws InvalidConfigurationElementException
This method will create a ComponentObject configuration object from an XML element that represents a ComponentObject.

Specified by:
addProperties in interface XMLHelper
Parameters:
element - the JDOM element to convert to a configuration object
editor - the editor to use to create the configuration object
name - 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.
Returns:
the ComponentObject configuration object
Throws:
InvalidConfigurationElementException - if the element passed in or its XML structure do not conform to the XML structure specfied in the XMLConfig_42_ElementNames class.

orderComponentTypeElementList

public void orderComponentTypeElementList(java.util.List componentTypeElements)
Description copied from interface: XMLHelper
This helper method will order a List of XML JDOM elements that represent ComponentTypes or ProductTypes so that types that are referenced by other types in the list are in the returned list before the object that is referencing it. This is necessary so that the object editor that is used to create the ComponentTypes will contain viable actions. a ComponentType object that references a super cannot be created prior to the super ComponentType object.

Specified by:
orderComponentTypeElementList in interface XMLHelper


Copyright © 2009. All Rights Reserved.