com.metamatrix.common.config.model
Class BasicConfigurationObjectEditor

java.lang.Object
  extended by com.metamatrix.common.actions.AbstractObjectEditor
      extended by com.metamatrix.common.config.model.BasicConfigurationObjectEditor
All Implemented Interfaces:
ObjectEditor, ConfigurationObjectEditor, java.io.Serializable

public class BasicConfigurationObjectEditor
extends AbstractObjectEditor
implements ConfigurationObjectEditor

BasicConfigurationObjectEditor provides the update capabiltiy to the implemented versions of the config.api package. NOTE: - in all the methods that take a non-mutable object and returns it, a clone of the object is returned instead of the passed object. This is done so that any future change to the object is not made to the same instance that has a prior change (action) waiting to be executed.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.metamatrix.common.actions.AbstractObjectEditor
ADD_LBL, FIRST_COMMAND, LAST_COMMAND, REMOVE_LBL, SET_LBL
 
Fields inherited from interface com.metamatrix.common.actions.ObjectEditor
ADD, REMOVE, SET
 
Constructor Summary
BasicConfigurationObjectEditor()
          Create an instance of this editor that does not create any actions.
BasicConfigurationObjectEditor(boolean createActions)
          Create an instance of this editor, and specify whether actions are to be created during modifications.
 
