com.metamatrix.common.config.xml
Class XMLConfigurationImportExportUtility

java.lang.Object
  extended by com.metamatrix.common.config.xml.XMLConfigurationImportExportUtility
All Implemented Interfaces:
ConfigurationImportExportUtility

public class XMLConfigurationImportExportUtility
extends java.lang.Object
implements ConfigurationImportExportUtility

This implementation is used to import/export configuration objects to/from XML files. The structure of the XML file(s) that can be generated/read in is defined in the XMLElementNames class. ************************************************************************************** * * * * * * * W A R N I N G * * * * * * * ************************************************************************************** The importer process cannot have any calls to I18NLogManager or LogManager because the bootstrapping of CurrentConfiguration uses this class and the CurrentConfiguration has to come up before logging is available.


Constructor Summary
XMLConfigurationImportExportUtility()
           
 
Method Summary
 void exportComponentType(java.io.OutputStream stream, ComponentType type, java.util.Properties props)
          This method will generally be used to create a file representation of a ConnectorType that is defined in the CDK.
 void exportComponentTypes(java.io.OutputStream stream, ComponentType[] types, java.util.Properties props)
          This method will generally be used to create a file representation containing one or more connector types.
 void exportConfiguration(java.io.OutputStream stream, java.util.Collection configurationObjects, java.util.Properties props)
          This method will write to the passed in DirectoryEntry instance a complete representation of the Collection of Configuration objects that are passed into it.
 void exportConnector(java.io.OutputStream stream, ComponentType type, java.util.Properties props)
          This method will generally be used to create a file representation of a Connector.
 void exportConnectorArchive(java.io.OutputStream stream, ConnectorArchive archive, java.util.Properties properties)
          Export the given archive into zip format and write to the the stream provided
 void exportConnectorBinding(java.io.OutputStream stream, ConnectorBinding defn, ComponentType type, java.util.Properties props)
          This method will generally be used to create a file representation of a Connector Binding.
 void exportConnectorBindings(java.io.OutputStream stream, ConnectorBinding[] bindings, ComponentType[] types, java.util.Properties props)
          This method will generally be used to create a file representation of one or more Connector Bindings.
protected  XMLReaderWriter getXMLReaderWriter()
           
 ComponentType importComponentType(java.io.InputStream stream, ConfigurationObjectEditor editor, java.lang.String name)
          This method will be used to import a ComponentType Object
 java.util.Collection importComponentTypes(org.jdom.Element root, ConfigurationObjectEditor editor)
          This method will be used to import 1 or more a ComponentType Objects.
 java.util.Collection importComponentTypes(java.io.InputStream stream, ConfigurationObjectEditor editor)
          This method will be used to import 1 or more a ComponentType Objects.
 java.util.Collection importConfigurationObjects(java.io.InputStream stream, ConfigurationObjectEditor editor, java.lang.String name)
          This method will be used to import a Collection of Configuration objects given an InputStream.
 ConnectorArchive importConnectorArchive(java.io.InputStream stream, ConfigurationObjectEditor editor)
          The Zip file stream format is look like this.
 ConnectorBinding importConnectorBinding(java.io.InputStream stream, ConfigurationObjectEditor editor, java.lang.String newName)
          This method will be used to import a Connector Binding Object given a ImputStream.
 java.lang.Object[] importConnectorBindingAndType(java.io.InputStream stream, ConfigurationObjectEditor editor, java.lang.String[] newName)
          This method will be used to import a Connector Binding and its related Component Type at the same time from the given ImputStream.
 java.util.Collection importConnectorBindings(org.jdom.Element root, ConfigurationObjectEditor editor)
           
 java.util.Collection importConnectorBindings(java.io.InputStream stream, ConfigurationObjectEditor editor)
          This method will be used to import a group of Connector Bindings Objects given a ImputStream.
 java.util.Collection importExistingConnectorBindings(org.jdom.Element root, ConfigurationObjectEditor editor, boolean importExistingBinding)
           
 java.util.Collection importExistingConnectorBindings(java.io.InputStream stream, ConfigurationObjectEditor editor, boolean useExistingBinding)
           
 void resolveConfigurationObjects(java.util.Collection collection)
          This method will resolve that none of the configuration objects in the collection of configuration objects refers to a configuration object that is not in the collection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLConfigurationImportExportUtility

public XMLConfigurationImportExportUtility()
Method Detail

exportConfiguration

public void exportConfiguration(java.io.OutputStream stream,
                                java.util.Collection configurationObjects,
                                java.util.Properties props)
                         throws java.io.IOException,
                                ConfigObjectsNotResolvableException

This method will write to the passed in DirectoryEntry instance a complete representation of the Collection of Configuration objects that are passed into it. The failsafe way to build this Collection of objects is to call the getConfigurationAndDependents() method on the AdminAPI of the MetaMatrix Server. This method will retreive the Configuration and all of its dependent objects in their entirety.

In order to export an entire Configuration, the Collection passed into this method should have all of the following object references to be able to resolve the relationships between all objects referenced by a Configuration object.

 1. Configuration object
 2. all ComponentTypes that ComponentObjects reference in the
 Configuration object including the Configuration object's Component Type.
 (this includes ProductTypes)
 3. all ProductTypes that ProductServiceConfig objects reference in the
 Configuration object
 4. all Host objects that are referenced by DeployedComponents in the
 Configuration object
 

All of the above object references must be in the collection passed into this method.

The properties object that is passed into this method may contain the following properties as defined by the ConfigurationPropertyNames class. These properties will define the values for the header of the output of this method.

 ConfigurationPropertyNames.APPLICATION_CREATED_BY
 ConfigurationPropertyNames.APPLICATION_VERSION_CREATED_BY
 ConfigurationPropertyNames.USER_CREATED_BY
 

 

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

Specified by:
exportConfiguration in interface ConfigurationImportExportUtility
Parameters:
stream - the output stream to write the Configuration Object representation to
configurationObjects - a Collection of configuration objects that represents an entire logical Configuration.
props - the properties object that contains the values for the Header
Throws:
java.io.IOException - if there is an error writing to the DirectoryEntry
ConfigObjectsNotResolvableException - if there are references to configuration objects not included in the Collection of configuration objects that cannot be resolved to other configuration objects in the passed in Collection

exportComponentType

public void exportComponentType(java.io.OutputStream stream,
                                ComponentType type,
                                java.util.Properties props)
                         throws java.io.IOException

This method will generally be used to create a file representation of a ConnectorType that is defined in the CDK. It will write to the outputstream the representation of the ComponentType that is passed in.

We have made the assumption here that the Super and Parent Component types of all exportable ComponentType objects will already be loaded in the configuration of the server. Thus we do not require that the Super and Parent ComponentType be written to the resource. This will always be the case as of the 2.0 server.

The properties object that is passed into this method may contain the following properties as defined by the ConfigurationPropertyNames class.

 ConfigurationPropertyNames.APPLICATION_CREATED_BY
 ConfigurationPropertyNames.APPLICATION_VERSION_CREATED_BY
 ConfigurationPropertyNames.USER_CREATED_BY
 

 

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

Parameters:
stream - the output stream to write the Configuration Object representation to
type - the ComponentType to be written to the DirectoryEntry
props - the properties object that contains the values for the Header
Throws:
java.io.IOException - if there is an error writing to the DirectoryEntry

exportComponentTypes

public void exportComponentTypes(java.io.OutputStream stream,
                                 ComponentType[] types,
                                 java.util.Properties props)
                          throws java.io.IOException

This method will generally be used to create a file representation containing one or more connector types. It will write to the outputstream the representation of the ComponentType that is passed in.

We have made the assumption here that the Super and Parent Component types of all exportable ComponentType objects will already be loaded in the configuration of the server. Thus we do not require that the Super and Parent ComponentType be written to the resource. This will always be the case as of the 2.0 server.

The properties object that is passed into this method may contain the following properties as defined by the ConfigurationPropertyNames class.

 ConfigurationPropertyNames.APPLICATION_CREATED_BY
 ConfigurationPropertyNames.APPLICATION_VERSION_CREATED_BY
 ConfigurationPropertyNames.USER_CREATED_BY
 

 

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

Parameters:
stream - the output stream to write the Configuration Object representation to
type - the ComponentType to be written to the DirectoryEntry
props - the properties object that contains the values for the Header
Throws:
java.io.IOException - if there is an error writing to the DirectoryEntry

