org.rhq.rhqtransform.impl
Class AugeasToConfigurationSimple

java.lang.Object
  extended by org.rhq.rhqtransform.impl.AugeasToConfigurationSimple
All Implemented Interfaces:
AugeasToConfiguration

public class AugeasToConfigurationSimple
extends Object
implements AugeasToConfiguration

Basic implementation of Augeas mapping to RHQ configuration based on property names.

Author:
Filip Drabek, Ian Springer

Field Summary
protected  NameMap nameMap
           
protected  AugeasTree tree
           
 
Constructor Summary
AugeasToConfigurationSimple()
           
 
Method Summary
 org.rhq.core.domain.configuration.Property createPropertyList(org.rhq.core.domain.configuration.definition.PropertyDefinitionList propDefList, AugeasNode node)
          TODO this should be removed from the interface and made protected abstract in AugeasToConfigurationSimple Creates a property list from the data in the parent node.
 org.rhq.core.domain.configuration.PropertyMap createPropertyMap(org.rhq.core.domain.configuration.definition.PropertyDefinitionMap propDefMap, AugeasNode node)
          TODO this should be removed from the interface and made protected abstract in AugeasToConfigurationSimple Creates a map property from the data in the parent node.
 org.rhq.core.domain.configuration.Property createPropertySimple(org.rhq.core.domain.configuration.definition.PropertyDefinitionSimple propDefSimple, AugeasNode node)
          TODO this should be removed from the interface and made protected abstract in AugeasToConfigurationSimple Creates a simple property from the property definition.
 org.rhq.core.domain.configuration.Property loadProperty(org.rhq.core.domain.configuration.definition.PropertyDefinition propDef, AugeasNode parentNode)
          Loads a single property from given node.
 org.rhq.core.domain.configuration.Configuration loadResourceConfiguration(AugeasNode startNode, org.rhq.core.domain.configuration.definition.ConfigurationDefinition resourceConfigDef)
          Loads the RHQ configuration instance from the Augeas tree.
 void setNameMap(NameMap nameMap)
          Provides the mapper with name conversion from Augeas node names to RHQ configuration property names.
 void setTree(AugeasTree tree)
          Sets the Augeas tree that should be worked with.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tree

protected AugeasTree tree

nameMap

protected NameMap nameMap
Constructor Detail

AugeasToConfigurationSimple

public AugeasToConfigurationSimple()
Method Detail

setTree

public void setTree(AugeasTree tree)
Description copied from interface: AugeasToConfiguration
Sets the Augeas tree that should be worked with.

Specified by:
setTree in interface AugeasToConfiguration

setNameMap

public void setNameMap(NameMap nameMap)
Description copied from interface: AugeasToConfiguration
Provides the mapper with name conversion from Augeas node names to RHQ configuration property names.

Specified by:
setNameMap in interface AugeasToConfiguration

loadResourceConfiguration

public org.rhq.core.domain.configuration.Configuration loadResourceConfiguration(AugeasNode startNode,
                                                                                 org.rhq.core.domain.configuration.definition.ConfigurationDefinition resourceConfigDef)
                                                                          throws AugeasRhqException
Description copied from interface: AugeasToConfiguration
Loads the RHQ configuration instance from the Augeas tree.

Specified by:
loadResourceConfiguration in interface AugeasToConfiguration
Parameters:
startNode - the node to start the mapping from
resourceConfigDef - the configuration definition to use
Returns:
the RHQ configuration with the values loaded from the Augeas tree
Throws:
AugeasRhqException

loadProperty

public org.rhq.core.domain.configuration.Property loadProperty(org.rhq.core.domain.configuration.definition.PropertyDefinition propDef,
                                                               AugeasNode parentNode)
                                                        throws AugeasRhqException
Description copied from interface: AugeasToConfiguration
Loads a single property from given node.

Specified by:
loadProperty in interface AugeasToConfiguration
Parameters:
propDef - the definition of the property
parentNode - the parent node from which the property should be loaded.
Returns:
Throws:
AugeasRhqException

createPropertySimple

public org.rhq.core.domain.configuration.Property createPropertySimple(org.rhq.core.domain.configuration.definition.PropertyDefinitionSimple propDefSimple,
                                                                       AugeasNode node)
                                                                throws AugeasRhqException
Description copied from interface: AugeasToConfiguration
TODO this should be removed from the interface and made protected abstract in AugeasToConfigurationSimple Creates a simple property from the property definition.

Specified by:
createPropertySimple in interface AugeasToConfiguration
Parameters:
propDefSimple - the definition of the property
node - the parent node where the property should be looked for
Returns:
Throws:
AugeasRhqException

createPropertyMap

public org.rhq.core.domain.configuration.PropertyMap createPropertyMap(org.rhq.core.domain.configuration.definition.PropertyDefinitionMap propDefMap,
                                                                       AugeasNode node)
                                                                throws AugeasRhqException
Description copied from interface: AugeasToConfiguration
TODO this should be removed from the interface and made protected abstract in AugeasToConfigurationSimple Creates a map property from the data in the parent node.

Specified by:
createPropertyMap in interface AugeasToConfiguration
Parameters:
propDefMap - the definition of the property map
node - the parent node
Returns:
Throws:
AugeasRhqException

createPropertyList

public org.rhq.core.domain.configuration.Property createPropertyList(org.rhq.core.domain.configuration.definition.PropertyDefinitionList propDefList,
                                                                     AugeasNode node)
                                                              throws AugeasRhqException
Description copied from interface: AugeasToConfiguration
TODO this should be removed from the interface and made protected abstract in AugeasToConfigurationSimple Creates a property list from the data in the parent node.

Specified by:
createPropertyList in interface AugeasToConfiguration
Returns:
Throws:
AugeasRhqException


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