com.metamatrix.platform.config.api.service
Interface ConfigurationServiceInterface

All Superinterfaces:
ServiceInterface
All Known Implementing Classes:
ConfigurationServiceImpl

public interface ConfigurationServiceInterface
extends ServiceInterface


Field Summary
static java.lang.String NAME
           
 
Fields inherited from interface com.metamatrix.platform.service.api.ServiceInterface
WAIT_TO_DIE_TIME
 
Method Summary
 Host addHost(java.lang.String hostName, java.lang.String principalName, java.util.Properties properties)
          Add Host to Configuration Add a new Host to the System (MetaMatrix Cluster)
 VMComponentDefn addProcess(java.lang.String processName, java.lang.String hostName, java.lang.String principalName, java.util.Properties properties)
          Add Process for the specified Host to Configuration Add a new Virtuial Machine to the System (MetaMatrix Cluster)
 java.util.List checkPropertiesDecryptable(java.util.List defns)
          Check whether the encrypted properties for the specified ComponentDefns can be decrypted.
 ConnectorBinding createConnectorBinding(java.lang.String connectorBindingName, java.lang.String connectorType, java.lang.String vmName, java.lang.String principalName, java.util.Properties properties)
          Deploy a new Connector Binding into Configuration
 ConfigurationObjectEditor createEditor()
          Returns a ConfigurationObjectEditor to perform editing operations on a configuration type object.
 void delete(ComponentObject theObject, boolean theDeleteDependenciesFlag, java.lang.String principalName)
          Deletes a component object.
 void delete(ComponentType componentType, java.lang.String principalName)
          Delete a Component Type
 DeployedComponent deployService(VMComponentDefnID theProcessID, java.lang.String serviceName, java.lang.String principalName)
          Deploys the ServiceComponentDefns contained by the Configuration, onto the specified Host and VM.
 java.util.Set executeTransaction(ActionDefinition action, java.lang.String principalName)
          Execute as a single transaction the specified action, and optionally return the set of objects or object IDs that were affected/modified by the action.
 java.util.Set executeTransaction(java.util.List actions, java.lang.String principalName)
          Execute a list of actions, and optionally return the set of objects or object IDs that were affected/modified by the action.
 java.util.Collection getAllComponentTypeDefinitions(ComponentTypeID componentTypeID)
          Returns the all component type definitions for the specified ComponentTypeID.
 java.util.Collection getAllComponentTypes(boolean includeDeprecated)
          Returns a List of type ComponentType that represents all the ComponentTypes defined.
 ComponentDefn getComponentDefn(ConfigurationID configurationID, ComponentDefnID componentDefnID)
          Returns a ComponentDefn for the specified ComponentDefnID.
 ComponentType getComponentType(ComponentTypeID id)
          Returns a ComponentType for the specified ComponentTypeID
 java.util.Collection getComponentTypeDefinitions(ComponentTypeID componentTypeID)
          Returns the component type definitions for the specified ComponentTypeID.
 java.util.Collection getConfigurationAndDependents(ConfigurationID configID)
           Returns a Collection containing the Configuration object for the specified ConfigurationID id, and also any dependant objects needed to fully define this configuration, such as Host objects, ComponentType objects, and ComponentTypeDefn objects.
 ConfigurationModelContainer getConfigurationModel(java.lang.String configName)
          Returns the ConfigurationModelContainer that contains everything (i.e., ComponentTypes, Shared Resources and ComponentDefns) that the server needs to start.
 Configuration getCurrentConfiguration()
          Returns the current deployed Configuration.
 ConfigurationID getCurrentConfigurationID()
          Returns the ConfigurationID for the operational configuration.
 Host getHost(HostID hostID)
          Returns a Host for the specified HostID.
 java.util.Collection getHosts()
          Returns a Collection of currently defined hosts.
 Configuration getNextStartupConfiguration()
          Returns the next startup Configuration, the Configuration that the system will next boot up with (once it is entirely shut down).
 ConfigurationID getNextStartupConfigurationID()
          Returns the ID of the next startup Configuration, which should reflect the desired runtime state of the system.
 java.util.Collection getResources()
          Returns a Collection of ResourceDescriptor for all internal resources defined to the system.
 ConnectorBinding importConnectorBinding(java.io.InputStream inputStream, java.lang.String name, java.lang.String vmName, java.lang.String principalName)
          Import a connector Binding from InputStream, and deploy it to a PSC.
 ComponentType importConnectorType(java.io.InputStream inputStream, java.lang.String name, java.lang.String principalName)
          Import a Connector Type
 java.lang.Object modify(ComponentObject theObject, java.util.Properties theProperties, java.lang.String principalName)
          Modify a Component in Configuration
 void saveResources(java.util.Collection resourceDescriptors, java.lang.String principalName)
          Save the resource changes based on each ResourceDescriptor in the collection.
 void setSystemPropertyValue(java.lang.String propertyName, java.lang.String propertyValue, java.lang.String principalName)
          Set System Property Value in Configuration
 void updateSystemPropertyValues(java.util.Properties properties, java.lang.String principalName)
          Set System Property Values in Configuration.
 