importConfigurationObjects

public java.util.Collection importConfigurationObjects(java.io.InputStream stream,
                                                       ConfigurationObjectEditor editor,
                                                       java.lang.String name)
                                                throws java.io.IOException,
                                                       ConfigObjectsNotResolvableException,
                                                       InvalidConfigurationElementException

This method will be used to import a Collection of Configuration objects given an InputStream. If the InputStream resource does not contain enough data to recombine all of the configuration objects in the Input Stream, then a ConfigurationObjectsNotResolvableException will be thrown.

This method also allows you to rename the imported Configuration object possibly to avoid name conflicts with other Configurations already in the server.

If the name parameter submitted is null, the name of the configuration object as it exists in the InputStream will be used as the name of the resulting Configuration object in the returned collection of configuration objects.

Specified by:
importConfigurationObjects in interface ConfigurationImportExportUtility
Parameters:
editor - the ConfigurationObjectEditor to use to create the Configuration objects in the InputStream resource.
stream - the input stream to read the configuration object representations from
name - the name for the Configuration object to be created. Can be null if the name specified in the input stream is to be used.
Returns:
the configuration objects that were represented as data in the InputStream resource
Throws:
ConfigObjectsNotResolvableException - if the data representing the Configuration to be imported is incomplete.
java.io.IOException - if there is an error reading from the InputStream
InvalidConfigurationElementException - if there is a problem with the representation of the configuration element as it exists in the InputStream resource, usually some type of formatting problem.

getXMLReaderWriter

protected XMLReaderWriter getXMLReaderWriter()

importComponentType

public ComponentType importComponentType(java.io.InputStream stream,
                                         ConfigurationObjectEditor editor,
                                         java.lang.String name)
                                  throws java.io.IOException,
                                         InvalidConfigurationElementException

This method will be used to import a ComponentType Object

This method also allows you to rename the imported ComponentType object possibly to avoid name conflicts with other objects already in the server.

If the name parameter submitted is null, the name of the configuration object as it exists in the DirectoryEntry will be used.

Specified by:
importComponentType in interface ConfigurationImportExportUtility
Parameters:
editor - the ConfigurationObjectEditor to use to create the Configuration objects in the DirectoryEntry resource.
stream - the input stream to read the configuration object representation from
name - the name for the ComponentType object to be created.
Returns:
the configuration object that was represented as data in the DirectoryEntry resource
Throws:
java.io.IOException - if there is an error reading from the DirectoryEntry
InvalidConfigurationElementException - if there is a problem with the representation of the configuration element as it exists in the DirectoryEntry resource, usually some type of formatting problem.

importComponentTypes

public java.util.Collection importComponentTypes(java.io.InputStream stream,
                                                 ConfigurationObjectEditor editor)
                                          throws java.io.IOException,
                                                 InvalidConfigurationElementException

This method will be used to import 1 or more a ComponentType Objects.

Specified by:
importComponentTypes in interface ConfigurationImportExportUtility
Parameters:
editor - the ConfigurationObjectEditor to use to create the Configuration objects.
stream - the input stream to read the configuration object representation from
Returns:
Collection of objects of type ComponentType
Throws:
java.io.IOException - if there is an error reading from the DirectoryEntry
InvalidConfigurationElementException - if there is a problem with the representation of the configuration element as it exists in the DirectoryEntry resource, usually some type of formatting problem.

importComponentTypes

public java.util.Collection importComponentTypes(org.jdom.Element root,
                                                 ConfigurationObjectEditor editor)
                                          throws java.io.IOException,
                                                 InvalidConfigurationElementException

This method will be used to import 1 or more a ComponentType Objects.

The ComponentTypes element must be a child of the root element passed in.

Parameters:
editor - the ConfigurationObjectEditor to use to create the Configuration objects.
root - Element contains the ComponentTypes to import
Returns:
Collection of objects of type ComponentType
Throws:
java.io.IOException - if there is an error reading from the DirectoryEntry
InvalidConfigurationElementException - if there is a problem with the representation of the configuration element as it exists in the DirectoryEntry resource, usually some type of formatting problem.

exportConnector

public void exportConnector(java.io.OutputStream stream,
                            ComponentType type,
                            java.util.Properties props)
                     throws java.io.IOException

This method will generally be used to create a file representation of a Connector. It will write to the InputStream the representation of the ComponentType that is passed in.

We have made the assumption here that the Super and Parent Component types of Connector ComponentType objects will already be loaded in the configuration of the server. Thus we do not require that the Super and Parent ComponentType be written to the resource. This will always be the case as of the 2.0 server.

The properties object that is passed into this method may contain the following properties as defined by the ConfigurationPropertyNames class.

 ConfigurationPropertyNames.APPLICATION_CREATED_BY
 ConfigurationPropertyNames.APPLICATION_VERSION_CREATED_BY
 ConfigurationPropertyNames.USER_CREATED_BY
 

 

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

Specified by:
exportConnector in interface ConfigurationImportExportUtility
Parameters:
stream - the output stream to write the Configuration Object representation to
type - the ComponentType to be written to the InputStream
props - the properties object that contains the values for the Header
Throws:
java.io.IOException - if there is an error writing to the InputStream

exportConnectorBinding

public void exportConnectorBinding(java.io.OutputStream stream,
                                   ConnectorBinding defn,
                                   ComponentType type,
                                   java.util.Properties props)
                            throws java.io.IOException,
                                   ConfigObjectsNotResolvableException

This method will generally be used to create a file representation of a Connector Binding. It will write to the InputStream the representation of the ServiceComponentDefn object that is passed in.

The properties object that is passed into this method may contain the following properties as defined by the ConfigurationPropertyNames class.

 ConfigurationPropertyNames.APPLICATION_CREATED_BY
 ConfigurationPropertyNames.APPLICATION_VERSION_CREATED_BY
 ConfigurationPropertyNames.USER_CREATED_BY
 

 

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

Specified by:
exportConnectorBinding in interface ConfigurationImportExportUtility
Parameters:
stream - the output stream to write the Configuration Object representation to
type - the ComponentType of the ServiceComponentDefn to be written to the InputStream resource.
defn - the ServiceComponentDefn instance to write to the InputStream.
props - the properties object that contains the values for the Header
Throws:
java.io.IOException - if there is an error writing to the InputStream
ConfigObjectsNotResolvableException - if the passed in ComponentType is not the type referenced by the passed in ServiceComponentDefn.

exportConnectorBindings

public void exportConnectorBindings(java.io.OutputStream stream,
                                    ConnectorBinding[] bindings,
                                    ComponentType[] types,
                                    java.util.Properties props)
                             throws java.io.IOException,
                                    ConfigObjectsNotResolvableException

This method will generally be used to create a file representation of one or more Connector Bindings. It will write to the InputStream the representation of the ConnectorBind object that is passed in. The bindings and types are a match pair when resolving is done on the binding. Therefore, these should be matching order when passed in.

The properties object that is passed into this method may contain the following properties as defined by the ConfigurationPropertyNames class.

 ConfigurationPropertyNames.APPLICATION_CREATED_BY
 ConfigurationPropertyNames.APPLICATION_VERSION_CREATED_BY
 ConfigurationPropertyNames.USER_CREATED_BY
 

 

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

Specified by:
exportConnectorBindings in interface ConfigurationImportExportUtility
Parameters:
stream - the output stream to write the Configuration Object representation to
bindings - is an array of type ConnectorBinding to be written to the InputStream resource.
types - is an array of type ComponentType to be written to the InputStream resource.
props - the properties object that contains the values for the Header
Throws:
java.io.IOException - if there is an error writing to the InputStream
ConfigObjectsNotResolvableException - if the passed in ComponentType is not the type referenced by the passed in ServiceComponentDefn.

importConnectorBinding

public ConnectorBinding importConnectorBinding(java.io.InputStream stream,
                                               ConfigurationObjectEditor editor,
                                               java.lang.String newName)
                                        throws java.io.IOException,
                                               ConfigObjectsNotResolvableException,
                                               InvalidConfigurationElementException
Description copied from interface: ConfigurationImportExportUtility

This method will be used to import a Connector Binding Object given a ImputStream. If the ImputStream resource does not contain enough data to recombine a complete Connector, then a ConfigurationObjectsNotResolvableException will be thrown.

This method returns an object which represent one Connector Bindings.

The user of this method must either commit the Connector ComponentType of this Connector Binding or make sure that it already exists in the server configuration database before attempting to commit the Connector Binding ServiceComponentDefn object. This is because every Connector Binding ServiceComponentDefn has a reference to a corresponding Connector ComponentType

Specified by:
importConnectorBinding in interface ConfigurationImportExportUtility
Parameters:
stream - the input stream to read the configuration object representation from
editor - the ConfigurationObjectEditor to use to create the Configuration object in the InputStream resource.
Returns:
the configuration object that represent the data in the InputStream resource. see javadoc heading for details.
Throws:
java.io.IOException - if there is an error reading from the InputStream
ConfigObjectsNotResolvableException - if the ServiceComponentDefn does not have a reference to a ComponentType object for which there is data to recombine in the InputStream resource.
InvalidConfigurationElementException - if there is a problem with the representation of the configuration element as it exists in the InputStream resource, usually some type of formatting problem.

importExistingConnectorBindings

public java.util.Collection importExistingConnectorBindings(org.jdom.Element root,
                                                            ConfigurationObjectEditor editor,
                                                            boolean importExistingBinding)
                                                     throws java.io.IOException,
                                                            ConfigObjectsNotResolvableException,
                                                            InvalidConfigurationElementException
Throws:
java.io.IOException
ConfigObjectsNotResolvableException
InvalidConfigurationElementException

importConnectorBindings

public java.util.Collection importConnectorBindings(org.jdom.Element root,
                                                    ConfigurationObjectEditor editor)
                                             throws java.io.IOException,
                                                    ConfigObjectsNotResolvableException,
                                                    InvalidConfigurationElementException
Throws:
java.io.IOException
ConfigObjectsNotResolvableException
InvalidConfigurationElementException

importConnectorBindings

public java.util.Collection importConnectorBindings(java.io.InputStream stream,
                                                    ConfigurationObjectEditor editor)
                                             throws java.io.IOException,
                                                    ConfigObjectsNotResolvableException,
                                                    InvalidConfigurationElementException
Description copied from interface: ConfigurationImportExportUtility

This method will be used to import a group of Connector Bindings Objects given a ImputStream. If the ImputStream resource does not contain enough data to recombine a complete Connector, then a ConfigurationObjectsNotResolvableException will be thrown.

This method returns a collection of objects which represent one or more Connector Bindings.

The user of this method must either commit the Connector ComponentType of this Connector Binding's or make sure that it already exists in the server configuration database before attempting to commit the Connector Binding ServiceComponentDefn object. This is because every Connector Binding ServiceComponentDefn has a reference to a corresponding Connector ComponentType

Specified by:
importConnectorBindings in interface ConfigurationImportExportUtility
Parameters:
stream - the input stream to read the configuration object representation from *
editor - the ConfigurationObjectEditor to use to create the Configuration objects in the InputStream resource.
Returns:
the configuration objects that are represented as data in the InputStream resource. see javadoc heading for details.
Throws:
java.io.IOException - if there is an error reading from the InputStream
ConfigObjectsNotResolvableException - if the ServiceComponentDefn does not have a reference to a ComponentType object for which there is data to recombine in the InputStream resource.
InvalidConfigurationElementException - if there is a problem with the representation of the configuration element as it exists in the InputStream resource, usually some type of formatting problem.

importExistingConnectorBindings

public java.util.Collection importExistingConnectorBindings(java.io.InputStream stream,
                                                            ConfigurationObjectEditor editor,
                                                            boolean useExistingBinding)
                                                     throws java.io.IOException,
                                                            ConfigObjectsNotResolvableException,
                                                            InvalidConfigurationElementException
Throws:
java.io.IOException
ConfigObjectsNotResolvableException
InvalidConfigurationElementException

importConnectorBindingAndType

public java.lang.Object[] importConnectorBindingAndType(java.io.InputStream stream,
                                                        ConfigurationObjectEditor editor,
                                                        java.lang.String[] newName)
                                                 throws java.io.IOException,
                                                        ConfigObjectsNotResolvableException,
                                                        InvalidConfigurationElementException
Description copied from interface: ConfigurationImportExportUtility

This method will be used to import a Connector Binding and its related Component Type at the same time from the given ImputStream. If the ImputStream resource does not contain enough data to recombine a complete Connector, then a ConfigurationObjectsNotResolvableException will be thrown.

This method also allows you to rename the imported Connector object possibly to avoid name conflicts with other objects already in the server.

If the name parameter submitted is null, the name of the confiuguration object as it exists in the InputStream will be used.

This method returns an array of objects which represent a Connector Binding ServiceComponentDefn and its corresponding Connector ComponentType. The index of each is defined by the following static variables:

 ConfigurationImportExportUtility.COMPONENT_TYPE_INDEX
 ConfigurationImportExportUtility.SERVICE_COMPONENT_DEFN_INDEX
 

These array indices are also used to override the Connector ComponentType name and Connector Binding ServiceComponentDefn name with the passed in name[] String array. If either or both of these String names are null, the name of the returned configuration object will be as it exists in the InputStream resource.

The user of this method must either commit the Connector ComponentType of this Connector Binding's ServiceComponentDefn or make sure that it already exists in the server configuration database before attempting to commit the Connector Binding ServiceComponentDefn object. This is because every Connector Binding ServiceComponentDefn has a reference to a corresponding Connector ComponentType

Specified by:
importConnectorBindingAndType in interface ConfigurationImportExportUtility
Parameters:
stream - the input stream to read the configuration object representation from
editor - the ConfigurationObjectEditor to use to create the Configuration objects in the InputStream resource.
Returns:
the configuration objects that are represented as data in the InputStream resource. see javadoc heading for details.
Throws:
java.io.IOException - if there is an error reading from the InputStream
ConfigObjectsNotResolvableException - if the ServiceComponentDefn does not have a reference to a ComponentType object for which there is data to recombine in the InputStream resource.
InvalidConfigurationElementException - if there is a problem with the representation of the configuration element as it exists in the InputStream resource, usually some type of formatting problem.

resolveConfigurationObjects

public void resolveConfigurationObjects(java.util.Collection collection)
                                 throws ConfigObjectsNotResolvableException

This method will resolve that none of the configuration objects in the collection of configuration objects refers to a configuration object that is not in the collection. Any set of configuration obejcts can be passed to this method.

Any number of actual Configuration object instances may be passed in in the Collection.

Parameters:
collection - the collection of configuration objects to be resolved
Throws:
ConfigObjectsNotResolvableException - if the collection of objects passed in are not self containing.

importConnectorArchive

public ConnectorArchive importConnectorArchive(java.io.InputStream stream,
                                               ConfigurationObjectEditor editor)
                                        throws java.io.IOException,
                                               InvalidConfigurationElementException
The Zip file stream format is look like this. /ConnectorTypes /ConnectorTypeName ConnectorTypeName.xml extension1.jar extension2.jar

Specified by:
importConnectorArchive in interface ConfigurationImportExportUtility
Parameters:
stream - - zip file stream
editor - - Configuration object to use
Returns:
- loaded ConnectorArchive
Throws:
java.io.IOException
InvalidConfigurationElementException
Since:
4.3.2
See Also:
com.metamatrix.common.config.util.ConfigurationImportExport#importConnectorArchive(java.io.InputStream, com.metamatrix.common.config.api.ConfigurationObjectEditor)

exportConnectorArchive

public void exportConnectorArchive(java.io.OutputStream stream,
                                   ConnectorArchive archive,
                                   java.util.Properties properties)
                            throws java.io.IOException,
                                   ConfigObjectsNotResolvableException
Description copied from interface: ConfigurationImportExportUtility
Export the given archive into zip format and write to the the stream provided

Specified by:
exportConnectorArchive in interface ConfigurationImportExportUtility
Parameters:
stream - - stream to written into
archive - - archive to be exported
properties - the properties object that contains the values for the Header
Throws:
java.io.IOException
ConfigObjectsNotResolvableException
Since:
4.3
See Also:
com.metamatrix.common.config.util.ConfigurationImportExportUtility#exportConnectorArchive(java.io.OutputStream, com.metamatrix.common.config.api.ConnectorArchive)


Copyright © 2009. All Rights Reserved.