org.teiid.rhq.plugin.adapter.impl
Class PropertyMapToMapCompositeValueSupportAdapter

java.lang.Object
  extended by org.teiid.rhq.plugin.adapter.api.AbstractPropertyMapAdapter
      extended by org.teiid.rhq.plugin.adapter.impl.AbstractPropertyMapToCompositeValueAdapter
          extended by org.teiid.rhq.plugin.adapter.impl.PropertyMapToMapCompositeValueSupportAdapter
All Implemented Interfaces:
PropertyAdapter<org.rhq.core.domain.configuration.PropertyMap,org.rhq.core.domain.configuration.definition.PropertyDefinitionMap>

public class PropertyMapToMapCompositeValueSupportAdapter
extends AbstractPropertyMapToCompositeValueAdapter
implements PropertyAdapter<org.rhq.core.domain.configuration.PropertyMap,org.rhq.core.domain.configuration.definition.PropertyDefinitionMap>

This class provides code that maps back and forth between a PropertyMap and a MapCompositeValueSupport. A MapCompositeValueSupport is a CompositeValue implementation that contains items that are all of the same type; there is no predefined list of valid keys, so it maps nicely to an "open" PropertyMap.


Constructor Summary
PropertyMapToMapCompositeValueSupportAdapter()
           
 
Method Summary
protected  org.jboss.metatype.api.values.CompositeValue createCompositeValue(org.rhq.core.domain.configuration.definition.PropertyDefinitionMap propDefMap, org.jboss.metatype.api.types.MetaType metaType)
           
 void populateMetaValueFromProperty(org.rhq.core.domain.configuration.PropertyMap propMap, org.jboss.metatype.api.values.MetaValue metaValue, org.rhq.core.domain.configuration.definition.PropertyDefinitionMap propDefMap)
          Given a Property and its PropertyDefinition, as well as a MetaValue, populate that MetaValue so it corresponds to the Property.
protected  void putValue(org.jboss.metatype.api.values.CompositeValue compositeValue, String key, org.jboss.metatype.api.values.MetaValue value)
           
 
Methods inherited from class org.teiid.rhq.plugin.adapter.impl.AbstractPropertyMapToCompositeValueAdapter
convertToMetaValue, populatePropertyFromMetaValue
 
Methods inherited from class org.teiid.rhq.plugin.adapter.api.AbstractPropertyMapAdapter
convertToProperty
 
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, convertToProperty, populatePropertyFromMetaValue
 

Constructor Detail

PropertyMapToMapCompositeValueSupportAdapter

public PropertyMapToMapCompositeValueSupportAdapter()
Method Detail

populateMetaValueFromProperty

public void populateMetaValueFromProperty(org.rhq.core.domain.configuration.PropertyMap propMap,
                                          org.jboss.metatype.api.values.MetaValue metaValue,
                                          org.rhq.core.domain.configuration.definition.PropertyDefinitionMap propDefMap)
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.PropertyMap,org.rhq.core.domain.configuration.definition.PropertyDefinitionMap>
Overrides:
populateMetaValueFromProperty in class AbstractPropertyMapToCompositeValueAdapter
Parameters:
propMap - the property to be copied
metaValue - the MetaValue to be populated; should not be null
propDefMap - the property's definition

putValue

protected void putValue(org.jboss.metatype.api.values.CompositeValue compositeValue,
                        String key,
                        org.jboss.metatype.api.values.MetaValue value)
Specified by:
putValue in class AbstractPropertyMapToCompositeValueAdapter

createCompositeValue

protected org.jboss.metatype.api.values.CompositeValue createCompositeValue(org.rhq.core.domain.configuration.definition.PropertyDefinitionMap propDefMap,
                                                                            org.jboss.metatype.api.types.MetaType metaType)
Specified by:
createCompositeValue in class AbstractPropertyMapToCompositeValueAdapter


Copyright © 2011. All Rights Reserved.