Methods inherited from interface com.metamatrix.platform.service.api.ServiceInterface
checkState, die, dieNow, getConnectionPoolStats, getCurrentState, getHostname, getID, getInitException, getProcessName, getProperties, getQueueStatistics, getQueueStatistics, getServiceData, getServiceType, getStartTime, getStateChangeTime, init, isAlive, setInitException, updateState
 

Field Detail

NAME

static final java.lang.String NAME
See Also:
Constant Field Values
Method Detail

createEditor

ConfigurationObjectEditor createEditor()
                                       throws ConfigurationException
Returns a ConfigurationObjectEditor to perform editing operations on a configuration type object. The editing process will create actions for each specific type of editing operation. Those actions are what need to be submitted to the ConfigurationService for actual updates to occur.

Returns:
ConfigurationObjectEditor
Throws:
ConfigurationException - if an error occurred within or during communication with the Configuration Service.

getCurrentConfigurationID

ConfigurationID getCurrentConfigurationID()
                                          throws ConfigurationException
Returns the ConfigurationID for the operational configuration.

Returns:
ConfigurationID for current configuration
Throws:
ConfigurationException - if an error occurred within or during communication with the Configuration Service.

getNextStartupConfigurationID

ConfigurationID getNextStartupConfigurationID()
                                              throws ConfigurationException
Returns the ID of the next startup Configuration, which should reflect the desired runtime state of the system.

Returns:
ID of next startup configuration
Throws:
ConfigurationException - if an error occurred within or during communication with the Configuration Service.

getCurrentConfiguration

Configuration getCurrentConfiguration()
                                      throws ConfigurationException
Returns the current deployed Configuration. Note, this configuration may not match the actual configuration the system is currently executing under due to administrative task that can be done to tune the system. Those administrative task do not change the actual Configuration stored in the ConfigurationService.

Returns:
Configuration that is currently in use
Throws:
ConfigurationException - if an error occurred within or during communication with the Configuration Service.

getNextStartupConfiguration

Configuration getNextStartupConfiguration()
                                          throws ConfigurationException
Returns the next startup Configuration, the Configuration that the system will next boot up with (once it is entirely shut down).

Returns:
Configuration that the system will next start up with.
Throws:
ConfigurationException - if an error occurred within or during communication with the Configuration Service.

getConfigurationModel

ConfigurationModelContainer getConfigurationModel(java.lang.String configName)
                                                  throws ConfigurationException
Returns the ConfigurationModelContainer that contains everything (i.e., ComponentTypes, Shared Resources and ComponentDefns) that the server needs to start.

Parameters:
configName - if the name of the configuration model to obtain
Returns:
ConfigurationModelContainer
Throws:
ConfigurationException

getConfigurationAndDependents

java.util.Collection getConfigurationAndDependents(ConfigurationID configID)
                                                   throws ConfigurationException

Returns a Collection containing the Configuration object for the specified ConfigurationID id, and also any dependant objects needed to fully define this configuration, such as Host objects, ComponentType objects, and ComponentTypeDefn objects.

A Configuration instance contains all of the ComponentDefn objects that "belong" to just that Configuration: VM component definitions, service component definitions, product service configurations, and deployed components. Objects such as Host objects, ComponentType objects, and ComponentTypeDefn objects describe ComponentDefns, but are not contained by a Configuration. Therefore, they are included in this Collection for convenience.

The Collection will contain instances of BaseObject. Specifically, this Map should contain the objects for: one configuration object, one or more Host objects, one or more ComponentType objects, and one or more ComponentTypeDefn objects.

This method is intended to facilitate exporting a configuration to XML.

Here is what the Collection would contain at runtime:

 
  Configuration instance
  Host instance1
  Host instance2
  ...
  ComponentType instance1
  ComponentType instance2
  ...
  ComponentTypeDefn instance1
  ComponentTypeDefn instance2
  
 

Parameters:
configID - ID Of a Configuration
Returns:
Collection of BaseObject instances
Throws:
ConfigurationException - if an error occurred within or during communication with the Configuration Service.

getComponentTypeDefinitions

java.util.Collection getComponentTypeDefinitions(ComponentTypeID componentTypeID)
                                                 throws ConfigurationException
Returns the component type definitions for the specified ComponentTypeID. This does not return the dependent definitions for service type components.

