org.teiid.rhq.plugin.adapter.impl
Class PropertyMapToGenericValueAdapter
java.lang.Object
org.teiid.rhq.plugin.adapter.api.AbstractPropertyMapAdapter
org.teiid.rhq.plugin.adapter.impl.PropertyMapToGenericValueAdapter
- All Implemented Interfaces:
- PropertyAdapter<org.rhq.core.domain.configuration.PropertyMap,org.rhq.core.domain.configuration.definition.PropertyDefinitionMap>
public class PropertyMapToGenericValueAdapter
- extends AbstractPropertyMapAdapter
- 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 GenericValue
. The
GenericValue's value is assumed to be a ManagedObject
.
Method Summary |
org.jboss.metatype.api.values.MetaValue |
convertToMetaValue(org.rhq.core.domain.configuration.PropertyMap propMap,
org.rhq.core.domain.configuration.definition.PropertyDefinitionMap propDefMap,
org.jboss.metatype.api.types.MetaType metaType)
Given a Property and its PropertyDefinition , create and return a corresponding MetaValue
with the specified 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. |
void |
populatePropertyFromMetaValue(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 the
Property so it corresponds to the MetaValue. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PropertyMapToGenericValueAdapter
public PropertyMapToGenericValueAdapter()
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>
- Parameters:
propMap
- the property to be copiedmetaValue
- the MetaValue to be populated; should not be nullpropDefMap
- the property's definition
convertToMetaValue
public org.jboss.metatype.api.values.MetaValue convertToMetaValue(org.rhq.core.domain.configuration.PropertyMap propMap,
org.rhq.core.domain.configuration.definition.PropertyDefinitionMap propDefMap,
org.jboss.metatype.api.types.MetaType metaType)
- Description copied from interface:
PropertyAdapter
- Given a
Property
and its PropertyDefinition
, create and return a corresponding MetaValue
with the specified MetaType
. If the Property is a list or a map, all descendant Property's should be
represented as descendants of the returned MetaValue. Generally this method can simply create an empty MetaValue
object and then delegate the population of the guts of the object to PropertyAdapter.populateMetaValueFromProperty(Property,
MetaValue, PropertyDefinition)
.
- Specified by:
convertToMetaValue
in interface PropertyAdapter<org.rhq.core.domain.configuration.PropertyMap,org.rhq.core.domain.configuration.definition.PropertyDefinitionMap>
- Parameters:
propMap
- the property to be convertedpropDefMap
- the property's definitionmetaType
- the type of MetaValue that should be created and returned
- Returns:
- the MetaValue representation of the given Property
populatePropertyFromMetaValue
public void populatePropertyFromMetaValue(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 the
Property so it corresponds to the MetaValue. If the MetaValue is a from of list or map, all descendant
MetaValue's should be added as descendants of the Property.
- Specified by:
populatePropertyFromMetaValue
in interface PropertyAdapter<org.rhq.core.domain.configuration.PropertyMap,org.rhq.core.domain.configuration.definition.PropertyDefinitionMap>
- Parameters:
propMap
- the property to be populated; should not be nullmetaValue
- the MetaValue to be copiedpropDefMap
- the property's definition
Copyright © 2010. All Rights Reserved.