com.metamatrix.platform.admin.apiimpl
Class ConfigurationAdminAPIImpl

java.lang.Object
  extended by com.metamatrix.platform.admin.apiimpl.SubSystemAdminAPIImpl
      extended by com.metamatrix.platform.admin.apiimpl.ConfigurationAdminAPIImpl
All Implemented Interfaces:
ConfigurationAdminAPI, SubSystemAdminAPI, java.io.Serializable

public class ConfigurationAdminAPIImpl
extends SubSystemAdminAPIImpl
implements ConfigurationAdminAPI

See Also:
Serialized Form

Method Summary
 Host addHost(java.lang.String hostName, java.util.Properties properties)
          Add a host to the Configuration
 void baselineCurrentConfiguration()
          Baselines the realtime portion of the current (operational) configuration into the next-startup configuration.
 java.util.List checkPropertiesDecryptable(java.util.List defns)
          Check whether the encrypted properties for the specified ComponentDefns can be decrypted.
 void clearHistory()
          Clear the history of all actions without undoing any of them.
 ConfigurationObjectEditor createEditor()
          Returns a ConfigurationObjectEditor to perform editing operations on a configuration type object.
 java.util.Set executeInsertTransaction(ConfigurationID assignConfigurationID, java.util.List actions)
          Execute a list of insert actions and for actions on objects of type ComponentDefn or DeployedComponent object, it will have its configuration id resassigned, and optionally return the set of objects or object IDs that were affected/modified by the action.
 java.util.Set executeTransaction(ActionDefinition action)
          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)
          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.
 java.util.Collection getAllGlobalConfigObjects()
           This method will return a Collection of objects that represent the set of global configuration objects currently represented in the configuration database.
 java.util.Collection getAllProductTypes(boolean includeDeprecated)
          Returns a List of type ProductType that represents all the ProductTypes defined.
 ComponentDefn getComponentDefn(ConfigurationID configurationID, ComponentDefnID componentDefnID)
          Returns a ComponentDefn for the specified ComponentDefnID.
 java.util.Collection getComponentDefns(java.util.Collection componentDefnIDs, ConfigurationID configurationID)
          Returns a collection of ComponentDefns for the specified collection of ComponentDefnIDs and ConfigurationID.
 ComponentType getComponentType(ComponentTypeID id)
          Returns a ComponentType for the specified ComponentTypeID
 java.util.Map getComponentTypeDefinitions(java.util.Collection componentIDs)
          Returns a Map of component type definitions for each ComponentTypeID that is contained in the passed Collection.
 java.util.Collection getComponentTypeDefinitions(ComponentTypeID componentTypeID)
          Returns the component type definitions for the specified ComponentTypeID.
 Configuration getConfiguration(java.lang.String configName)
          Returns the named Configuration.
 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 current ConfigurationModelContainer.
 Configuration getCurrentConfiguration()
          Returns the current deployed Configuration.
 ConfigurationID getCurrentConfigurationID()
          Returns the ConfigurationID for the current configuration.
 java.util.List getHistory()
          Get the history of actions executed in transactions by this editor.
 int getHistoryLimit()
          Set the limit on the number of actions in the history.
 int getHistorySize()
          Get the number of actions that are currently in the history.
 Host getHost(HostID hostID)
          Returns a Host for the specified HostID.
 java.util.Collection getHosts()
          Returns a Collection of currently defined hosts.
static ConfigurationAdminAPI getInstance(ClusteredRegistryState registry)
           
 java.util.Collection getMonitoredComponentTypes(boolean includeDeprecated)
          Returns a List of type ComponentType .
 Configuration getNextStartupConfiguration()
          Returns the current deployed Configuration.
 ConfigurationID getNextStartupConfigurationID()
          Returns the ID of the next startup Configuration, which should reflect the desired runtime state of the system.
 java.util.Collection getProducts()
          Obtain the Collection of ReleaseInfo objects which represent the products of the system.
 java.util.Collection getResources()
          Returns a Collection of ResourceDescriptor for all internal resources defined to the system.
 java.util.Collection getResources(ComponentTypeID componentTypeID)
          Returns a Collection of ResourceDescriptor that are of the specified resource type.
 Configuration getStartupConfiguration()
          Returns the current deployed Configuration.
 ConfigurationID getStartupConfigurationID()
          Returns the ID of the startup Configuration, which should reflect the desired runtime state of the system.
 void saveResources(java.util.Collection resourceDescriptors)
          Save the resource changes based on each ResourceDescriptor in the collection.
 void setHistoryLimit(int maximumHistoryCount)
          Set the limit on the number of actions in the history.
 java.util.Set undoActionsAsTransaction(int numberOfActions)
          Undo the specified number of previously-committed transactions.
 