Parameters:
componentTypeID - is a ComponentTypeID
Returns:
Collection of ComponentTypeDefns
Throws:
ConfigurationException - if an error occurred within or during communication with the Configuration Service.
See Also:
getDependentComponentTypeDefinitions(ComponentTypeID)

getAllComponentTypeDefinitions

java.util.Collection getAllComponentTypeDefinitions(ComponentTypeID componentTypeID)
                                                    throws ConfigurationException
Returns the all component type definitions for the specified ComponentTypeID. This includes the dependent definitions for service type components.

Parameters:
componentTypeID - is a ComponentTypeID
Returns:
Collection of ComponentTypeDefns
Throws:
ConfigurationException - if an error occurred within or during communication with the Configuration Service.
See Also:
getDependentComponentTypeDefinitions(ComponentTypeID)

getComponentType

ComponentType getComponentType(ComponentTypeID id)
                               throws ConfigurationException
Returns a ComponentType for the specified ComponentTypeID

Parameters:
id - is for the requested component type.
Returns:
ComponentType based on the id
Throws:
ConfigurationException - if an error occurred within or during communication with the Configuration Service.

getAllComponentTypes

java.util.Collection getAllComponentTypes(boolean includeDeprecated)
                                          throws ConfigurationException
Returns a List of type ComponentType that represents all the ComponentTypes defined.

Parameters:
includeDeprecated - true if class names that have been deprecated should be included in the returned list, or false if only non-deprecated constants should be returned.
Returns:
Collection of type ComponentType
Throws:
ConfigurationException - if an error occurred within or during communication with the Configuration Service.
See Also:
#ComponentType

getHost

Host getHost(HostID hostID)
             throws ConfigurationException
Returns a Host for the specified HostID.

Returns:
Host
Throws:
ConfigurationException - if an error occurred within or during communication with the Configuration Service.

getHosts

java.util.Collection getHosts()
                              throws ConfigurationException
Returns a Collection of currently defined hosts. This method does not cache, it re-retrieves the data every time.

Returns:
Collection of type Host
Throws:
ConfigurationException - if an error occurred within or during communication with the Configuration Service.

getComponentDefn

ComponentDefn getComponentDefn(ConfigurationID configurationID,
                               ComponentDefnID componentDefnID)
                               throws ConfigurationException
Returns a ComponentDefn for the specified ComponentDefnID.

Parameters:
configurationID - is the configuration for which the component exist
componentDefnID - is the component being requested
Returns:
ComponentDefn
Throws:
ConfigurationException - if an error occurred within or during communication with the Configuration Service.

getResources

java.util.Collection getResources()
                                  throws ConfigurationException
Returns a Collection of ResourceDescriptor for all internal resources defined to the system. The internal resources are not managed with the other configuration related information. They are not dictated based on which configuration they will operate (i.e., next startup or operational);

Throws:
ConfigurationException - if an error occurred within or during communication with the Configuration Service.

saveResources

void saveResources(java.util.Collection resourceDescriptors,
                   java.lang.String principalName)
                   throws ConfigurationException
Save the resource changes based on each ResourceDescriptor in the collection.

Parameters:
resourceDescriptors - for the resources to be changed *
Throws:
ConfigurationException - if an error occurred within or during communication with the Configuration Service.

executeTransaction

java.util.Set executeTransaction(ActionDefinition action,
                                 java.lang.String principalName)
                                 throws ConfigurationException
Execute as a single transaction the specified action, and optionally return the set of objects or object IDs that were affected/modified by the action.

Parameters:
action - the definition of the action to be performed on data within the repository.
principalName - of the person executing the transaction
Returns:
the set of objects that were affected by this transaction.
Throws:
java.lang.IllegalArgumentException - if the action is null or if the result specification is invalid
ConfigurationException - if an error occurred within or during communication with the Configuration Service.

executeTransaction

java.util.Set executeTransaction(java.util.List actions,
                                 java.lang.String principalName)
                                 throws ConfigurationException
Execute a list of actions, and optionally return the set of objects or object IDs that were affected/modified by the action.

Parameters:
actions - the ordered list of actions that are to be performed on data within the repository.
principalName - of the person executing the transaction
Returns:
the set of objects that were affected by this transaction.
Throws:
java.lang.IllegalArgumentException - if the action is null or if the result specification is invalid
ConfigurationException - if an error occurred within or during communication with the Configuration Service.

addHost

Host addHost(java.lang.String hostName,
             java.lang.String principalName,
             java.util.Properties properties)
             throws ConfigurationException
Add Host to Configuration Add a new Host to the System (MetaMatrix Cluster)

Parameters:
hostName - Host Name of new Host being added to Configuration
principalName -
properties -
Returns:
Host
Throws:
ConfigurationException
Since:
4.3

addProcess

VMComponentDefn addProcess(java.lang.String processName,
                           java.lang.String hostName,
                           java.lang.String principalName,
                           java.util.Properties properties)
                           throws ConfigurationException