Method Summary
 void addAuthenticationProvider(Configuration configuration, AuthenticationProvider provider)
          Creates a new ConnectorBinding for a given Configuration and ProductServiceConfig; also automatically "deploys" the service anywhere that this PSC is already deployed, by creating the necessary DeployedComponents (this will only work if the PSC parameter belongs to the Configuration parameter).
 ComponentObject addProperty(ComponentObject t, java.lang.String name, java.lang.String value)
          Adds the property value for the specified name on the ComponentObject.
 java.lang.Object assignConfigurationID(java.lang.Object t, ConfigurationID configurationID)
          This method is used by the ConfigurationServiceImpl to enable the console to import actions and assign them to the current configuration.
 AuthenticationProvider createAuthenticationProviderComponent(Configuration configuration, AuthenticationProvider originalProvider, java.lang.String newName)
          This method will create a provider component from the original provider and give a new name.
 AuthenticationProvider createAuthenticationProviderComponent(ConfigurationID configurationID, AuthenticationProvider original, java.lang.String newName)
          This method will create a provider component from the original provider and give a new name.
 AuthenticationProvider createAuthenticationProviderComponent(ConfigurationID configurationID, ComponentTypeID typeID, java.lang.String descriptorName)
          This method will create a provider component based on the specific component type ID
 BasicComponentDefn createComponentDefn(int defnTypeCode, ConfigurationID configID, ComponentTypeID typeID, java.lang.String defnName)
          This method is not provided in the interface, it is only used by the spi implementation for ease of creating the correct type of component defn.
 ComponentType createComponentType(ComponentType componentType, java.lang.String name)
          Create a new ComponentType instance from a copy of the specified ComponentType.
 ComponentType createComponentType(int classTypeCode, java.lang.String name, ComponentTypeID parentID, ComponentTypeID superID, boolean deployable, boolean monitored)
          Copy-create method - creates a deep-copy of the original configuration, with the new name.
 ComponentTypeDefn createComponentTypeDefn(ComponentTypeID typeID, PropertyDefinition propertyDefinition)
          Deprecated. as of v 2.0 beta 1, use createComponentTypeDefn(ComponentTypeID, PropertyDefinition, boolean)
 ComponentTypeDefn createComponentTypeDefn(ComponentTypeID typeID, PropertyDefinition propertyDefinition, boolean isEffectiveImmediately)
          Create a new ComponentTypeDefn instance with the specified name.
 ComponentTypeDefn createComponentTypeDefn(ComponentType type, PropertyDefinition propertyDefinition)
          Deprecated. as of v 2.0 beta 1, use createComponentTypeDefn(ComponentType, PropertyDefinition, boolean)
 ComponentTypeDefn createComponentTypeDefn(ComponentType type, PropertyDefinition propertyDefinition, boolean isEffectiveImmediately)
          Create a new ComponentTypeDefn and update the ComponentType with the new defintion.
 void createConfiguration(ConfigurationID configID, java.util.Collection configObjects)
          This method is used only for importing a complete configurtion model.
 Configuration createConfiguration(java.lang.String configurationName)
          Create a new Configuration instance with the specified name ID.
 Configuration createConfiguration(java.lang.String configurationName, java.util.Date creationDate, java.util.Date lastChangedDate)
          Create a new Configuration instance with the specified name ID, and the specified Date parameters.
 ConnectorBinding createConnectorComponent(Configuration configuration, ConnectorBinding originalConnector, java.lang.String newName)
           
 ConnectorBinding createConnectorComponent(ConfigurationID configurationID, ComponentTypeID typeID, java.lang.String descriptorName, java.lang.String routingUUID)
          This method will create a connector component based on the specific component type ID
 ConnectorBinding createConnectorComponent(ConfigurationID configurationID, ConnectorBinding original, java.lang.String newName, java.lang.String routingUUID)
          This method will create a connector component from the original connector and give a new name.
 DeployedComponent createDeployedServiceComponent(java.lang.String name, Configuration configuration, HostID hostId, VMComponentDefnID vmId, ServiceComponentDefn serviceComponentDefn)
           
 DeployedComponent createDeployedServiceComponent(java.lang.String name, ConfigurationID configurationID, HostID hostId, VMComponentDefnID vmId, ServiceComponentDefnID serviceComponentDefnID, ComponentTypeID serviceComponentTypeID)
          Create a new DeployedComponent instance respresenting a deployed Service.
 DeployedComponent createDeployedVMComponentx(java.lang.String instanceName, ConfigurationID configurationID, HostID hostId, VMComponentDefnID vmComponentDefnID, ComponentTypeID componentTypeID)
           
 DeployedComponent createDeployedVMComponentx(java.lang.String name, Configuration configuration, VMComponentDefn vmComponentDefn)
           
 Host createHost(Configuration configuration, Host original, java.lang.String newName)
           
 Host createHost(ConfigurationID configurationID, java.lang.String hostName)
           
 Host createHost(Configuration configuration, java.lang.String hostName)
           
 Host createHost(java.lang.String hostName)
          Create a new Host instance with the specified ID.
 PropDefnAllowedValue createPropDefnAllowedValue(ComponentTypeDefn typeDefn, PropertyDefinition propDefn, java.lang.String value)
          Create a new PropDefnAllowedValue that will be added to the modifiable (cloned) PropertyDefinition that was obtained from the ComponentTypeDefn.
 ResourceDescriptor createResourceDescriptor(Configuration configuration, ComponentTypeID typeID, java.lang.String descriptorName)
          Create a new ResourceDescriptor Component Definition instance with a specified configuration
 ResourceDescriptor createResourceDescriptor(ConfigurationID configurationID, ComponentTypeID typeID, java.lang.String descriptorName)
          Create a new ResourceDescriptor Component Definition instance with a specified configuration
 ResourceDescriptor createResourceDescriptor(Configuration configuration, ResourceDescriptor original, java.lang.String newName)
           
 ServiceComponentDefn createServiceComponentDefn(Configuration configuration, ComponentTypeID typeID, java.lang.String componentName)
          Creates a new ServiceComponentDefn for a given Configuration and ProductServiceConfig; also automatically "deploys" the service anywhere that this PSC is already deployed, by creating the necessary DeployedComponents (this will only work if the PSC parameter belongs to the Configuration parameter).
 ServiceComponentDefn createServiceComponentDefn(Configuration configuration, ComponentTypeID typeID, java.lang.String componentName, java.lang.String routingUUID)
          Create a new Service Component Definition instance with a specified configuration
 ServiceComponentDefn createServiceComponentDefn(ConfigurationID configurationID, ComponentTypeID typeID, java.lang.String componentName)
          Create a new Service Component Definition instance with a specified configuration
 ServiceComponentDefn createServiceComponentDefn(ConfigurationID configurationID, ComponentTypeID typeID, java.lang.String componentName, java.lang.String routingUUID)
          Create a new Service Component Definition instance with a specified configuration
 ServiceComponentDefn createServiceComponentDefn(Configuration configuration, ServiceComponentDefn originalServiceComponentDefn, java.lang.String newName)
          Creates a new ServiceComponentDefn in the indicated Configuration, copied from the indicated original ServiceComponentDefn, with the indicated new name.
 SharedResource createSharedResource(ComponentTypeID typeID, java.lang.String resourceName)
          Create a new SharedResource instance
 VMComponentDefn createVMComponentDefn(Configuration configuration, HostID hostID, ComponentTypeID typeID, java.lang.String componentName)
          Create a new VM Component Definition instance with a specified configuration
 VMComponentDefn createVMComponentDefn(ConfigurationID configurationID, HostID hostID, ComponentTypeID typeID, java.lang.String componentName)
          Create a new VM Component Definition instance with a specified configuration
 VMComponentDefn createVMComponentDefn(Configuration configuration, VMComponentDefn original, java.lang.String newName)
           
 Configuration delete(ComponentObject target, Configuration configuration)
          Removes the component object from the specified configuration if no dependent objects exist and returns an updated configuration.
 Configuration delete(ComponentObject target, Configuration configuration, boolean deleteDependencies)
          Removes the component object from the specified configuration if no dependent objects exist.
 void delete(ComponentType target)
          Call to delete a component type and all its definitions.
 void delete(ComponentTypeDefn target, ComponentType type)
          Call to delete a ComponentTypeDefn and remove it from the ComponentType.
 void delete(Configuration target)
          Call to delete a configuration, which is assumed to have no dependencies.
 void delete(Configuration target, boolean deleteDependencies)
          Deletes the configuration if there exist no dependent objects.
 void delete(ConfigurationID targetID)
          Call to delete a configuration and all its dependencies.
 void delete(Host target)
          Call to delete a host
 void delete(PropDefnAllowedValue target)
           
 SharedResource delete(SharedResource target)
          Deletes the shared resource.
 DeployedComponent deployServiceDefn(Configuration configuration, ServiceComponentDefn serviceComponentDefn, VMComponentDefnID vmID)
          Deploys a ServiceComponentDefn to the specified VM This method is harmless to call if the ServiceComponentDefn is already deployed anywhere.
 java.util.Properties getEditableProperties(ComponentObject t)
          Returns a modifiable properties object for the specified ComponentObject.
 boolean isDeployed(ServiceComponentDefnID defnID, Configuration config)
           
 ComponentTypeDefn modifyComponentTypeDefn(ComponentTypeDefn original, ComponentTypeDefn updated)
          Updates the target ComponentTypeDefn with the updated PropertyDefinition.
 ComponentObject modifyProperties(ComponentObject t, java.util.Properties props, int command)
          call modifyProperties
 ComponentObject removeProperty(ComponentObject t, java.lang.String name)
          Removes the property value for the specified name on the ComponentObject.
 VMComponentDefn renameVM(VMComponentDefn vm, java.lang.String name)
          Change the name of a previously defined VM in the Next Startup config.
 ComponentObject setComponentType(ComponentObject t, ComponentTypeID componentType)
          Sets the component type on the specifice component object.
 ComponentType setComponentTypeDefinitions(ComponentType t, java.util.Collection defns)
          Set the list of ComponentTypeDefns for a local ComponentType object.
 Configuration setConfigurationComponentDefns(Configuration t, java.util.Collection componentDefns)
           
 Configuration setConfigurationDeployedComponents(Configuration t, java.util.Collection deployedComponents)
           
 Configuration setConfigurationHostComponents(Configuration t, java.util.Collection hostComponents)
           
 ComponentObject setCreationChangedHistory(ComponentObject defn, java.lang.String createdBy, java.lang.String creationDate)
           
 ComponentType setCreationChangedHistory(ComponentType type, java.lang.String createdBy, java.lang.String creationDate)
           
 DeployedComponent setEnabled(DeployedComponent deployedcomponent, boolean enabled)
          It updates the DeployedComponent by setting its enabled flag.
 ComponentType setIsDeployable(ComponentType t, boolean newValue)
           
 Configuration setIsDeployed(Configuration t, boolean newValue)
           
 ComponentType setIsDeprecated(ComponentType t, boolean newValue)
           
 ComponentType setIsMonitored(ComponentType t, boolean newValue)
           
 Configuration setIsReleased(Configuration t, boolean newValue)
           
 ComponentObject setLastChangedHistory(ComponentObject defn, java.lang.String lastChangedBy, java.lang.String lastChangedDate)
           
 ComponentType setLastChangedHistory(ComponentType type, java.lang.String lastChangedBy, java.lang.String lastChangedDate)
           
 Configuration setLogConfiguration(Configuration t, LogConfiguration logConfiguration)
          Sets the LogConfiguration in effect for the Configuration
 ComponentType setParentComponentTypeID(ComponentType t, ComponentTypeID parentID)
          Sets the parent component type, null is allowed;
 ComponentObject setProperty(ComponentObject t, java.lang.String name, java.lang.String value)
          Set the property value for the specified name on the ComponentObject.
 ComponentTypeDefn setPropertyDefinition(ComponentTypeDefn t, PropertyDefinition defn)
          Set the PropertyDefinition on the ComponentTypeDefn
 void setRoutingUUID(ServiceComponentDefn serviceComponentDefn, java.lang.String newRoutingUUID)
          Sets this ServiceComponentDefn's String routing UUID.
 ComponentType setSuperComponentTypeID(ComponentType t, ComponentTypeID superID)
          Sets the super component type, null is allowed;
 Configuration undoAction(ActionDefinition action, BaseObject target)
           
 ComponentObject undoAction(ActionDefinition action, ComponentObject target)
          Modify the specified target object by undoing the specified action.
 ComponentType updateComponentType(ComponentType origType, ComponentType replaceType)
          This will update / replace the existing component type with the specified component type.
 