Methods inherited from class com.metamatrix.platform.admin.apiimpl.SubSystemAdminAPIImpl
getSessionID
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static ConfigurationAdminAPI getInstance(ClusteredRegistryState registry)
                                         throws MetaMatrixComponentException
Throws:
MetaMatrixComponentException

createEditor

public ConfigurationObjectEditor createEditor()
                                       throws ConfigurationException,
                                              InvalidSessionException,
                                              AuthorizationException,
                                              MetaMatrixComponentException
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.

Specified by:
createEditor in interface ConfigurationAdminAPI
Returns:
ConfigurationObjectEditor
Throws:
ConfigurationException
InvalidSessionException
AuthorizationException
MetaMatrixComponentException

getCurrentConfigurationID

public ConfigurationID getCurrentConfigurationID()
                                          throws ConfigurationException,
                                                 InvalidSessionException,
                                                 AuthorizationException,
                                                 MetaMatrixComponentException
Returns the ConfigurationID for the current configuration.

Specified by:
getCurrentConfigurationID in interface ConfigurationAdminAPI
Parameters:
sessionID - ID of administrator's session
Returns:
ConfigurationID for current configuration
Throws:
ConfigurationException - if an error occurred within or during communication with the Configuration Service.
InvalidSessionException - if there is not a valid administrative session
AuthorizationException - if the administrator does not have privileges to use this method
MetaMatrixComponentException - if a general remote system problem occurred

getNextStartupConfigurationID

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

Specified by:
getNextStartupConfigurationID in interface ConfigurationAdminAPI
Parameters:
sessionID - ID of administrator's session
Returns:
ID of next startup configuration
Throws:
ConfigurationException - if an error occurred within or during communication with the Configuration Service.
InvalidSessionException - if there is not a valid administrative session
AuthorizationException - if the administrator does not have privileges to use this method
MetaMatrixComponentException - if a general remote system problem occurred

getStartupConfigurationID

public ConfigurationID getStartupConfigurationID()
                                          throws ConfigurationException,
                                                 InvalidSessionException,
                                                 AuthorizationException,
                                                 MetaMatrixComponentException
Returns the ID of the startup Configuration, which should reflect the desired runtime state of the system.

Specified by:
getStartupConfigurationID in interface ConfigurationAdminAPI
Parameters:
sessionID - ID of administrator's session
Returns:
ID of startup configuration
Throws:
ConfigurationException - if an error occurred within or during communication with the Configuration Service.
InvalidSessionException - if there is not a valid administrative session
AuthorizationException - if the administrator does not have privileges to use this method
MetaMatrixComponentException - if a general remote system problem occurred

getCurrentConfiguration

public Configuration getCurrentConfiguration()
                                      throws ConfigurationException,
                                             InvalidSessionException,
                                             AuthorizationException,
                                             MetaMatrixComponentException
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.

Specified by:
getCurrentConfiguration in interface ConfigurationAdminAPI
Returns:
Configuration that is currently in use
Throws:
ConfigurationException - if an error occurred within or during communication with the Configuration Service.
InvalidSessionException
AuthorizationException
MetaMatrixComponentException

getNextStartupConfiguration

public Configuration getNextStartupConfiguration()
                                          throws ConfigurationException,
                                                 InvalidSessionException,
                                                 AuthorizationException,
                                                 MetaMatrixComponentException
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.

Specified by:
getNextStartupConfiguration in interface ConfigurationAdminAPI
Returns:
Configuration that is currently in use
Throws:
ConfigurationException - if an error occurred within or during communication with the Configuration Service.
InvalidSessionException
AuthorizationException
MetaMatrixComponentException

