org.teiid.rhq.plugin.adapter.api
Class AbstractPropertySimpleAdapter
java.lang.Object
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.
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 |
AbstractPropertySimpleAdapter
public AbstractPropertySimpleAdapter()
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 convertedpropDefSimple
- 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 copiedmetaValue
- the MetaValue to be populated; should not be nullpropDefSimple
- 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.