Methods inherited from class com.metamatrix.common.actions.AbstractObjectEditor
createAddAction, createAddNamedAction, createCreationAction, createDestroyAction, createExchangeAction, createExchangeBoolean, createExchangeNamedAction, createRemoveAction, createRemoveNamedAction, doCreateActions, getDestination, getLabel, setCreateActions, setDestination, verifyCommand, verifyTargetClass
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.metamatrix.common.actions.ObjectEditor
getDestination, setDestination
 

Constructor Detail

BasicConfigurationObjectEditor

public BasicConfigurationObjectEditor(boolean createActions)
Create an instance of this editor, and specify whether actions are to be created during modifications. If actions are created, then each action is sent directly to the destination at the time the action is created.

Parameters:
createActions - flag specifying whether modification actions should be created for each invocation to modifyObject
Throws:
java.lang.IllegalArgumentException - if the defaults reference is null

BasicConfigurationObjectEditor

public BasicConfigurationObjectEditor()
Create an instance of this editor that does not create any actions.

Throws:
java.lang.IllegalArgumentException - if the defaults reference is null
Method Detail

undoAction

public ComponentObject undoAction(ActionDefinition action,
                                  ComponentObject target)
Modify the specified target object by undoing the specified action.

In general, the client user of this class should (prior to invoking this method) obtain the target MetadataID from the action and find the corresponding Component, and pass the resulting Component in as the target argument. In the case of a DestroyObject action being undone, the corresponding Component may not exist in the client's universe - it has already been destroyed; passing a null as the target argument in this case is acceptable. For all other actions, the target argument may not be null.

The result of this object will be the target after being modified by the specified action. In the case of a CreateObject action being undone, this method 'destroys' the object, so a null result is returned; the client should ensure this object is removed from its context. In all other cases, this method returns the modified target.

Parameters:
action - the action to be undone (may not be null).
target - the Component that is the target of the action.
Returns:
the modified Component, or null if the object is to be removed as a result of undoing the action.
Throws:
java.lang.IllegalArgumentException - if the action reference is null, or if the target is null and the action is not a DestroyObject.

undoAction

public Configuration undoAction(ActionDefinition action,
                                BaseObject target)

createHost

public Host createHost(java.lang.String hostName)
Description copied from interface: ConfigurationObjectEditor
Create a new Host instance with the specified ID.

Specified by:
createHost in interface ConfigurationObjectEditor
Parameters:
hostName - for the new Host (may not be null).
Returns:
the Host instance

createHost

public Host createHost(ConfigurationID configurationID,
                       java.lang.String hostName)
Specified by:
createHost in interface ConfigurationObjectEditor

createHost

public Host createHost(Configuration configuration,
                       java.lang.String hostName)
Specified by:
createHost in interface ConfigurationObjectEditor

createHost

public Host createHost(Configuration configuration,
                       Host original,
                       java.lang.String newName)

createConfiguration

public Configuration createConfiguration(java.lang.String configurationName)
Description copied from interface: ConfigurationObjectEditor
Create a new Configuration instance with the specified name ID.

Specified by:
createConfiguration in interface ConfigurationObjectEditor
Parameters:
configurationName - for the new configuration (may not be null).
Returns:
the Configuration instance

createConfiguration

public Configuration createConfiguration(java.lang.String configurationName,
                                         java.util.Date creationDate,
                                         java.util.Date lastChangedDate)
Create a new Configuration instance with the specified name ID, and the specified Date parameters. This method is only useful for re-creating a serialized configuration; typically a client will want to use createConfiguration(String)

Specified by:
createConfiguration in interface ConfigurationObjectEditor
Parameters:
configurationName - for the new configuration (may not be null).
creationDate - Date the configuration was created.
creationDate - Date the configuration was last modified.
Returns:
the Configuration instance
Throws:
java.lang.IllegalArgumentException - if the configurationName is null

createConfiguration

public void createConfiguration(ConfigurationID configID,
                                java.util.Collection configObjects)
Description copied from interface: ConfigurationObjectEditor
This method is used only for importing a complete configurtion model. The objects should include all object types (e.g., Configuration, Host, ComponentDefn, DeployedComponent, ComponentTypes, PSCs, etc.);

Specified by:
createConfiguration in interface ConfigurationObjectEditor

createComponentType