getStartupConfiguration

public Configuration getStartupConfiguration()
                                      throws ConfigurationException,
                                             InvalidSessionException,
                                             AuthorizationException,
                                             MetaMatrixComponentException
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.

Specified by:
getStartupConfiguration in interface ConfigurationAdminAPI
Returns:
Configuration that is currently in use
Throws:
ConfigurationException - if an error occurred within or during communication with the Configuration Service.
InvalidSessionException
AuthorizationException
MetaMatrixComponentException

getConfiguration

public Configuration getConfiguration(java.lang.String configName)
                               throws InvalidConfigurationException,
                                      ConfigurationException,
                                      InvalidSessionException,
                                      AuthorizationException,
                                      MetaMatrixComponentException
Returns the named Configuration.

Specified by:
getConfiguration in interface ConfigurationAdminAPI
Parameters:
configName - is the name of the Configuration to obtain
Returns:
Configuration
Throws:
InvalidConfigurationException - if the specified name does not exist
ConfigurationException - if an error occurred within or during communication with the Configuration Service.
InvalidSessionException
AuthorizationException
MetaMatrixComponentException

getConfigurationModel

public ConfigurationModelContainer getConfigurationModel(java.lang.String configName)
                                                  throws ConfigurationException,
                                                         InvalidSessionException,
                                                         AuthorizationException,
                                                         MetaMatrixComponentException
Description copied from interface: ConfigurationAdminAPI
Returns the current ConfigurationModelContainer. 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.

Specified by:
getConfigurationModel in interface ConfigurationAdminAPI
Parameters:
configName - is the name of the Configuration model to obtain
Returns:
Configuration that is currently in use
Throws:
ConfigurationException - if an error occurred within or during communication with the Configuration Service.
InvalidSessionException
AuthorizationException
MetaMatrixComponentException

getConfigurationAndDependents

public java.util.Collection getConfigurationAndDependents(ConfigurationID configID)
                                                   throws ConfigurationException,
                                                          InvalidSessionException,
                                                          AuthorizationException,
                                                          MetaMatrixComponentException

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
  
 

Specified by:
getConfigurationAndDependents in interface ConfigurationAdminAPI
Parameters:
sessionID - ID of administrator's session
configID - ID Of a Configuration
Returns:
Collection of BaseObject instances
Throws:
ConfigurationException - if an error occurred within or during communication with the Configuration Service.
InvalidSessionException - if there is not a valid administrative session
AuthorizationException - if the administrator does not have privileges to use this method
MetaMatrixComponentException - if a general remote system problem occurred

getAllGlobalConfigObjects

public java.util.Collection getAllGlobalConfigObjects()
                                               throws ConfigurationException,
                                                      InvalidSessionException,
                                                      AuthorizationException,
                                                      MetaMatrixComponentException

This method will return a Collection of objects that represent the set of global configuration objects currently represented in the configuration database. This method will generally be used when attempting to import a configuration into the database as the 'Next Startup' configuration. This information is important when importing a new configuration so that any global type configuration objects that are to be imported can be resolved against the global objects that currently exist in the database.

 
  The Collection of objects will contain the following configuration
  object types:
 
  ComponentTypes
  ProductTypes
  Hosts
  
 

Specified by:
getAllGlobalConfigObjects in interface ConfigurationAdminAPI
Returns:
a Collection of all of the global configuration objects as they exist in the database.
Throws:
ConfigurationException - if an error occurred within or during communication with the Configuration Service.
InvalidSessionException - if there is not a valid administrative session
AuthorizationException - if the administrator does not have privileges to use this method
MetaMatrixComponentException - if a general remote system problem occurred

baselineCurrentConfiguration

public void baselineCurrentConfiguration()
                                  throws ConfigurationException,
                                         InvalidSessionException,
                                         AuthorizationException,
                                         MetaMatrixComponentException
Baselines the realtime portion of the current (operational) configuration into the next-startup configuration.

