org.rhq.rhqtransform.impl
Class ConfigurationToAugeasSimple

java.lang.Object
  extended by org.rhq.rhqtransform.impl.ConfigurationToAugeasSimple
All Implemented Interfaces:
ConfigurationToAugeas

public class ConfigurationToAugeasSimple
extends Object
implements ConfigurationToAugeas

Basic implementation of updating the Augeas with data from RHQ configuration. The mapping is based on the RHQ property names.

Author:
Filip Drabek

Field Summary
protected  AugeasTree tree
           
 
Constructor Summary
ConfigurationToAugeasSimple()
           
 
Method Summary
 void setTree(AugeasTree tree)
          Sets the tree the mapping should work with.
 void updateList(org.rhq.core.domain.configuration.definition.PropertyDefinitionList propDef, org.rhq.core.domain.configuration.Property prop, AugeasNode listNode, int seq)
          TODO this should be removed from the interface and made protected abstract in ConfigurationToAugeasSimple
 void updateMap(org.rhq.core.domain.configuration.definition.PropertyDefinitionMap propDefMap, org.rhq.core.domain.configuration.Property prop, AugeasNode mapNode, int seq)
          TODO this should be removed from the interface and made protected abstract in ConfigurationToAugeasSimple
 void updateProperty(org.rhq.core.domain.configuration.definition.PropertyDefinition propDef, org.rhq.core.domain.configuration.Property parentProp, AugeasNode parentNode, int seq)
          Performs updates in the tree based on the values in the single property (and its descendants).
 void updateResourceConfiguration(AugeasNode node, org.rhq.core.domain.configuration.definition.ConfigurationDefinition resourceConfigDef, org.rhq.core.domain.configuration.Configuration resourceConfig)
          Updates the augeas tree with the data from the RHQ configuration
 void updateSimple(AugeasNode parentNode, org.rhq.core.domain.configuration.definition.PropertyDefinitionSimple propDef, org.rhq.core.domain.configuration.Property prop, int seq)
          TODO this should be removed from the interface and made protected abstract in ConfigurationToAugeasSimple
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tree

protected AugeasTree tree
Constructor Detail

ConfigurationToAugeasSimple

public ConfigurationToAugeasSimple()
Method Detail

setTree

public void setTree(AugeasTree tree)
Description copied from interface: ConfigurationToAugeas
Sets the tree the mapping should work with.

Specified by:
setTree in interface ConfigurationToAugeas

updateResourceConfiguration

public void updateResourceConfiguration(AugeasNode node,
                                        org.rhq.core.domain.configuration.definition.ConfigurationDefinition resourceConfigDef,
                                        org.rhq.core.domain.configuration.Configuration resourceConfig)
                                 throws AugeasRhqException
Description copied from interface: ConfigurationToAugeas
Updates the augeas tree with the data from the RHQ configuration

Specified by:
updateResourceConfiguration in interface ConfigurationToAugeas
Parameters:
node - the node to start updating the data from
resourceConfigDef - configuration definition of the configuration object
resourceConfig - the configuration object to read the data from
Throws:
AugeasRhqException

updateMap

public void updateMap(org.rhq.core.domain.configuration.definition.PropertyDefinitionMap propDefMap,
                      org.rhq.core.domain.configuration.Property prop,
                      AugeasNode mapNode,
                      int seq)
               throws AugeasRhqException
Description copied from interface: ConfigurationToAugeas
TODO this should be removed from the interface and made protected abstract in ConfigurationToAugeasSimple

Specified by:
updateMap in interface ConfigurationToAugeas
Throws:
AugeasRhqException

updateList

public void updateList(org.rhq.core.domain.configuration.definition.PropertyDefinitionList propDef,
                       org.rhq.core.domain.configuration.Property prop,
                       AugeasNode listNode,
                       int seq)
                throws AugeasRhqException
Description copied from interface: ConfigurationToAugeas
TODO this should be removed from the interface and made protected abstract in ConfigurationToAugeasSimple

Specified by:
updateList in interface ConfigurationToAugeas
Throws:
AugeasRhqException

updateSimple

public void updateSimple(AugeasNode parentNode,
                         org.rhq.core.domain.configuration.definition.PropertyDefinitionSimple propDef,
                         org.rhq.core.domain.configuration.Property prop,
                         int seq)
                  throws AugeasRhqException
Description copied from interface: ConfigurationToAugeas
TODO this should be removed from the interface and made protected abstract in ConfigurationToAugeasSimple

Specified by:
updateSimple in interface ConfigurationToAugeas
Throws:
AugeasRhqException

updateProperty

public void updateProperty(org.rhq.core.domain.configuration.definition.PropertyDefinition propDef,
                           org.rhq.core.domain.configuration.Property parentProp,
                           AugeasNode parentNode,
                           int seq)
                    throws AugeasRhqException
Description copied from interface: ConfigurationToAugeas
Performs updates in the tree based on the values in the single property (and its descendants).

Specified by:
updateProperty in interface ConfigurationToAugeas
Parameters:
propDef - the property definition of the property we are applying to the tree
parentProp - the parent property of the property we are dealing with
parentNode - the parent node under which we should apply the property
seq - the sequence number of the property we are applying inside the parentProp
Throws:
AugeasRhqException


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