org.teiid.rhq.plugin.adapter.api
Class AbstractPropertySimpleAdapter

java.lang.Object
  extended by org.teiid.rhq.plugin.adapter.api.AbstractPropertySimpleAdapter
All Implemented Interfaces:
PropertyAdapter<org.rhq.core.domain.configuration.PropertySimple,org.rhq.core.domain.configuration.definition.PropertyDefinitionSimple>
Direct Known Subclasses:
PropertySimpleToEnumValueAdapter, PropertySimpleToSimpleValueAdapter

public abstract class AbstractPropertySimpleAdapter
extends java.lang.Object
implements PropertyAdapter<org.rhq.core.domain.configuration.PropertySimple,org.rhq.core.domain.configuration.definition.PropertyDefinitionSimple>

A base class for PropertySimple <-> ???MetaValue adapters.


Constructor Summary
AbstractPropertySimpleAdapter()
           
 
Method Summary
 org.rhq.core.domain.configuration.PropertySimple convertToProperty(org.jboss.metatype.api.values.MetaValue metaValue, org.rhq.core.domain.configuration.definition.PropertyDefinitionSimple propDefSimple)
          Given a MetaValue, create and return a corresponding Property with the specified PropertyDefinition.
 void populateMetaValueFromProperty(org.rhq.core.domain.configuration.PropertySimple propSimple, org.jboss.metatype.api.values.MetaValue metaValue, org.rhq.core.domain.configuration.definition.PropertyDefinitionSimple propDefSimple)
          Given a Property and its PropertyDefinition, as well as a MetaValue, populate that MetaValue so it corresponds to the Property.
protected abstract  void setInnerValue(java.lang.String propSimpleValue, org.jboss.metatype.api.values.MetaValue metaValue, org.rhq.core.domain.configuration.definition.PropertyDefinitionSimple propDefSimple)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.teiid.rhq.plugin.adapter.api.PropertyAdapter
convertToMetaValue, populatePropertyFromMetaValue
 

Constructor Detail

AbstractPropertySimpleAdapter

public AbstractPropertySimpleAdapter()
Method Detail

convertToProperty

public org.rhq.core.domain.configuration.PropertySimple convertToProperty(org.jboss.metatype.api.values.MetaValue metaValue,
                                                                          org.rhq.core.domain.configuration.definition.PropertyDefinitionSimple propDefSimple)
Description copied from interface: PropertyAdapter
Given a MetaValue, create and return a corresponding Property with the specified PropertyDefinition. If the MetaValue is a form of list or map, all descendant MetaValue's should be represented as descendants of the returned Property. Generally this method can simply create an empty Property object and then delegate the population of the guts of the object to PropertyAdapter.populatePropertyFromMetaValue(Property, MetaValue, PropertyDefinition).

Specified by:
convertToProperty in interface PropertyAdapter<org.rhq.core.domain.configuration.PropertySimple,org.rhq.core.domain.configuration.definition.PropertyDefinitionSimple>
Parameters:
metaValue - the metaValue to be converted
propDefSimple - the definition of the property to be created and returned
Returns:
the Property representation of the given MetaValue

populateMetaValueFromProperty

public void populateMetaValueFromProperty(org.rhq.core.domain.configuration.PropertySimple propSimple,
                                          org.jboss.metatype.api.values.MetaValue metaValue,
                                          org.rhq.core.domain.configuration.definition.PropertyDefinitionSimple propDefSimple)
Description copied from interface: PropertyAdapter
Given a Property and its PropertyDefinition, as well as a MetaValue, populate that MetaValue so it corresponds to the Property. If the Property is a list or a map, all descendant Property's should be added as descendants of the MetaValue.

Specified by:
populateMetaValueFromProperty in interface PropertyAdapter<org.rhq.core.domain.configuration.PropertySimple,org.rhq.core.domain.configuration.definition.PropertyDefinitionSimple>
Parameters:
propSimple - the property to be copied
metaValue - the MetaValue to be populated; should not be null
propDefSimple - the property's definition

setInnerValue

protected abstract void setInnerValue(java.lang.String propSimpleValue,
                                      org.jboss.metatype.api.values.MetaValue metaValue,
                                      org.rhq.core.domain.configuration.definition.PropertyDefinitionSimple propDefSimple)


Copyright © 2010. All Rights Reserved.