Specified by:
baselineCurrentConfiguration in interface ConfigurationAdminAPI
Parameters:
principalName - the name of the principal that is requesting the baselining
Throws:
ConfigurationException
InvalidSessionException
AuthorizationException
MetaMatrixComponentException

getComponentTypeDefinitions

public java.util.Map getComponentTypeDefinitions(java.util.Collection componentIDs)
                                          throws ConfigurationException,
                                                 InvalidSessionException,
                                                 AuthorizationException,
                                                 MetaMatrixComponentException
Returns a Map of component type definitions for each ComponentTypeID that is contained in the passed Collection. This does not return the dependent definitions for service type components.

Specified by:
getComponentTypeDefinitions in interface ConfigurationAdminAPI
Parameters:
componentIDs - is a Collection
Returns:
Map of a Map of component type difinitions keyed by ComponentTypeID
Throws:
ConfigurationException
InvalidSessionException
AuthorizationException
MetaMatrixComponentException
See Also:
getDependentComponentTypeDefintions(Collection)

getComponentTypeDefinitions

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

Specified by:
getComponentTypeDefinitions in interface ConfigurationAdminAPI
Parameters:
componentTypeID - is a ComponentTypeID
Returns:
Collection of ComponentTypeDefns
Throws:
ConfigurationException
InvalidSessionException
AuthorizationException
MetaMatrixComponentException
See Also:
getDependentComponentTypeDefinitions(ComponentTypeID)

getAllComponentTypeDefinitions

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

Specified by:
getAllComponentTypeDefinitions in interface ConfigurationAdminAPI
Parameters:
componentTypeID - is a ComponentTypeID
Returns:
Collection of ComponentTypeDefns
Throws:
ConfigurationException
InvalidSessionException
AuthorizationException
MetaMatrixComponentException
See Also:
getDependentComponentTypeDefinitions(ComponentTypeID)

getMonitoredComponentTypes

public java.util.Collection getMonitoredComponentTypes(boolean includeDeprecated)
                                                throws ConfigurationException,
                                                       InvalidSessionException,
                                                       AuthorizationException,
                                                       MetaMatrixComponentException
Returns a List of type ComponentType . that are flagged as being monitored. A component of this type is considered to be available for monitoring statistics.

Specified by:
getMonitoredComponentTypes in interface ConfigurationAdminAPI
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.
InvalidSessionException
AuthorizationException
MetaMatrixComponentException
See Also:
#ComponentType

getComponentType

public ComponentType getComponentType(ComponentTypeID id)
                               throws ConfigurationException,
                                      InvalidSessionException,
                                      AuthorizationException,
                                      MetaMatrixComponentException
Returns a ComponentType for the specified ComponentTypeID

Specified by:
getComponentType in interface ConfigurationAdminAPI
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.
InvalidSessionException
AuthorizationException
MetaMatrixComponentException

getAllComponentTypes

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

Specified by:
getAllComponentTypes in interface ConfigurationAdminAPI
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.
InvalidSessionException
AuthorizationException
MetaMatrixComponentException
See Also:
#ComponentType

getAllProductTypes

public java.util.Collection getAllProductTypes(boolean includeDeprecated)
                                        throws ConfigurationException,
                                               InvalidSessionException,
                                               AuthorizationException,
                                               MetaMatrixComponentException
Returns a List of type ProductType that represents all the ProductTypes defined.

Specified by:
getAllProductTypes in interface ConfigurationAdminAPI
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 ProductType
Throws:
ConfigurationException - if an error occurred within or during communication with the Configuration Service.
InvalidSessionException
AuthorizationException
MetaMatrixComponentException
See Also:
#ProductType

getHost

public Host getHost(HostID hostID)
             throws ConfigurationException,
                    InvalidSessionException,
                    AuthorizationException,
                    MetaMatrixComponentException
Returns a Host for the specified HostID.

Specified by:
getHost in interface ConfigurationAdminAPI
Returns:
Host
Throws:
ConfigurationException - if an error occurred within or during communication with the Configuration Service.
InvalidSessionException
AuthorizationException
MetaMatrixComponentException

getHosts

public java.util.Collection getHosts()
                              throws ConfigurationException,
                                     InvalidSessionException,
                                     AuthorizationException,
                                     MetaMatrixComponentException
Returns a Collection of currently defined hosts. This method does not cache, it reretrieves the data everytime.

Specified by:
getHosts in interface ConfigurationAdminAPI
Returns:
Collection of type Host
Throws:
ConfigurationException - if an error occurred within or during communication with the Configuration Service.
InvalidSessionException
AuthorizationException
MetaMatrixComponentException

getComponentDefns

public java.util.Collection getComponentDefns(java.util.Collection componentDefnIDs,
                                              ConfigurationID configurationID)
                                       throws ConfigurationException,
                                              InvalidSessionException,
                                              AuthorizationException,
                                              MetaMatrixComponentException
Returns a collection of ComponentDefns for the specified collection of ComponentDefnIDs and ConfigurationID. If the configuration is null the parent name from the componentID will be used.
The reason for adding the option to specify the configurationID is so that the same collection of componentIDs can be used to obtain the componentDefns from the different configurations. Otherwise, the requestor would have to create a new set of componetDefnIDs for each configuration.

Specified by:
getComponentDefns in interface ConfigurationAdminAPI
Parameters:
componentDefnIDs - contains all the ids for which componet defns to be returned
configurationID - is the configuration from which the component defns are to be derived; optional, nullalble
Returns:
Collection of ComponentDefn objects
Throws:
ConfigurationException - if an error occurred within or during communication with the Configuration Service.
InvalidSessionException
AuthorizationException
MetaMatrixComponentException

getComponentDefn

public ComponentDefn getComponentDefn(ConfigurationID configurationID,
                                      ComponentDefnID componentDefnID)
                               throws ConfigurationException,
                                      InvalidSessionException,
                                      AuthorizationException,
                                      MetaMatrixComponentException
Description copied from interface: ConfigurationAdminAPI
Returns a ComponentDefn for the specified ComponentDefnID.

Specified by:
getComponentDefn in interface ConfigurationAdminAPI
Returns:
ComponentDefn
Throws:
ConfigurationException - if an error occurred within or during communication with the Configuration Service.
InvalidSessionException
AuthorizationException
MetaMatrixComponentException

getResources

public java.util.Collection getResources()
                                  throws ConfigurationException,
                                         InvalidSessionException,
                                         AuthorizationException,
                                         MetaMatrixComponentException
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);

Specified by:
getResources in interface ConfigurationAdminAPI
Throws:
AuthorizationException - if caller is not authorized to perform this method.
InvalidSessionException - if the callerSessionID is not valid or is expired.
MetaMatrixComponentException - if an error occurred in communicating with a component.
ConfigurationException

getResources

public java.util.Collection getResources(ComponentTypeID componentTypeID)
                                  throws ConfigurationException,
                                         InvalidSessionException,
                                         AuthorizationException,
                                         MetaMatrixComponentException
Returns a Collection of ResourceDescriptor that are of the specified resource type.

Specified by:
getResources in interface ConfigurationAdminAPI
Parameters:
componentTypeID - that identifies the type of resources to be returned
Throws:
AuthorizationException - if caller is not authorized to perform this method.
InvalidSessionException - if the callerSessionID is not valid or is expired.
MetaMatrixComponentException - if an error occurred in communicating with a component.
ConfigurationException

saveResources

public void saveResources(java.util.Collection resourceDescriptors)
                   throws ConfigurationException,
                          InvalidSessionException,
                          AuthorizationException,
                          MetaMatrixComponentException
Save the resource changes based on each ResourceDescriptor in the collection.

Specified by:
saveResources in interface ConfigurationAdminAPI
Parameters:
resourceDescriptors - for the resources to be changed
Throws:
AuthorizationException - if caller is not authorized to perform this method.
InvalidSessionException - if the callerSessionID is not valid or is expired.
MetaMatrixComponentException - if an error occurred in communicating with a component.
ConfigurationException

executeTransaction

public java.util.Set executeTransaction(ActionDefinition action)
                                 throws ModificationException,
                                        ConfigurationLockException,
                                        ConfigurationException,
                                        InvalidSessionException,
                                        AuthorizationException,
                                        MetaMatrixComponentException
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.

Specified by:
executeTransaction in interface ConfigurationAdminAPI
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:
ModificationException - if the target of the action is invalid, or if the target object is not a supported class of targets.
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 Metadata Service.
ConfigurationLockException
InvalidSessionException
AuthorizationException
MetaMatrixComponentException

executeTransaction

public java.util.Set executeTransaction(java.util.List actions)
                                 throws ModificationException,
                                        ConfigurationLockException,
                                        ConfigurationException,
                                        InvalidSessionException,
                                        AuthorizationException,
                                        MetaMatrixComponentException
Execute a list of actions, and optionally return the set of objects or object IDs that were affected/modified by the action.

Specified by:
executeTransaction in interface ConfigurationAdminAPI
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:
ModificationException - if the target of any of the actions is invalid, or if the target object is not a supported class of targets.
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 Metadata Service.
ConfigurationLockException
InvalidSessionException
AuthorizationException
MetaMatrixComponentException

executeInsertTransaction

public java.util.Set executeInsertTransaction(ConfigurationID assignConfigurationID,
                                              java.util.List actions)
                                       throws ModificationException,
                                              ConfigurationLockException,
                                              ConfigurationException,
                                              InvalidSessionException,
                                              AuthorizationException,
                                              MetaMatrixComponentException
Execute a list of insert actions and for actions on objects of type ComponentDefn or DeployedComponent object, it will have its configuration id resassigned, and optionally return the set of objects or object IDs that were affected/modified by the action. Only insert actions can be performed here because changing a configuration id on a modify action has larger consiquences.

Specified by:
executeInsertTransaction in interface ConfigurationAdminAPI
Parameters:
assignConfigurationID - the configuration for which any action for a component object will have its configurationID set to this.
actions - the ordered list of actions that are to be performed on data within the repository.
Returns:
the set of objects that were affected by this transaction.
Throws:
ModificationException - if the target of any of the actions is invalid, or an action that is not an insert, or if the target object is not a supported class of targets.
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 Metadata Service.
ConfigurationLockException
InvalidSessionException
AuthorizationException
MetaMatrixComponentException

undoActionsAsTransaction

public java.util.Set undoActionsAsTransaction(int numberOfActions)
                                       throws ConfigurationException,
                                              InvalidSessionException,
                                              AuthorizationException,
                                              MetaMatrixComponentException
Undo the specified number of previously-committed transactions.

Specified by:
undoActionsAsTransaction in interface ConfigurationAdminAPI
Parameters:
numberOfActions - the number of actions in the history that are to be undone.
principalName - of the person executing the transaction
Returns:
the set of objects that were affected by undoing these actions.
Throws:
java.lang.IllegalArgumentException - if the number is negative.
ConfigurationException - if an error occurred within or during communication with the Metadata Service.
InvalidSessionException
AuthorizationException
MetaMatrixComponentException

getHistory

public java.util.List getHistory()
                          throws ConfigurationException,
                                 InvalidSessionException,
                                 AuthorizationException,
                                 MetaMatrixComponentException
Get the history of actions executed in transactions by this editor. The actions at the front of the list will be those most recently executed.

Specified by:
getHistory in interface ConfigurationAdminAPI
Returns:
the ordered list of actions in the history.
Throws:
ConfigurationException - if an error occurred within or during communication with the Metadata Service.
InvalidSessionException
AuthorizationException
MetaMatrixComponentException

clearHistory

public void clearHistory()
                  throws ConfigurationException,
                         InvalidSessionException,
                         AuthorizationException,
                         MetaMatrixComponentException
Clear the history of all actions without undoing any of them.

Specified by:
clearHistory in interface ConfigurationAdminAPI
Throws:
ConfigurationException - if an error occurred within or during communication with the Metadata Service.
InvalidSessionException
AuthorizationException
MetaMatrixComponentException

getHistorySize

public int getHistorySize()
                   throws ConfigurationException,
                          InvalidSessionException,
                          AuthorizationException,
                          MetaMatrixComponentException
Get the number of actions that are currently in the history.

