|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface XMLHelper
This helper class is used to create JDOM XML Elements from configuration objects.
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. |
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. |
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. |
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 is used to create a Connector Binding JDOM Element from a ConnectorBinding object. |
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 |
createDeployedProductServiceConfigElement(ProductServiceConfig config)
|
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. |
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. |
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. |
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 pool configuration object from an XML element that represents a ResourceDescriptor. |
org.jdom.Element |
createResourcePoolElement(ResourceDescriptor resource)
This method is used to create a ResourceDescriptor JDOM Element from a ResourceDescriptor 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 SharedResource configuration object from an XML element that represents a SharedResource. |
org.jdom.Element |
createSharedResourceElement(SharedResource resource)
This method is used to create a Shared Resource JDOM Element from a SharedResource 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 element)
Returns true if the information in the element indicates that it is compatible with the 4.2 configuration format. |
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. |
Method Detail |
---|
org.jdom.Element createConfigurationElement(Configuration configuration)
configuration
- the Object to be converted to a JDOM XML Element
org.jdom.Element createConfigurationInfoElement(ConfigurationInfo info)
info
- the Object to be converted to a JDOM XML Element
org.jdom.Element createVMComponentDefnElement(VMComponentDefn defn)
defn
- the Object to be converted to a JDOM XML Element
org.jdom.Element createServiceComponentDefnElement(ServiceComponentDefn defn)
defn
- the Object to be converted to a JDOM XML Element
org.jdom.Element createProductServiceConfigElement(ProductServiceConfig config)
config
- the Object to be converted to a JDOM XML Element
org.jdom.Element createComponentTypeElement(ComponentType type)
type
- the Object to be converted to a JDOM XML Element
org.jdom.Element createPropertyDefinitionElement(PropertyDefinition defn)
defn
- the Object to be converted to a JDOM XML Element
org.jdom.Element createComponentTypeDefnElement(ComponentTypeDefn defn)
defn
- the Object to be converted to a JDOM XML Element
org.jdom.Element createProductTypesElement()
type
- the Object to be converted to a JDOM XML Element
org.jdom.Element createProductServiceConfigsElement()
type
- the Object to be converted to a JDOM XML Element
org.jdom.Element createProductTypeElement(ProductType type)
type
- the Object to be converted to a JDOM XML Element
org.jdom.Element createHostElement(Host host)
host
- the Object to be converted to a JDOM XML Element
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:
XMLElementNames.Header.ApplicationCreatedDate.ELEMENT XMLElementNames.Header.ApplicationVersionCreatedBy.ELEMENT XMLElementNames.Header.UserName.ELEMENT XMLElementNames.Header.DocumentTypeVersion.ELEMENT XMLElementNames.Header.MetaMatrixServerVersion.ELEMENT XMLElementNames.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
java.util.Properties getHeaderProperties(org.jdom.Element element) throws InvalidConfigurationElementException
element
-
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.boolean is42ConfigurationCompatible(org.jdom.Element element) throws InvalidConfigurationElementException
element
-
InvalidConfigurationElementException
org.jdom.Element createPropertiesElement(java.util.Properties props)
props
- the Object to be converted to a JDOM XML Element
org.jdom.Element createIDElement(java.lang.String type, java.lang.String name)
type
- the ID type to be created. @see XMLElementNames.Configurations.Configuration.XXXID.ELEMENT for valid valuesname
- the calue of the name attribute of the ID element to create.
org.jdom.Element createConfigurationsElement()
org.jdom.Element createHostsElement()
org.jdom.Element createComponentTypesElement()
org.jdom.Element createServiceComponentDefnsElement()
org.jdom.Element createRootConfigurationDocumentElement()
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 XMLElementNames class.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 object
InvalidConfigurationElementException
- if the element passed in
or its XML structure do not conform to the XML structure specfied in
the XMLElementNames class.org.jdom.Element createSharedResourcesElement()
org.jdom.Element createSharedResourceElement(SharedResource resource)
host
- the Object to be converted to a JDOM XML Element
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.maintainIDs
- should be true if the created ComponentType
should use the Parent ID name that is defined within the element
otherwise their parentID will be null. This should only be true if
it is known that the configuration environment that this ComponentType
is to be commited to contains a valid ComponentType with the ParentID
matching that in the XML element (typically in the case of Connector
ComponentTypes).
InvalidConfigurationElementException
- if the element passed in
or its XML structure do not conform to the XML structure specfied in
the XMLElementNames class.ProductType createProductType(org.jdom.Element element, ConfigurationObjectEditor editor, java.util.Map ComponentTypeMap, 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.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.
InvalidConfigurationElementException
- if the element passed in
or its XML structure do not conform to the XML structure specfied in
the XMLElementNames class.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 XMLElementNames class.ResourceDescriptor createResourcePool(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 object
InvalidConfigurationElementException
- if the element passed in
or its XML structure do not conform to the XML structure specfied in
the XMLElementNames class.org.jdom.Element createResourcePoolElement(ResourceDescriptor resource)
connector
- the Object to be converted to a JDOM XML Element
org.jdom.Element createResourcePoolsElement()
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 XMLElementNames class.ComponentDefn createServiceComponentDefn(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 XMLElementNames class.org.jdom.Element createConnectorBindingsElement()
org.jdom.Element createConnectorBindingElement(ConnectorBinding connector, boolean isExportConfig)
connector
- the Object to be converted to a JDOM XML Element
ConnectorBinding createConnectorBinding(ConfigurationID configurationID, org.jdom.Element element, ConfigurationObjectEditor editor, java.lang.String name, boolean isImportConfig) 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 XMLElementNames class.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
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.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.
InvalidConfigurationElementException
- if the element passed in
or its XML structure do not conform to the XML structure specfied in
the XMLElementNames class.DeployedComponent createDeployedComponent(org.jdom.Element element, ConfigurationID configID, HostID hostID, VMComponentDefnID vmID, ProductServiceConfigID pscID, java.util.Map componentTypeMap, ConfigurationObjectEditor editor) throws InvalidConfigurationElementException
InvalidConfigurationElementException
org.jdom.Element createDeployedProductServiceConfigElement(ProductServiceConfig config)
VMComponentDefn createVMComponentDefn(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 objectconfigID
- is the configuration the vm will become a part ofeditor
- 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 XMLElementNames class.ProductServiceConfig createProductServiceConfig(org.jdom.Element element, ConfigurationID configID, ConfigurationObjectEditor editor, java.lang.String name) throws InvalidConfigurationElementException
element
- the JDOM element to convert to a configuration objectconfigID
- is the configuration this PSC will become a part ofeditor
- 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 XMLElementNames class.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 XMLElementNames class.void orderComponentTypeElementList(java.util.List componentTypeElements)
List
- of ComponentType objects
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |