com.metamatrix.common.config.model
Class ConfigurationModelContainerImpl

java.lang.Object
  extended by com.metamatrix.common.config.model.ConfigurationModelContainerImpl
All Implemented Interfaces:
ConfigurationModelContainer, java.io.Serializable, java.lang.Cloneable

public class ConfigurationModelContainerImpl
extends java.lang.Object
implements ConfigurationModelContainer, java.io.Serializable

See Also:
Serialized Form

Constructor Summary
ConfigurationModelContainerImpl()
           
ConfigurationModelContainerImpl(java.util.ArrayList configObjects)
           
ConfigurationModelContainerImpl(java.util.Collection configObjects)
           
ConfigurationModelContainerImpl(Configuration config)
           
 
Method Summary
 void addComponentType(ComponentType type)
          NOTE: The following 2 methods are provided here because the editor does not interact with the ConfiguratonModelContainer.
 void addObject(java.lang.Object obj)
           
 void addObjects(java.util.Collection objects)
           
 void addResource(SharedResource rd)
           
 java.lang.Object clone()
           
 java.util.Collection getAllComponentTypeDefinitions(ComponentTypeID typeID)
          Return a collection of the ComponentTypeDefinitions for the request component type
 java.util.Collection getAllObjects()
          Return all the objects that make up this model.
 ComponentType getComponentType(java.lang.String fullName)
          Return the ComponentType for the specified name
 ComponentTypeDefn getComponentTypeDefinition(ComponentTypeID typeID, java.lang.String defnName)
          Return a ComponentTypeDefn for a give typeID and defnName.
 java.util.Map getComponentTypes()
          Return a map of the component types.
 Configuration getConfiguration()
           
 ConfigurationID getConfigurationID()
           
 java.util.Collection getConnectionPools()
          Return a collection of objects of type ResourceDescriptor.
 java.util.Properties getDefaultPropertyValues(ComponentTypeID componentTypeID)
          Return a properties object that contains the default properties defined for the specified component type
 java.util.Properties getDefaultPropertyValues(java.util.Properties defaultProperties, ComponentTypeID componentTypeID)
           
 Host getHost(java.lang.String fullName)
          Return a host based on the host name.
 java.util.Collection getHosts()
          Return a collection of objects of type Host.
 SharedResource getResource(java.lang.String resourceName)
          Return a ProductType based on the specified name.
 java.util.Collection getResources()
           
 boolean isConfigurationModel()
          Method indicates if this configuration model was loaded with a complete configuration or not.
 void remove(BaseID objID)
           
 void setComponentTypes(java.util.Map newCompTypes)
           
 void setConfigurationObjects(java.util.Collection objects)
          Method used when the XMLConfiguration is initialized for the first time.
 void setResources(java.util.Collection theResources)
           
 void setResources(java.util.Map theResources)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigurationModelContainerImpl

public ConfigurationModelContainerImpl()

ConfigurationModelContainerImpl

public ConfigurationModelContainerImpl(java.util.ArrayList configObjects)
                                throws ConfigurationException
Throws:
ConfigurationException

ConfigurationModelContainerImpl

public ConfigurationModelContainerImpl(java.util.Collection configObjects)
                                throws ConfigurationException
Throws:
ConfigurationException

ConfigurationModelContainerImpl

public ConfigurationModelContainerImpl(Configuration config)
Method Detail

getConfiguration

public Configuration getConfiguration()
Specified by:
getConfiguration in interface ConfigurationModelContainer

isConfigurationModel

public boolean isConfigurationModel()
Method indicates if this configuration model was loaded with a complete configuration or not. The other use is just to load with connector bindings and connector types where the configuration is not needed.

Returns:
Since:
4.3

getConfigurationID

public ConfigurationID getConfigurationID()
Specified by:
getConfigurationID in interface ConfigurationModelContainer

getAllObjects

public java.util.Collection getAllObjects()
Description copied from interface: ConfigurationModelContainer
Return all the objects that make up this model. Note, objects that are modeled under the context of a configuration will be contained in the Configuration object. The following are the types that are not modeled under on configuration:
  • Host
  • ComponentTypes,ProductTypes
  • ConnectorBindings
  • Resources
  • Specified by:
    getAllObjects in interface ConfigurationModelContainer
    Returns:
    Collection of objects

    getComponentTypes

    public java.util.Map getComponentTypes()
    Description copied from interface: ConfigurationModelContainer
    Return a map of the component types. type full name ComponentType

    Specified by:
    getComponentTypes in interface ConfigurationModelContainer
    Returns:
    map of ComponentTypes

    getComponentTypeDefinition

    public ComponentTypeDefn getComponentTypeDefinition(ComponentTypeID typeID,
                                                        java.lang.String defnName)
    Return a ComponentTypeDefn for a give typeID and defnName.

    Specified by:
    getComponentTypeDefinition in interface ConfigurationModelContainer
    Parameters:
    typeID - identifies the specific @link ComponentType to look for
    defnName - idenfities the @link ComponentTypeDefn to look for in the componentType.
    Returns:
    ComponentTypeDefn
    Since:
    4.1

    getAllComponentTypeDefinitions

    public java.util.Collection getAllComponentTypeDefinitions(ComponentTypeID typeID)
    Description copied from interface: ConfigurationModelContainer
    Return a collection of the ComponentTypeDefinitions for the request component type

    Specified by:
    getAllComponentTypeDefinitions in interface ConfigurationModelContainer
    Returns:
    Collection of ComponentTypeDefinitions

    getComponentType

    public ComponentType getComponentType(java.lang.String fullName)
    Description copied from interface: ConfigurationModelContainer
    Return the ComponentType for the specified name

    Specified by:
    getComponentType in interface ConfigurationModelContainer
    Returns:
    ComponentType

    getDefaultPropertyValues

    public java.util.Properties getDefaultPropertyValues(ComponentTypeID componentTypeID)
    Description copied from interface: ConfigurationModelContainer
    Return a properties object that contains the default properties defined for the specified component type

    Specified by:
    getDefaultPropertyValues in interface ConfigurationModelContainer
    Returns:
    default Properties for the ComponentType

    getDefaultPropertyValues

    public java.util.Properties getDefaultPropertyValues(java.util.Properties defaultProperties,
                                                         ComponentTypeID componentTypeID)
    Specified by:
    getDefaultPropertyValues in interface ConfigurationModelContainer

    getHosts

    public java.util.Collection getHosts()
    Description copied from interface: ConfigurationModelContainer
    Return a collection of objects of type Host. These are all the hosts defined in this configuration.

    Specified by:
    getHosts in interface ConfigurationModelContainer
    Returns:

    getHost

    public Host getHost(java.lang.String fullName)
    Description copied from interface: ConfigurationModelContainer
    Return a host based on the host name.

    Specified by:
    getHost in interface ConfigurationModelContainer
    Returns:

    getConnectionPools

    public java.util.Collection getConnectionPools()
    Description copied from interface: ConfigurationModelContainer
    Return a collection of objects of type ResourceDescriptor. These are all the hosts defined in this configuration.

    Specified by:
    getConnectionPools in interface ConfigurationModelContainer
    Returns:

    getResource

    public SharedResource getResource(java.lang.String resourceName)
    Description copied from interface: ConfigurationModelContainer
    Return a ProductType based on the specified name.

    Specified by:
    getResource in interface ConfigurationModelContainer
    Returns:

    getResources

    public java.util.Collection getResources()
    Specified by:
    getResources in interface ConfigurationModelContainer

    setComponentTypes

    public void setComponentTypes(java.util.Map newCompTypes)

    setResources

    public void setResources(java.util.Map theResources)

    setResources

    public void setResources(java.util.Collection theResources)

    addComponentType

    public void addComponentType(ComponentType type)
    NOTE: The following 2 methods are provided here because the editor does not interact with the ConfiguratonModelContainer. And these are objects that are not configuration bound and live outside of the Configuration object. This is why Host is not here, because it does live within the configuration even though it is not configuration bound.


    addResource

    public void addResource(SharedResource rd)

    addObjects

    public void addObjects(java.util.Collection objects)
                    throws ConfigurationException
    Throws:
    ConfigurationException

    addObject

    public void addObject(java.lang.Object obj)
                   throws ConfigurationException
    Throws:
    ConfigurationException

    setConfigurationObjects

    public void setConfigurationObjects(java.util.Collection objects)
                                 throws ConfigurationException
    Method used when the XMLConfiguration is initialized for the first time. Otherwsise should call updateConfigurationObjects.

    Throws:
    ConfigurationException

    remove

    public void remove(BaseID objID)
                throws ConfigurationException
    Throws:
    ConfigurationException

    clone

    public java.lang.Object clone()
    Specified by:
    clone in interface ConfigurationModelContainer
    Overrides:
    clone in class java.lang.Object


    Copyright © 2009. All Rights Reserved.