Specified by:
getHistorySize in interface ConfigurationAdminAPI
Returns:
the number of actions in the history.
Throws:
ConfigurationException - if an error occurred within or during communication with the Metadata Service.
InvalidSessionException
AuthorizationException
MetaMatrixComponentException

getHistoryLimit

public int getHistoryLimit()
                    throws ConfigurationException,
                           InvalidSessionException,
                           AuthorizationException,
                           MetaMatrixComponentException
Set the limit on the number of actions in the history. Note that the history may at times be greater than this limit, because when actions are removed from the history, all actions for a transactions are removed at the same time. If doing so would make the history size smaller than the limit, no actions are removed.

Specified by:
getHistoryLimit in interface ConfigurationAdminAPI
Throws:
ConfigurationException - if an error occurred within or during communication with the Metadata Service.
InvalidSessionException
AuthorizationException
MetaMatrixComponentException

setHistoryLimit

public void setHistoryLimit(int maximumHistoryCount)
                     throws ConfigurationException,
                            InvalidSessionException,
                            AuthorizationException,
                            MetaMatrixComponentException
Set the limit on the number of actions in the history. Note that the history may at times be greater than this limit, because when actions are removed from the history, all actions for a transactions are removed at the same time. If doing so would make the history size smaller than the limit, no actions are removed.

Specified by:
setHistoryLimit in interface ConfigurationAdminAPI
Throws:
ConfigurationException - if an error occurred within or during communication with the Metadata Service.
InvalidSessionException
AuthorizationException
MetaMatrixComponentException

addHost

public Host addHost(java.lang.String hostName,
                    java.util.Properties properties)
             throws ConfigurationException,
                    InvalidSessionException,
                    AuthorizationException,
                    MetaMatrixComponentException
Description copied from interface: ConfigurationAdminAPI
Add a host to the Configuration

Specified by:
addHost in interface ConfigurationAdminAPI
Parameters:
hostName - String name of Host to add to Configuration
Returns:
Host
Throws:
ConfigurationException - if an error occurred within or during communication with the Configuration Service.
InvalidSessionException - if there is not a valid administrative session
AuthorizationException - if the administrator does not have privileges to use this method
MetaMatrixComponentException - if a general remote system problem occurred
Since:
4.3
See Also:
com.metamatrix.platform.admin.apiimpl.ConfigurationAdminAPI#addHost(java.lang.String, java.util.Properties)

checkPropertiesDecryptable

public java.util.List checkPropertiesDecryptable(java.util.List defns)
                                          throws ConfigurationException,
                                                 InvalidSessionException,
                                                 AuthorizationException,
                                                 MetaMatrixComponentException
Description copied from interface: ConfigurationAdminAPI
Check whether the encrypted properties for the specified ComponentDefns can be decrypted.

Specified by:
checkPropertiesDecryptable in interface ConfigurationAdminAPI
Parameters:
defns - List
Returns:
List in the same order as the paramater defns. For each, true if the properties could be decrypted for that defn.
Throws:
ConfigurationException
InvalidSessionException
AuthorizationException
MetaMatrixComponentException
Since:
4.3
See Also:
ConfigurationAdminAPI.checkPropertiesDecryptable(java.util.List)

getProducts

public java.util.Collection getProducts()
                                 throws AuthorizationException,
                                        InvalidSessionException,
                                        MetaMatrixComponentException
Description copied from interface: ConfigurationAdminAPI
Obtain the Collection of ReleaseInfo objects which represent the products of the system. Each ReleaseInfo contains the name of the product, as well as release info.

Specified by:
getProducts in interface ConfigurationAdminAPI
Returns:
Collection of ReleaseInfo objects containing names of licensed products, as well as other release info
Throws:
AuthorizationException - if caller is not authorized to perform this method.
InvalidSessionException - if the callerSessionID is not valid or is expired.
MetaMatrixComponentException - if an error occurs in communicating with a component.
Since:
4.2
See Also:
com.metamatrix.platform.admin.api.ConfigurationAdminAPI#getProducts(com.metamatrix.platform.security.api.MetaMatrixSessionID)


Copyright © 2009. All Rights Reserved.