public ComponentType createComponentType(int classTypeCode,
                                         java.lang.String name,
                                         ComponentTypeID parentID,
                                         ComponentTypeID superID,
                                         boolean deployable,
                                         boolean monitored)

Copy-create method - creates a deep-copy of the original configuration, with the new name. The new name cannot be the same as the original configuration's name.

All service component definitions, all deployed components, and all property values will also be copied. The copies will all retain their original short names; their full names will reflect the new configuration name.

Specified by:
createComponentType in interface ConfigurationObjectEditor
Parameters:
classTypeCode - identifies the type of class this component type should represent
name - is the name of the ComponentType
parentID - is the component type that is the parent, can be null
superID - is the component type that is a super type of this component type, can be null
deployable - is a boolean indicating if the type can be deployed in a configuration
monitored - is a boolean insdicating if the type is to be monitored
Returns:
ComponentType
See Also:
for type codes

createComponentType

public ComponentType createComponentType(ComponentType componentType,
                                         java.lang.String name)
Description copied from interface: ConfigurationObjectEditor
Create a new ComponentType instance from a copy of the specified ComponentType.

Specified by:
createComponentType in interface ConfigurationObjectEditor
Parameters:
componentType - is the original component type to copy from
name - is the name of the ComponentType
Returns:
ComponentType

createComponentDefn

public BasicComponentDefn createComponentDefn(int defnTypeCode,
                                              ConfigurationID configID,
                                              ComponentTypeID typeID,
                                              java.lang.String defnName)
This method is not provided in the interface, it is only used by the spi implementation for ease of creating the correct type of component defn.


createComponentTypeDefn

public ComponentTypeDefn createComponentTypeDefn(ComponentType type,
                                                 PropertyDefinition propertyDefinition,
                                                 boolean isEffectiveImmediately)
Description copied from interface: ConfigurationObjectEditor
Create a new ComponentTypeDefn and update the ComponentType with the new defintion.

Specified by:
createComponentTypeDefn in interface ConfigurationObjectEditor
Parameters:
type - is the ComponentType the definition will be added to
propertyDefinition - are the attributes describing this definition
isEffectiveImmediately - indicates that a change to a property value for this definition can have an immediate effect (as opposed to not taking effect until server reboots)
Returns:
the ComponentTypeDefn instance with the specified ID.

createComponentTypeDefn

public ComponentTypeDefn createComponentTypeDefn(ComponentType type,
                                                 PropertyDefinition propertyDefinition)
Deprecated. as of v 2.0 beta 1, use createComponentTypeDefn(ComponentType, PropertyDefinition, boolean)


createComponentTypeDefn

public ComponentTypeDefn createComponentTypeDefn(ComponentTypeID typeID,
                                                 PropertyDefinition propertyDefinition,
                                                 boolean isEffectiveImmediately)
Description copied from interface: ConfigurationObjectEditor
Create a new ComponentTypeDefn instance with the specified name. To create a basic PropertyDefinition, do the following: PropertyDefinition defn = new PropertyDefinition(); defn.setPropertyType(PropertyType.BOOLEAN);

Specified by:
createComponentTypeDefn in interface ConfigurationObjectEditor
Parameters:
typeID - for the parent component type this definitions is used by
propertyDefinition - are the attributes describing this definition
isEffectiveImmediately - indicates that a change to a property value for this definition can have an immediate effect (as opposed to not taking effect until server reboots)
Returns:
the ComponentTypeDefn instance with the specified ID.
See Also:
createComponentTypeDefn(ComponentType, PropertyDefinition, boolean)

createComponentTypeDefn

public ComponentTypeDefn createComponentTypeDefn(ComponentTypeID typeID,
                                                 PropertyDefinition propertyDefinition)
Deprecated. as of v 2.0 beta 1, use createComponentTypeDefn(ComponentTypeID, PropertyDefinition, boolean)


createPropDefnAllowedValue

public PropDefnAllowedValue createPropDefnAllowedValue(ComponentTypeDefn typeDefn,
                                                       PropertyDefinition propDefn,
                                                       java.lang.String value)
                                                throws InvalidComponentException
Description copied from interface: ConfigurationObjectEditor
Create a new PropDefnAllowedValue that will be added to the modifiable (cloned) PropertyDefinition that was obtained from the ComponentTypeDefn.

Specified by:
createPropDefnAllowedValue in interface ConfigurationObjectEditor
Parameters:
typeDefn - is the ComponentTypeDefn the allowed value will be added to
propDefn - is the PropertyDefinition that the new create PropDefnAllowedValue will be added to.
value - is the allowed value
Returns:
PropDefnAllowedValue
Throws:
InvalidComponentException - if the existing allowed values in the typeDefn are not of type PropDefnAllowedValue

createDeployedServiceComponent

public DeployedComponent createDeployedServiceComponent(java.lang.String name,
                                                        Configuration configuration,
                                                        HostID hostId,
                                                        VMComponentDefnID vmId,
                                                        ServiceComponentDefn serviceComponentDefn)

createDeployedServiceComponent

public DeployedComponent createDeployedServiceComponent(java.lang.String name,
                                                        ConfigurationID configurationID,
                                                        HostID hostId,
                                                        VMComponentDefnID vmId,
                                                        ServiceComponentDefnID serviceComponentDefnID,
                                                        ComponentTypeID serviceComponentTypeID)
Description copied from interface: ConfigurationObjectEditor
Create a new DeployedComponent instance respresenting a deployed Service. This method has the advantage of allowing the creation of a deployed component entirely with ID objects, without needing any of the full objects themselves. However, it is the responsibility of the client that the ComponentTypeID parameter and the ServiceComponentDefnID parameter both indicate the same service type. Also, the local Configuration object represented by the ConfigurationID will not be updated.

Specified by:
createDeployedServiceComponent in interface ConfigurationObjectEditor
Parameters:
name - is the name assigned to this instance
configurationID - the configuration the vm is deployed within.
hostId - the host the vm is deployed in.
vmId - the VM that the service is deployed in.
serviceComponentDefnID - is the service component definition to be deployed
serviceComponentTypeID - is type of the service to be deployed
Returns:
the DeployedComponent instance with the specified ID.
See Also:
createDeployedServiceComponent(String, Configuration, HostID, VMComponentDefn)