Add Process for the specified Host to Configuration Add a new Virtuial Machine to the System (MetaMatrix Cluster)

Parameters:
processName - Name of the New Process being Added to Configuration
hostName - Name of the Host that the new Process is being added
principalName - User Name of user who is making the change
properties - name, value need to setup a Host
Returns:
VMComponentDefn
Throws:
ConfigurationException
Since:
4.3

setSystemPropertyValue

void setSystemPropertyValue(java.lang.String propertyName,
                            java.lang.String propertyValue,
                            java.lang.String principalName)
                            throws ConfigurationException
Set System Property Value in Configuration

Parameters:
propertyName - Name of Property
propertyValue - Value of Property
principalName - User Name of user who is making the change
Throws:
ConfigurationException
Since:
4.3

updateSystemPropertyValues

void updateSystemPropertyValues(java.util.Properties properties,
                                java.lang.String principalName)
                                throws ConfigurationException
Set System Property Values in Configuration. Any properties not set will be left unchanged.

Parameters:
properties - Properties to set
principalName - User Name of user who is making the change
Throws:
ConfigurationException
Since:
4.3

createConnectorBinding

ConnectorBinding createConnectorBinding(java.lang.String connectorBindingName,
                                        java.lang.String connectorType,
                                        java.lang.String vmName,
                                        java.lang.String principalName,
                                        java.util.Properties properties)
                                        throws ConfigurationException
Deploy a new Connector Binding into Configuration

Parameters:
connectorBindingName -
connectorType - Connector Type for this Connector Binding
vmName - Name of the PSC to deploy the Connector Binding to. If pscName is null, this method does not deploy the Connector Binding to a PSC.
principalName - User Name of user who is making the change
properties -
Returns:
ConnectorBinding object
Throws:
ConfigurationException
Since:
4.3

modify

java.lang.Object modify(ComponentObject theObject,
                        java.util.Properties theProperties,
                        java.lang.String principalName)
                        throws ConfigurationException
Modify a Component in Configuration

Parameters:
theObject -
theProperties -
principalName -
Returns:
Throws:
java.lang.Exception
ConfigurationException
Since:
4.3

importConnectorType

ComponentType importConnectorType(java.io.InputStream inputStream,
                                  java.lang.String name,
                                  java.lang.String principalName)
                                  throws ConfigurationException
Import a Connector Type

Parameters:
inputStream -
name - Name of the Connector Type to import
principalName - User Name of user who is making the change
Returns:
ComponentType
Throws:
ConfigurationException
Since:
4.3

importConnectorBinding

ConnectorBinding importConnectorBinding(java.io.InputStream inputStream,
                                        java.lang.String name,
                                        java.lang.String vmName,
                                        java.lang.String principalName)
                                        throws ConfigurationException
Import a connector Binding from InputStream, and deploy it to a PSC.

Parameters:
inputStream -
name - Name of Connector Binding to import
vmName - Name of the VM to deploy the Connector Binding to. If vmName is null, this method does not deploy the Connector Binding .
principalName -
Returns:
ConnectorBinding
Throws:
ConfigurationException
Since:
4.3

delete

void delete(ComponentObject theObject,
            boolean theDeleteDependenciesFlag,
            java.lang.String principalName)
            throws ConfigurationException
Deletes a component object.

Parameters:
theObject - the object being deleted
theDeleteDependenciesFlag - boolean flag for deleting dependencies
principalName - User Name of user who is making the change
Throws:
ConfigurationException
Since:
4.3

delete

void delete(ComponentType componentType,
            java.lang.String principalName)
            throws ConfigurationException
Delete a Component Type

Parameters:
componentType - Component Type Object being deleted
principalName - User Name who is making the change
Throws:
ConfigurationException
Since:
4.3

deployService

DeployedComponent deployService(VMComponentDefnID theProcessID,
                                java.lang.String serviceName,
                                java.lang.String principalName)
                                throws ConfigurationException
Deploys the ServiceComponentDefns contained by the Configuration, onto the specified Host and VM.

Parameters:
theProcessID - for the VM on which the services will be deployed
serviceName - Name of the ServiceComponentDefn
principalName - User Name deploying the Services
Returns:
DeployedComponent of the ServiceComponentDefns that was deployed
Throws:
ConfigurationException
Since:
6.1

checkPropertiesDecryptable

java.util.List checkPropertiesDecryptable(java.util.List defns)
                                          throws ConfigurationException
Check whether the encrypted properties for the specified ComponentDefns can be decrypted.

Parameters:
defns - List
Returns:
List in the same order as the parameter defns. For each, true if the properties could be decrypted for that defn.
Throws:
ConfigurationException
Since:
4.3


Copyright © 2009. All Rights Reserved.