org.rhq.enterprise.server.configuration
Interface ConfigurationManagerRemote

All Known Subinterfaces:
WebservicesRemote

public interface ConfigurationManagerRemote

The configuration manager which allows you to request resource configuration changes, view current resource configuration and previous update history and view/edit plugin configuration.


Method Summary
 GroupPluginConfigurationUpdate getGroupPluginConfigurationUpdate(Subject subject, int configurationUpdateId)
           
 GroupResourceConfigurationUpdate getGroupResourceConfigurationUpdate(Subject subject, int configurationUpdateId)
           
 PluginConfigurationUpdate getLatestPluginConfigurationUpdate(Subject subject, int resourceId)
           
 ResourceConfigurationUpdate getLatestResourceConfigurationUpdate(Subject subject, int resourceId)
           
 Configuration getLiveResourceConfiguration(Subject subject, int resourceId, boolean pingAgentFirst)
          Get the currently live resource configuration for the Resource with the given id.
 ConfigurationDefinition getPackageTypeConfigurationDefinition(Subject subject, int packageTypeId)
          Return the deploy configuration definition for the PackageType with the specified id.
 Configuration getPluginConfiguration(Subject subject, int resourceId)
          Get the current plugin configuration for the Resource with the given id, or null if the resource's plugin configuration is not yet initialized.
 ConfigurationDefinition getPluginConfigurationDefinitionForResourceType(Subject subject, int resourceTypeId)
          Return the plugin configuration definition for the ResourceType with the specified id.
 Configuration getResourceConfiguration(Subject subject, int resourceId)
          Get the current Resource configuration.
 ConfigurationDefinition getResourceConfigurationDefinitionForResourceType(Subject subject, int resourceTypeId)
          Return the resource configuration definition for the ResourceType with the specified id.
 ConfigurationDefinition getResourceConfigurationDefinitionWithTemplatesForResourceType(Subject subject, int resourceTypeId)
          Return the resource configuration definition for the ResourceType with the specified id.
 boolean isGroupResourceConfigurationUpdateInProgress(Subject subject, int resourceGroupId)
           
 boolean isResourceConfigurationUpdateInProgress(Subject subject, int resourceId)
          Get whether the the specified resource is in the process of updating its configuration.
 int scheduleGroupResourceConfigurationUpdate(Subject subject, int compatibleGroupId, Map<Integer,Configuration> newResourceConfigurationMap)
           
 Configuration translateResourceConfiguration(Subject subject, int resourceId, Configuration configuration, boolean fromStructured)
           
 PluginConfigurationUpdate updatePluginConfiguration(Subject subject, int resourceId, Configuration newConfiguration)
          Updates the plugin configuration used to connect and communicate with the resource.
 ResourceConfigurationUpdate updateResourceConfiguration(Subject subject, int resourceId, Configuration newConfiguration)
          This method is called when a user has requested to change the resource configuration for an existing resource.
 

Method Detail

getGroupPluginConfigurationUpdate

GroupPluginConfigurationUpdate getGroupPluginConfigurationUpdate(Subject subject,
                                                                 int configurationUpdateId)

getGroupResourceConfigurationUpdate

GroupResourceConfigurationUpdate getGroupResourceConfigurationUpdate(Subject subject,
                                                                     int configurationUpdateId)

getPluginConfiguration

@Nullable
Configuration getPluginConfiguration(Subject subject,
                                              int resourceId)
Get the current plugin configuration for the Resource with the given id, or null if the resource's plugin configuration is not yet initialized.

Parameters:
user - The logged in user's subject.
resourceId - Resource Id
Returns:
the current plugin configuration for the Resource with the given id, or null if the resource's configuration is not yet initialized
Throws:
FetchException

getResourceConfiguration

Configuration getResourceConfiguration(Subject subject,
                                       int resourceId)
Get the current Resource configuration.

Parameters:
subject - The logged in user's subject.
resourceId - A resource id.
Returns:
The specified configuration.
Throws:
FetchException - In case where there was a problem fetching the resource configuration

getLatestPluginConfigurationUpdate

PluginConfigurationUpdate getLatestPluginConfigurationUpdate(Subject subject,
                                                             int resourceId)

getLatestResourceConfigurationUpdate

ResourceConfigurationUpdate getLatestResourceConfigurationUpdate(Subject subject,
                                                                 int resourceId)

isResourceConfigurationUpdateInProgress

boolean isResourceConfigurationUpdateInProgress(Subject subject,
                                                int resourceId)
Get whether the the specified resource is in the process of updating its configuration.

Parameters:
subject - The logged in user's subject.
resourceId - A resource id.
Returns:
True if in progress, else False.
Throws:
FetchException

isGroupResourceConfigurationUpdateInProgress

boolean isGroupResourceConfigurationUpdateInProgress(Subject subject,
                                                     int resourceGroupId)

