public class ConnectionFactoryConfigPropertyAdapter extends AbstractPropertyListAdapter
PropertyList of a PropertyMaps of name, type and value PropertySimples and a MapCompositeValueSupport where the keys are the config-property names and values are
config-property values. We need a custom adapter for this because we need to support editing the type of the
config-property entries.
JBoss Profile service exposes a type of a config property in a slightly "interesting" manner. A config-property
defined as
<config-property name="property" type="java.lang.String">value</config-property>
is exposed as a pair of entries in the map:
[key = "property", value = "value"]
[key = "property.type", value = "java.lang.String"] | Constructor and Description |
|---|
ConnectionFactoryConfigPropertyAdapter() |
| Modifier and Type | Method and Description |
|---|---|
org.jboss.metatype.api.values.MetaValue |
convertToMetaValue(org.rhq.core.domain.configuration.PropertyList property,
org.rhq.core.domain.configuration.definition.PropertyDefinitionList propertyDefinition,
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.PropertyList property,
org.jboss.metatype.api.values.MetaValue metaValue,
org.rhq.core.domain.configuration.definition.PropertyDefinitionList propertyDefinition)
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.PropertyList property,
org.jboss.metatype.api.values.MetaValue metaValue,
org.rhq.core.domain.configuration.definition.PropertyDefinitionList propertyDefinition)
Given a
Property and its PropertyDefinition, as well as a MetaValue, populate the
Property so it corresponds to the MetaValue. |
convertToPropertypublic ConnectionFactoryConfigPropertyAdapter()
public org.jboss.metatype.api.values.MetaValue convertToMetaValue(org.rhq.core.domain.configuration.PropertyList property,
org.rhq.core.domain.configuration.definition.PropertyDefinitionList propertyDefinition,
org.jboss.metatype.api.types.MetaType metaType)
PropertyAdapterProperty 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).property - the property to be convertedpropertyDefinition - the property's definitionmetaType - the type of MetaValue that should be created and returnedpublic void populateMetaValueFromProperty(org.rhq.core.domain.configuration.PropertyList property,
org.jboss.metatype.api.values.MetaValue metaValue,
org.rhq.core.domain.configuration.definition.PropertyDefinitionList propertyDefinition)
PropertyAdapterProperty 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.property - the property to be copiedmetaValue - the MetaValue to be populated; should not be nullpropertyDefinition - the property's definitionpublic void populatePropertyFromMetaValue(org.rhq.core.domain.configuration.PropertyList property,
org.jboss.metatype.api.values.MetaValue metaValue,
org.rhq.core.domain.configuration.definition.PropertyDefinitionList propertyDefinition)
PropertyAdapterProperty 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.property - the property to be populated; should not be nullmetaValue - the MetaValue to be copiedpropertyDefinition - the property's definitionCopyright © 2008-2014 Red Hat, Inc.. All Rights Reserved.