createDeployedVMComponentx

public DeployedComponent createDeployedVMComponentx(java.lang.String name,
                                                    Configuration configuration,
                                                    VMComponentDefn vmComponentDefn)

createDeployedVMComponentx

public DeployedComponent createDeployedVMComponentx(java.lang.String instanceName,
                                                    ConfigurationID configurationID,
                                                    HostID hostId,
                                                    VMComponentDefnID vmComponentDefnID,
                                                    ComponentTypeID componentTypeID)

createServiceComponentDefn

public ServiceComponentDefn createServiceComponentDefn(ConfigurationID configurationID,
                                                       ComponentTypeID typeID,
                                                       java.lang.String componentName)
Description copied from interface: ConfigurationObjectEditor
Create a new Service Component Definition instance with a specified configuration

Specified by:
createServiceComponentDefn in interface ConfigurationObjectEditor
typeID - is the type of component definition to create
componentName - is the name of the component
Returns:
the Component instance with the specified ID.
See Also:
ConfigurationObjectEditor.createServiceComponentDefn(Configuration, ComponentTypeID, String)

createServiceComponentDefn

public ServiceComponentDefn createServiceComponentDefn(ConfigurationID configurationID,
                                                       ComponentTypeID typeID,
                                                       java.lang.String componentName,
                                                       java.lang.String routingUUID)
Description copied from interface: ConfigurationObjectEditor
Create a new Service Component Definition instance with a specified configuration

Specified by:
createServiceComponentDefn in interface ConfigurationObjectEditor
typeID - is the type of component definition to create
componentName - is the name of the component
routingUUID - the globally unique routing UUID of the Service Component Defn
Returns:
the Component instance with the specified ID.
See Also:
ConfigurationObjectEditor.createServiceComponentDefn(Configuration, ComponentTypeID, String)

createServiceComponentDefn

public ServiceComponentDefn createServiceComponentDefn(Configuration configuration,
                                                       ComponentTypeID typeID,
                                                       java.lang.String componentName)
Creates a new ServiceComponentDefn for a given Configuration and ProductServiceConfig; also automatically "deploys" the service anywhere that this PSC is already deployed, by creating the necessary DeployedComponents (this will only work if the PSC parameter belongs to the Configuration parameter).

Specified by:
createServiceComponentDefn in interface ConfigurationObjectEditor
Parameters:
configuration - the Configuration containing the PSC; this will have the new ServiceComponentDefn added to it, plus any DeployedComponents created for the ServiceComponentDefn
typeID - type of the new ServiceComponentDefn
componentName - name for the new ServiceComponentDefn
pscID - ID of the ProductServiceConfig which this ServiceComponentDefn will belong to
Returns:
new ServiceComponentDefn

createServiceComponentDefn

public ServiceComponentDefn createServiceComponentDefn(Configuration configuration,
                                                       ComponentTypeID typeID,
                                                       java.lang.String componentName,
                                                       java.lang.String routingUUID)
Description copied from interface: ConfigurationObjectEditor
Create a new Service Component Definition instance with a specified configuration

Specified by:
createServiceComponentDefn in interface ConfigurationObjectEditor
Parameters:
configuration - that will contain the new created component definition
typeID - is the type of component definition to create
componentName - is the name of the component
routingUUID - the globally unique routing UUID of the Service Component Defn
Returns:
the Component instance with the specified ID.

createServiceComponentDefn

public ServiceComponentDefn createServiceComponentDefn(Configuration configuration,
                                                       ServiceComponentDefn originalServiceComponentDefn,
                                                       java.lang.String newName)
Creates a new ServiceComponentDefn in the indicated Configuration, copied from the indicated original ServiceComponentDefn, with the indicated new name.


createResourceDescriptor

public ResourceDescriptor createResourceDescriptor(ConfigurationID configurationID,
                                                   ComponentTypeID typeID,
                                                   java.lang.String descriptorName)
Description copied from interface: ConfigurationObjectEditor
Create a new ResourceDescriptor Component Definition instance with a specified configuration

Specified by:
createResourceDescriptor in interface ConfigurationObjectEditor
Parameters:
configurationID - that the new created component definition will be a part of
typeID - is the type of component definition to create
Returns:
the ResourceDescriptor instance with the specified ID.

createResourceDescriptor

public ResourceDescriptor createResourceDescriptor(Configuration configuration,
                                                   ComponentTypeID typeID,
                                                   java.lang.String descriptorName)
Description copied from interface: ConfigurationObjectEditor
Create a new ResourceDescriptor Component Definition instance with a specified configuration

Specified by:
createResourceDescriptor in interface ConfigurationObjectEditor
Parameters:
configuration - that will contain the new created component definition
typeID - is the type of component definition to create
Returns:
the ResourceDescriptor instance with the specified ID.

createResourceDescriptor

public ResourceDescriptor createResourceDescriptor(Configuration configuration,
                                                   ResourceDescriptor original,
                                                   java.lang.String newName)

createSharedResource

public SharedResource createSharedResource(ComponentTypeID typeID,
                                           java.lang.String resourceName)
Description copied from interface: ConfigurationObjectEditor
Create a new SharedResource instance

Specified by:
createSharedResource in interface ConfigurationObjectEditor
Parameters:
typeID - is the type of component definition to create
resourceName - is the name of the shared resource
Returns:
the ResourceDescriptor instance with the specified ID.

createVMComponentDefn

public VMComponentDefn createVMComponentDefn(ConfigurationID configurationID,
                                             HostID hostID,
                                             ComponentTypeID typeID,
                                             java.lang.String componentName)
Description copied from interface: ConfigurationObjectEditor
Create a new VM Component Definition instance with a specified configuration

Specified by:
createVMComponentDefn in interface ConfigurationObjectEditor
typeID - is the type of component definition to create
componentName - is the name of the component
Returns:
the Component instance with the specified ID.
See Also:
createVMComponentDefn(Configuration, ComponentTypeID, String)

createVMComponentDefn

