commonj.connector.metadata.discovery
Interface EditableType


public interface EditableType

Tool environments should provide implementations for rich editing support of administered objects, ConnectionSpecs, and InteractionSpecs for resource adapters.

This interface provides methods which create a PropertyGroup for these objects and then synchronizes between object instances and its PropertyGroup, and vice versa. Tool environments must use this interface to enable the rich editing of the administerable objects.

Since:
1.0

Method Summary
 PropertyGroup createProperties()
          Creates a new instance of the properties associated with the administered object, ConnectionSpec or InteractionSpec for which this instance of EditableType was created.
 void synchronizeFromBeanToPropertyGroup(Object bean, PropertyGroup pg)
          Synchronizes the associated administered object, ConnectionSpec or InteractionSpec to the PropertyGroup.
 void synchronizeFromPropertyGroupToBean(PropertyGroup pg, Object bean)
          Synchronizes from the PropertyGroup to the associated administered object, ConnectionSpec or InteractionSpec.
 

Method Detail

createProperties

PropertyGroup createProperties()
Creates a new instance of the properties associated with the administered object, ConnectionSpec or InteractionSpec for which this instance of EditableType was created.

Returns:
A PropertyGroup representing properties of the associated administered object, ConnectionSpec or InteractionSpec or null if no properties exist.

synchronizeFromBeanToPropertyGroup

void synchronizeFromBeanToPropertyGroup(Object bean,
                                        PropertyGroup pg)
                                        throws MetadataException
Synchronizes the associated administered object, ConnectionSpec or InteractionSpec to the PropertyGroup.

Parameters:
bean - The source associated administered object, ConnectionSpec or InteractionSpec.
pg - The target PropertyGroup populated from the bean, which is used for rich editing support of the associated object.
Throws:
MetadataException - if any error occured.
See Also:
PropertyGroup

synchronizeFromPropertyGroupToBean

void synchronizeFromPropertyGroupToBean(PropertyGroup pg,
                                        Object bean)
                                        throws MetadataException
Synchronizes from the PropertyGroup to the associated administered object, ConnectionSpec or InteractionSpec.

Parameters:
pg - The source PropertyGroup which has user interface updates.
bean - The target associated administered object, ConnectionSpec or InteractionSpec.
Throws:
MetadataException - if any error occured.
See Also:
PropertyGroup