org.rhq.plugins.hosts
Class HostsComponent

java.lang.Object
  extended by org.rhq.plugins.augeas.AugeasConfigurationComponent
      extended by org.rhq.plugins.hosts.HostsComponent
All Implemented Interfaces:
AvailabilityFacet, ConfigurationFacet, CreateChildResourceFacet, DeleteResourceFacet, ResourceComponent

public class HostsComponent
extends AugeasConfigurationComponent

The ResourceComponent for the "Hosts File" ResourceType.

Author:
Ian Springer

Field Summary
 
Fields inherited from class org.rhq.plugins.augeas.AugeasConfigurationComponent
AUGEAS_MODULE_NAME_PROP, AUGEAS_ROOT_PATH_PROP, DEFAULT_AUGEAS_ROOT_PATH, EXCLUDE_GLOBS_PROP, INCLUDE_GLOBS_PROP, RESOURCE_CONFIGURATION_ROOT_NODE_PROP
 
Constructor Summary
HostsComponent()
           
 
Method Summary
 org.rhq.core.domain.measurement.AvailabilityType getAvailability()
           
protected  AugeasNode getExistingChildNodeForListMemberPropertyMap(AugeasNode parentNode, org.rhq.core.domain.configuration.definition.PropertyDefinitionList propDefList, org.rhq.core.domain.configuration.PropertyMap propMap)
           
protected  AugeasNode getNewListMemberNode(AugeasNode listNode, org.rhq.core.domain.configuration.definition.PropertyDefinitionMap listMemberPropDefMap, int listIndex)
           
protected  String getNodeInsertionPoint(net.augeas.Augeas augeas, AugeasNode node, org.rhq.core.domain.configuration.definition.PropertyDefinitionSimple propDefSimple, org.rhq.core.domain.configuration.PropertySimple propSimple)
           
 org.rhq.core.domain.configuration.Configuration loadResourceConfiguration()
           
 void start(ResourceContext resourceContext)
           
 void stop()
           
 void updateResourceConfiguration(ConfigurationUpdateReport report)
           
protected  boolean validateResourceConfiguration(ConfigurationUpdateReport report)
           
 
Methods inherited from class org.rhq.plugins.augeas.AugeasConfigurationComponent
close, createAugeas, createPropertyList, createPropertyMap, createPropertySimple, createResource, deleteResource, finalize, getAugeas, getAugeasLoadPath, getAugeasPathRelativeToParent, getAugeasRootPath, getChildResourceConfigurationRootLabel, getChildResourceConfigurationRootPath, getConfigurationFiles, getResourceConfigurationRootPath, getResourceContext, getResourceDescription, initAugeas, isAugeasAvailable, loadProperty, populatePropertyMap, setNode, setNodeFromPropertyList, setNodeFromPropertyMap, setNodeFromPropertySimple, setupAugeasModules, summarizeAugeasError, toNodeValue, toPropertyValue, updateStructuredConfiguration
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HostsComponent

public HostsComponent()
Method Detail

start

public void start(ResourceContext resourceContext)
           throws InvalidPluginConfigurationException,
                  Exception
Specified by:
start in interface ResourceComponent
Overrides:
start in class AugeasConfigurationComponent
Throws:
InvalidPluginConfigurationException
Exception

stop

public void stop()
Specified by:
stop in interface ResourceComponent
Overrides:
stop in class AugeasConfigurationComponent

getAvailability

public org.rhq.core.domain.measurement.AvailabilityType getAvailability()
Specified by:
getAvailability in interface AvailabilityFacet
Overrides:
getAvailability in class AugeasConfigurationComponent

loadResourceConfiguration

public org.rhq.core.domain.configuration.Configuration loadResourceConfiguration()
                                                                          throws Exception
Specified by:
loadResourceConfiguration in interface ConfigurationFacet
Overrides:
loadResourceConfiguration in class AugeasConfigurationComponent
Throws:
Exception

updateResourceConfiguration

public void updateResourceConfiguration(ConfigurationUpdateReport report)
Specified by:
updateResourceConfiguration in interface ConfigurationFacet
Overrides:
updateResourceConfiguration in class AugeasConfigurationComponent

getNodeInsertionPoint

protected String getNodeInsertionPoint(net.augeas.Augeas augeas,
                                       AugeasNode node,
                                       org.rhq.core.domain.configuration.definition.PropertyDefinitionSimple propDefSimple,
                                       org.rhq.core.domain.configuration.PropertySimple propSimple)
Overrides:
getNodeInsertionPoint in class AugeasConfigurationComponent

getNewListMemberNode

protected AugeasNode getNewListMemberNode(AugeasNode listNode,
                                          org.rhq.core.domain.configuration.definition.PropertyDefinitionMap listMemberPropDefMap,
                                          int listIndex)
Overrides:
getNewListMemberNode in class AugeasConfigurationComponent

validateResourceConfiguration

protected boolean validateResourceConfiguration(ConfigurationUpdateReport report)
Overrides:
validateResourceConfiguration in class AugeasConfigurationComponent

getExistingChildNodeForListMemberPropertyMap

protected AugeasNode getExistingChildNodeForListMemberPropertyMap(AugeasNode parentNode,
                                                                  org.rhq.core.domain.configuration.definition.PropertyDefinitionList propDefList,
                                                                  org.rhq.core.domain.configuration.PropertyMap propMap)
Overrides:
getExistingChildNodeForListMemberPropertyMap in class AugeasConfigurationComponent


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