scheduleGroupResourceConfigurationUpdate

int scheduleGroupResourceConfigurationUpdate(Subject subject,
                                             int compatibleGroupId,
                                             Map<Integer,Configuration> newResourceConfigurationMap)

updatePluginConfiguration

PluginConfigurationUpdate updatePluginConfiguration(Subject subject,
                                                    int resourceId,
                                                    Configuration newConfiguration)
                                                    throws org.rhq.enterprise.server.resource.ResourceNotFoundException
Updates the plugin configuration used to connect and communicate with the resource. The given newConfiguration is usually a modified version of a configuration returned by getPluginConfiguration(Subject, int).

Parameters:
subject - The logged in user's subject.
resourceId - a Resource id
newConfiguration - the new plugin configuration
Returns:
the plugin configuration update item corresponding to this request
Throws:
org.rhq.enterprise.server.resource.ResourceNotFoundException

updateResourceConfiguration

ResourceConfigurationUpdate updateResourceConfiguration(Subject subject,
                                                        int resourceId,
                                                        Configuration newConfiguration)
                                                        throws org.rhq.enterprise.server.resource.ResourceNotFoundException,
                                                               org.rhq.enterprise.server.configuration.ConfigurationUpdateStillInProgressException
This method is called when a user has requested to change the resource configuration for an existing resource. If the user does not have the proper permissions to change the resource's configuration, an exception is thrown.

This will not wait for the agent to finish the configuration update. This will return after the request is sent. Once the agent finishes with the request, it will send the completed request information to #completedResourceConfigurationUpdate(AbstractResourceConfigurationUpdate).

Parameters:
subject - The logged in user's subject.
resourceId - identifies the resource to be updated
newConfiguration - the resource's desired new configuration
Returns:
the resource configuration update item corresponding to this request
Throws:
org.rhq.enterprise.server.resource.ResourceNotFoundException
org.rhq.enterprise.server.configuration.ConfigurationUpdateStillInProgressException

getLiveResourceConfiguration

Configuration getLiveResourceConfiguration(Subject subject,
                                           int resourceId,
                                           boolean pingAgentFirst)
                                           throws Exception
Get the currently live resource configuration for the Resource with the given id. This actually asks for the up-to-date configuration directly from the agent. An exception will be thrown if communications with the agent cannot be made.

Parameters:
subject - The logged in user's subject.
resourceId - resourceId
pingAgentFirst -
Returns:
the live configuration
Throws:
Exception - if failed to get the configuration from the agent

getResourceConfigurationDefinitionForResourceType

ConfigurationDefinition getResourceConfigurationDefinitionForResourceType(Subject subject,
                                                                          int resourceTypeId)
Return the resource configuration definition for the ResourceType with the specified id.

Parameters:
subject - the user who is requesting the resource configuration definition
resourceTypeId - identifies the resource type whose resource configuration definition is being requested
Returns:
the resource configuration definition for the ResourceType with the specified id, or null if the ResourceType does not define a resource configuration

getResourceConfigurationDefinitionWithTemplatesForResourceType

ConfigurationDefinition getResourceConfigurationDefinitionWithTemplatesForResourceType(Subject subject,
                                                                                       int resourceTypeId)
Return the resource configuration definition for the ResourceType with the specified id. The templates will be loaded in the definition returned from this call.

Parameters:
subject - the user who is requesting the resource configuration definition
resourceTypeId - identifies the resource type whose resource configuration definition is being requested
Returns:
the resource configuration definition for the ResourceType with the specified id, or null if the ResourceType does not define a resource configuration

getPluginConfigurationDefinitionForResourceType

ConfigurationDefinition getPluginConfigurationDefinitionForResourceType(Subject subject,
                                                                        int resourceTypeId)
Return the plugin configuration definition for the ResourceType with the specified id.

Parameters:
subject - the user who is requesting the plugin configuration definition
resourceTypeId - identifies the resource type whose plugin configuration definition is being requested
Returns:
the plugin configuration definition for the ResourceType with the specified id, or null if the ResourceType does not define a plugin configuration

getPackageTypeConfigurationDefinition

ConfigurationDefinition getPackageTypeConfigurationDefinition(Subject subject,
                                                              int packageTypeId)
Return the deploy configuration definition for the PackageType with the specified id.

Parameters:
subject - the user who is requesting the plugin configuration definition
packageTypeId - identifies the package type whose configuration definition is being requested
Returns:
the the deploy configuration definition for the PackageType with the specified id.

translateResourceConfiguration

Configuration translateResourceConfiguration(Subject subject,
                                             int resourceId,
                                             Configuration configuration,
                                             boolean fromStructured)
                                             throws org.rhq.enterprise.server.resource.ResourceNotFoundException
Throws:
org.rhq.enterprise.server.resource.ResourceNotFoundException


Copyright © 2005-2011 Red Hat, Inc.. All Rights Reserved.