org.rhq.modules.plugins.jbossas7
Class ConfigurationWriteDelegate

java.lang.Object
  extended by org.rhq.modules.plugins.jbossas7.ConfigurationWriteDelegate
All Implemented Interfaces:
ConfigurationFacet
Direct Known Subclasses:
CreateResourceDelegate

public class ConfigurationWriteDelegate
extends Object
implements ConfigurationFacet


Field Summary
protected  Address address
           
protected  org.rhq.core.domain.configuration.definition.ConfigurationDefinition configurationDefinition
           
protected  ASConnection connection
           
protected  boolean createChildRequested
           
static String LOGICAL_REMOVED
          A map where this error message has been set must not be written to the AS
 
Constructor Summary
ConfigurationWriteDelegate(org.rhq.core.domain.configuration.definition.ConfigurationDefinition configDef, ASConnection connection, Address address)
          Create a new configuration delegate, that reads the attributes for the resource at address.
 
Method Summary
 org.rhq.core.domain.configuration.Configuration loadResourceConfiguration()
          Trigger loading of a configuration by talking to the remote resource.
protected  Map<String,Object> prepareCollapsedPropertyMap(org.rhq.core.domain.configuration.PropertyMap property, org.rhq.core.domain.configuration.definition.PropertyDefinitionMap propertyDefinition)
          Collapsed map property parsing.
protected  AbstractMap.SimpleEntry<String,List<Object>> preparePropertyList(org.rhq.core.domain.configuration.PropertyList property, org.rhq.core.domain.configuration.definition.PropertyDefinitionList propertyDefinition)
          List property parsing.
protected  AbstractMap.SimpleEntry<String,Map<String,Object>> preparePropertyMap(org.rhq.core.domain.configuration.PropertyMap property, org.rhq.core.domain.configuration.definition.PropertyDefinitionMap propertyDefinition)
          Map property parsing.
protected  AbstractMap.SimpleEntry<String,Object> preparePropertySimple(org.rhq.core.domain.configuration.PropertySimple property, org.rhq.core.domain.configuration.definition.PropertyDefinitionSimple propertyDefinition)
          Simple property parsing.
protected  Map<String,Object> prepareSimplePropertyMap(org.rhq.core.domain.configuration.PropertyMap property, org.rhq.core.domain.configuration.definition.PropertyDefinitionMap propertyDefinition)
          Simple map property parsing.
protected  CompositeOperation updateGenerateOperationFromProperties(org.rhq.core.domain.configuration.Configuration conf, Address address)
           
 void updateResourceConfiguration(ConfigurationUpdateReport report)
          Write the configuration back to the AS.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOGICAL_REMOVED

public static final String LOGICAL_REMOVED
A map where this error message has been set must not be written to the AS

See Also:
updateHandlePropertyMapSpecial(org.rhq.modules.plugins.jbossas7.json.CompositeOperation, org.rhq.core.domain.configuration.PropertyMap, org.rhq.core.domain.configuration.definition.PropertyDefinitionMap, org.rhq.modules.plugins.jbossas7.json.Address, java.util.List), Constant Field Values

address

protected Address address

connection

protected ASConnection connection

configurationDefinition

protected org.rhq.core.domain.configuration.definition.ConfigurationDefinition configurationDefinition

createChildRequested

protected boolean createChildRequested
Constructor Detail

ConfigurationWriteDelegate

public ConfigurationWriteDelegate(org.rhq.core.domain.configuration.definition.ConfigurationDefinition configDef,
                                  ASConnection connection,
                                  Address address)
Create a new configuration delegate, that reads the attributes for the resource at address.

Parameters:
configDef - Configuration definition for the configuration
connection - asConnection to use
address - address of the resource.
Method Detail

loadResourceConfiguration

public org.rhq.core.domain.configuration.Configuration loadResourceConfiguration()
                                                                          throws Exception
Trigger loading of a configuration by talking to the remote resource.

Specified by:
loadResourceConfiguration in interface ConfigurationFacet
Returns:
The initialized configuration
Throws:
Exception - If anything goes wrong.

updateResourceConfiguration

public void updateResourceConfiguration(ConfigurationUpdateReport report)
Write the configuration back to the AS. Care must be taken, not to send properties that are read-only, as AS will choke on them.

Specified by:
updateResourceConfiguration in interface ConfigurationFacet
Parameters:
report - Report containing the new configuration

updateGenerateOperationFromProperties

protected CompositeOperation updateGenerateOperationFromProperties(org.rhq.core.domain.configuration.Configuration conf,
                                                                   Address address)

preparePropertySimple

protected AbstractMap.SimpleEntry<String,Object> preparePropertySimple(org.rhq.core.domain.configuration.PropertySimple property,
                                                                       org.rhq.core.domain.configuration.definition.PropertyDefinitionSimple propertyDefinition)
Simple property parsing.

Parameters:
property - raw simple property
propertyDefinition - property definition
Returns:
parsed simple property

preparePropertyList

protected AbstractMap.SimpleEntry<String,List<Object>> preparePropertyList(org.rhq.core.domain.configuration.PropertyList property,
                                                                           org.rhq.core.domain.configuration.definition.PropertyDefinitionList propertyDefinition)
List property parsing.

Parameters:
property - raw list property
propertyDefinition - property definition
Returns:
parsed list

preparePropertyMap

protected AbstractMap.SimpleEntry<String,Map<String,Object>> preparePropertyMap(org.rhq.core.domain.configuration.PropertyMap property,
                                                                                org.rhq.core.domain.configuration.definition.PropertyDefinitionMap propertyDefinition)
Map property parsing.

Parameters:
property - raw map property
propertyDefinition - property definition
Returns:
parsed map

prepareCollapsedPropertyMap

protected Map<String,Object> prepareCollapsedPropertyMap(org.rhq.core.domain.configuration.PropertyMap property,
                                                         org.rhq.core.domain.configuration.definition.PropertyDefinitionMap propertyDefinition)
Collapsed map property parsing.

Parameters:
property - raw map property
propertyDefinition - property definition
Returns:
parsed map

prepareSimplePropertyMap

protected Map<String,Object> prepareSimplePropertyMap(org.rhq.core.domain.configuration.PropertyMap property,
                                                      org.rhq.core.domain.configuration.definition.PropertyDefinitionMap propertyDefinition)
Simple map property parsing.

Parameters:
property - raw map property
propertyDefinition - property definition
Returns:
parsed map


Copyright © 2008-2012 Red Hat, Inc.. All Rights Reserved.