public VMComponentDefn createVMComponentDefn(Configuration configuration,
                                             HostID hostID,
                                             ComponentTypeID typeID,
                                             java.lang.String componentName)
Description copied from interface: ConfigurationObjectEditor
Create a new VM Component Definition instance with a specified configuration

Specified by:
createVMComponentDefn in interface ConfigurationObjectEditor
Parameters:
configuration - that will contain the new created component definition
typeID - is the type of component definition to create
componentName - is the name of the component
Returns:
the Component instance with the specified ID.

createVMComponentDefn

public VMComponentDefn createVMComponentDefn(Configuration configuration,
                                             VMComponentDefn original,
                                             java.lang.String newName)

updateComponentType

public ComponentType updateComponentType(ComponentType origType,
                                         ComponentType replaceType)
This will update / replace the existing component type with the specified component type.

Parameters:
t - is the ComponentType to update / replace
Returns:
ComponentType that is modified
See Also:
createComponentTypeDefn(ComponentTypeID, PropertyDefinition, boolean)

setRoutingUUID

public void setRoutingUUID(ServiceComponentDefn serviceComponentDefn,
                           java.lang.String newRoutingUUID)
Sets this ServiceComponentDefn's String routing UUID. This method will modify the ServiceComponentDefn parameter, and also create the action to set the routing UUID at the remote server.

Specified by:
setRoutingUUID in interface ConfigurationObjectEditor
Parameters:
serviceComponentDefn - ServiceComponentDefn to have it's routing UUID modified - this instance will be locally modified, and an action will also be created for execution as a transaction later on
newRoutingUUID - new String routing UUID for the indicated ServiceComponentDefn

setEnabled

public DeployedComponent setEnabled(DeployedComponent deployedcomponent,
                                    boolean enabled)
Description copied from interface: ConfigurationObjectEditor
It updates the DeployedComponent by setting its enabled flag.

Specified by:
setEnabled in interface ConfigurationObjectEditor

setLogConfiguration

public Configuration setLogConfiguration(Configuration t,
                                         LogConfiguration logConfiguration)
Sets the LogConfiguration in effect for the Configuration

Specified by:
setLogConfiguration in interface ConfigurationObjectEditor

addProperty

public ComponentObject addProperty(ComponentObject t,
                                   java.lang.String name,
                                   java.lang.String value)
Description copied from interface: ConfigurationObjectEditor
Adds the property value for the specified name on the ComponentObject. This method assumes the named property does not exist.

Specified by:
addProperty in interface ConfigurationObjectEditor
Parameters:
t - is the ComponentObject to set the value on
name - is the name of the property
value - is the value for the property
Returns:
updated ComponentObject

setProperty

public ComponentObject setProperty(ComponentObject t,
                                   java.lang.String name,
                                   java.lang.String value)
Description copied from interface: ConfigurationObjectEditor
Set the property value for the specified name on the ComponentObject. This method will replace the current property by the same name.

Specified by:
setProperty in interface ConfigurationObjectEditor
Parameters:
t - is the ComponentObject to set the value on
name - is the name of the property
value - is the value for the property
Returns:
updated ComponentObject

removeProperty

public ComponentObject removeProperty(ComponentObject t,
                                      java.lang.String name)
Description copied from interface: ConfigurationObjectEditor
Removes the property value for the specified name on the ComponentObject.

Specified by:
removeProperty in interface ConfigurationObjectEditor
Parameters:
t - is the ComponentObject to set the value on
name - is the name of the property
Returns:
updated ComponentObject

modifyComponentTypeDefn

public ComponentTypeDefn modifyComponentTypeDefn(ComponentTypeDefn original,
                                                 ComponentTypeDefn updated)
Description copied from interface: ConfigurationObjectEditor
Updates the target ComponentTypeDefn with the updated PropertyDefinition.

Specified by:
modifyComponentTypeDefn in interface ConfigurationObjectEditor
Parameters:
original - is the original ComponentTypeDefn to be updated.
updated - is the updated ComponentTypeDefn to replace the original.
Returns:
an updated ComponentTypeDefn

modifyProperties

public ComponentObject modifyProperties(ComponentObject t,
                                        java.util.Properties props,
                                        int command)
Description copied from interface: ConfigurationObjectEditor
call modifyProperties

Specified by:
modifyProperties in interface ConfigurationObjectEditor
Parameters:
t - is the ComponentObject to set the value on
props - are the properties that will be used based on the command
command - the object editor command (ADD, REMOVE, or SET) that defines the operation to be performed.
Returns:
updated ComponentObject

setIsReleased

public Configuration setIsReleased(Configuration t,
                                   boolean newValue)
Specified by:
setIsReleased in interface ConfigurationObjectEditor

setIsDeployed

public Configuration setIsDeployed(Configuration t,
                                   boolean newValue)
Specified by:
setIsDeployed in interface ConfigurationObjectEditor

setIsDeployable

public ComponentType setIsDeployable(ComponentType t,
                                     boolean newValue)
Specified by:
setIsDeployable in interface ConfigurationObjectEditor

setIsDeprecated

public ComponentType setIsDeprecated(ComponentType t,
                                     boolean newValue)
Specified by:
setIsDeprecated in interface ConfigurationObjectEditor

setIsMonitored

public ComponentType setIsMonitored(ComponentType t,
                                    boolean newValue)
Specified by:
setIsMonitored in interface ConfigurationObjectEditor

setComponentType

public ComponentObject setComponentType(ComponentObject t,
                                        ComponentTypeID componentType)
Description copied from interface: ConfigurationObjectEditor
Sets the component type on the specifice component object.

Specified by:
setComponentType in interface ConfigurationObjectEditor
Parameters:
t - is the ComponentObject to have its type set
componentType - is the ComponentType to set
Returns:
ComponentObject that had its type set

setParentComponentTypeID

public ComponentType setParentComponentTypeID(ComponentType t,
                                              ComponentTypeID parentID)
Description copied from interface: ConfigurationObjectEditor
Sets the parent component type, null is allowed;

Specified by:
setParentComponentTypeID in interface ConfigurationObjectEditor
Parameters:
t - is the ComponentType
parentID - is the parent component type (null allowed)
Returns:
ComponentType updated

setSuperComponentTypeID

public ComponentType setSuperComponentTypeID(ComponentType t,
                                             ComponentTypeID superID)
Description copied from interface: ConfigurationObjectEditor
Sets the super component type, null is allowed;

Specified by:
setSuperComponentTypeID in interface ConfigurationObjectEditor
Parameters:
t - is the ComponentType
superID - is the super component type (null allowed)
Returns:
ComponentType updated

setLastChangedHistory

public ComponentType setLastChangedHistory(ComponentType type,
                                           java.lang.String lastChangedBy,
                                           java.lang.String lastChangedDate)
Specified by:
setLastChangedHistory in interface ConfigurationObjectEditor

setCreationChangedHistory

public ComponentType setCreationChangedHistory(ComponentType type,
                                               java.lang.String createdBy,
                                               java.lang.String creationDate)
Specified by:
setCreationChangedHistory in interface ConfigurationObjectEditor

setLastChangedHistory

public ComponentObject setLastChangedHistory(ComponentObject defn,
                                             java.lang.String lastChangedBy,
                                             java.lang.String lastChangedDate)
Specified by:
setLastChangedHistory in interface ConfigurationObjectEditor

setCreationChangedHistory

public ComponentObject setCreationChangedHistory(ComponentObject defn,
                                                 java.lang.String createdBy,
                                                 java.lang.String creationDate)
Specified by:
setCreationChangedHistory in interface ConfigurationObjectEditor

delete

public void delete(Host target)
            throws ConfigurationException
Description copied from interface: ConfigurationObjectEditor
Call to delete a host

Specified by:
delete in interface ConfigurationObjectEditor
Parameters:
target - Host to delete
Throws:
ConfigurationException - if unable to delete the host

delete

public void delete(ComponentTypeDefn target,
                   ComponentType type)
            throws ConfigurationException
Description copied from interface: ConfigurationObjectEditor
Call to delete a ComponentTypeDefn and remove it from the ComponentType. The type will changed by having the target ComponentTypeDefn removed.

Specified by:
delete in interface ConfigurationObjectEditor
Parameters:
target - is the ComponentTypeDefn to delete
type - is the ComponentType that it should be removed from.
Throws:
ConfigurationException - if unable to delete the configuration

delete

public void delete(PropDefnAllowedValue target)
            throws ConfigurationException
Throws:
ConfigurationException

delete

public void delete(ComponentType target)
            throws ConfigurationException
Description copied from interface: ConfigurationObjectEditor
Call to delete a component type and all its definitions.

Specified by:
delete in interface ConfigurationObjectEditor
Parameters:
target - ComponentType and all its ComponentTypeDefns to delete
Throws:
ConfigurationException - if unable to delete the ComponentType

delete

public void delete(ConfigurationID targetID)
            throws ConfigurationException
Description copied from interface: ConfigurationObjectEditor
Call to delete a configuration and all its dependencies.

Specified by:
delete in interface ConfigurationObjectEditor
Parameters:
targetID - ConfigurationID to delete
Throws:
ConfigurationException - if unable to delete the configuration

delete

public void delete(Configuration target)
            throws ConfigurationException
Description copied from interface: ConfigurationObjectEditor
Call to delete a configuration, which is assumed to have no dependencies.

Specified by:
delete in interface ConfigurationObjectEditor
Parameters:
target - Configuration to delete
Throws:
ConfigurationException - if unable to delete the configuration
See Also:
to delete a configuration and all its dependencies.

delete

public void delete(Configuration target,
                   boolean deleteDependencies)
            throws ConfigurationException
Description copied from interface: ConfigurationObjectEditor
Deletes the configuration if there exist no dependent objects. To delete the configuration and all its dependencies, pass the boolean argument of true.

Specified by:
delete in interface ConfigurationObjectEditor
Parameters:
target - configuration to be deleted.
Throws:
ConfigurationException - if unable to delete the configuration

delete

public SharedResource delete(SharedResource target)
                      throws ConfigurationException
Description copied from interface: ConfigurationObjectEditor
Deletes the shared resource.

Specified by:
delete in interface ConfigurationObjectEditor
Parameters:
target - configuration to be deleted.
Throws:
ConfigurationException - if unable to delete the configuration

delete

public Configuration delete(ComponentObject target,
                            Configuration configuration)
                     throws ConfigurationException
Description copied from interface: ConfigurationObjectEditor
Removes the component object from the specified configuration if no dependent objects exist and returns an updated configuration.

Specified by:
delete in interface ConfigurationObjectEditor
Parameters:
target - component object to be removed
configuration - that the object is to be removed from
Returns:
Configuration with the target object removed
Throws:
ConfigurationException - if unable to delete the configuration

delete

public Configuration delete(ComponentObject target,
                            Configuration configuration,
                            boolean deleteDependencies)
                     throws ConfigurationException
Description copied from interface: ConfigurationObjectEditor
Removes the component object from the specified configuration if no dependent objects exist. If deleteDependencies is true, then the component object and all dependencies will be deleted.

Specified by:
delete in interface ConfigurationObjectEditor
Parameters:
target - component object to be removed.
configuration - that the object is to be removed from
Returns:
Configuration with the target object removed
Throws:
ConfigurationException - if unable to delete the configuration

renameVM

public VMComponentDefn renameVM(VMComponentDefn vm,
                                java.lang.String name)
                         throws ConfigurationException
Change the name of a previously defined VM in the Next Startup config.

Specified by:
renameVM in interface ConfigurationObjectEditor
Parameters:
vm - The VM whose name to change.
name - The new name.
Returns:
The VM with its name changed.
Throws:
ConfigurationException

isDeployed

public boolean isDeployed(ServiceComponentDefnID defnID,
                          Configuration config)

setComponentTypeDefinitions

public ComponentType setComponentTypeDefinitions(ComponentType t,
                                                 java.util.Collection defns)
Set the list of ComponentTypeDefns for a local ComponentType object. This method will not generate actions because the definitions should have been created using the createComponentTypeDefn method, which would set the ComponentType properly on the remote system; it is intended only to modify a local copy of a ComponentType object.

Specified by:
setComponentTypeDefinitions in interface ConfigurationObjectEditor
Parameters:
t - is the ComponentType to set on
defns - Collection of new definitions
Returns:
ComponentType that is modified
See Also:
createComponentTypeDefn(ComponentTypeID, PropertyDefinition, boolean)

setPropertyDefinition

public ComponentTypeDefn setPropertyDefinition(ComponentTypeDefn t,
                                               PropertyDefinition defn)
Description copied from interface: ConfigurationObjectEditor
Set the PropertyDefinition on the ComponentTypeDefn

Specified by:
setPropertyDefinition in interface ConfigurationObjectEditor
Parameters:
t - is the component type definition to update with the defintion
defn - is the property defn that will be applied.
Returns:
updated ComponentTypeDefn

setConfigurationComponentDefns

public Configuration setConfigurationComponentDefns(Configuration t,
                                                    java.util.Collection componentDefns)

setConfigurationDeployedComponents

public Configuration setConfigurationDeployedComponents(Configuration t,
                                                        java.util.Collection deployedComponents)

setConfigurationHostComponents

public Configuration setConfigurationHostComponents(Configuration t,
                                                    java.util.Collection hostComponents)

getEditableProperties

public java.util.Properties getEditableProperties(ComponentObject t)
Description copied from interface: ConfigurationObjectEditor
Returns a modifiable properties object for the specified ComponentObject. If calling directly on the component object to obtain the properties, an unmodifiable properties objects will be returned.

Specified by:
getEditableProperties in interface ConfigurationObjectEditor
Parameters:
t - is the component object to obtain the properties from
Returns:
modifiable Properties

assignConfigurationID

public java.lang.Object assignConfigurationID(java.lang.Object t,
                                              ConfigurationID configurationID)
This method is used by the ConfigurationServiceImpl to enable the console to import actions and assign them to the current configuration.


createConnectorComponent

public ConnectorBinding createConnectorComponent(ConfigurationID configurationID,
                                                 ComponentTypeID typeID,
                                                 java.lang.String descriptorName,
                                                 java.lang.String routingUUID)
Description copied from interface: ConfigurationObjectEditor
This method will create a connector component based on the specific component type ID

Specified by:
createConnectorComponent in interface ConfigurationObjectEditor
typeID - is the component type of the definition
Returns:
ServiceComponentDefn

createConnectorComponent

public ConnectorBinding createConnectorComponent(ConfigurationID configurationID,
                                                 ConnectorBinding original,
                                                 java.lang.String newName,
                                                 java.lang.String routingUUID)
Description copied from interface: ConfigurationObjectEditor
This method will create a connector component from the original connector and give a new name.

Specified by:
createConnectorComponent in interface ConfigurationObjectEditor
Parameters:
configurationID - Identifies which configuration this belongs to
original - is the connector to copy the new connector from
newName - is the name to be given to the new connector
routingUUID - is the routingUUID to use in the copied connector
Returns:
ConnectorBinding

createConnectorComponent

public ConnectorBinding createConnectorComponent(Configuration configuration,
                                                 ConnectorBinding originalConnector,
                                                 java.lang.String newName)

addAuthenticationProvider

public void addAuthenticationProvider(Configuration configuration,
                                      AuthenticationProvider provider)
Description copied from interface: ConfigurationObjectEditor
Creates a new ConnectorBinding for a given Configuration and ProductServiceConfig; also automatically "deploys" the service anywhere that this PSC is already deployed, by creating the necessary DeployedComponents (this will only work if the PSC parameter belongs to the Configuration parameter).

Specified by:
addAuthenticationProvider in interface ConfigurationObjectEditor
Parameters:
configuration - the Configuration containing the PSC; this will have the new ServiceComponentDefn added to it, plus any DeployedComponents created for the ServiceComponentDefn

createAuthenticationProviderComponent

public AuthenticationProvider createAuthenticationProviderComponent(Configuration configuration,
                                                                    AuthenticationProvider originalProvider,
                                                                    java.lang.String newName)
Description copied from interface: ConfigurationObjectEditor
This method will create a provider component from the original provider and give a new name.

Specified by:
createAuthenticationProviderComponent in interface ConfigurationObjectEditor
originalProvider - is the connector to copy the new provider from
newName - is the name to be given to the new provider
Returns:
AuthenticationProvider

createAuthenticationProviderComponent

public AuthenticationProvider createAuthenticationProviderComponent(ConfigurationID configurationID,
                                                                    ComponentTypeID typeID,
                                                                    java.lang.String descriptorName)
Description copied from interface: ConfigurationObjectEditor
This method will create a provider component based on the specific component type ID

Specified by:
createAuthenticationProviderComponent in interface ConfigurationObjectEditor
typeID - is the component type of the definition
Returns:
ServiceComponentDefn

createAuthenticationProviderComponent

public AuthenticationProvider createAuthenticationProviderComponent(ConfigurationID configurationID,
                                                                    AuthenticationProvider original,
                                                                    java.lang.String newName)
Description copied from interface: ConfigurationObjectEditor
This method will create a provider component from the original provider and give a new name.

Specified by:
createAuthenticationProviderComponent in interface ConfigurationObjectEditor
Parameters:
configurationID - Identifies which configuration this belongs to
original - is the connector to copy the new provider from
newName - is the name to be given to the new provider
Returns:
AuthenticationProvider

deployServiceDefn

public DeployedComponent deployServiceDefn(Configuration configuration,
                                           ServiceComponentDefn serviceComponentDefn,
                                           VMComponentDefnID vmID)
Deploys a ServiceComponentDefn to the specified VM This method is harmless to call if the ServiceComponentDefn is already deployed anywhere.

Specified by:
deployServiceDefn in interface ConfigurationObjectEditor
Parameters:
configuration - must be the Configuration containing both the ServiceComponentDefn and PSC ID parameters (but this is not checked for in this method)
serviceComponentDefn - to be deployed
VMID - VM ID indicates the process to deploy the service to
Returns:
DeployedComponent of newly-created DeployedComponent object


Copyright © 2009. All Rights Reserved.