commonj.connector.metadata.discovery.properties
Interface PropertyDescriptor

All Superinterfaces:
Cloneable
All Known Subinterfaces:
BindingTypeProperty, BoundedMultiValuedProperty, FileProperty, FolderProperty, JavaTypeProperty, MultiFileProperty, MultiFolderProperty, MultiJavaTypeProperty, MultiSchemaTypeProperty, MultiValuedProperty, NodeProperty, Property, PropertyGroup, SchemaTypeProperty, SingleTypedProperty, SingleValuedProperty, TableProperty, TableProperty.ColumnDescriptor, TreeProperty

public interface PropertyDescriptor
extends Cloneable

A base interface for describing a property, or a group of properties.

Since:
1.0

Method Summary
 void addPropertyChangeListener(PropertyChangeListener listener)
          Registers a PropertyChangeListener to this property.
 Object clone()
          Tool environments may need to make copies of properties for logical, performance, or caching, needs.
 String getDescription()
          Returns the description of this property.
 String getDisplayName()
          Returns the display name to be used by tool environments to display the property.
 String getID()
          Returns a unique ID that has been assigned to the property descriptor.
 String getName()
          Returns the name of this property.
 boolean isEnabled()
          Returns if this property is enabled or disabled.
 void removePropertyChangeListener(PropertyChangeListener listener)
          Removes a PropertyChangeListener from this property.
 

Method Detail

getDescription

String getDescription()
Returns the description of this property.

This is a locale specific object that must be separated to a ResourceBundle, translated, and retrieved using the locale of the tool environment.

Returns:
a non null String description.
See Also:
ResourceBundle, MessageFormat

getName

String getName()
Returns the name of this property. The name is used as a key to locate the property and is not displayed to users in any form.

Returns:
a non null String name. The name chosen for a property is implementation specific. The only requirement is that property names must be unique within a given PropertyGroup to avoid name collisions.
See Also:
PropertyGroup

getDisplayName

String getDisplayName()
Returns the display name to be used by tool environments to display the property.

This is a locale specific object that must be separated to a ResourceBundle, translated, and retrieved using the locale of the tool environment.

Returns:
a non null string name.
See Also:
ResourceBundle, MessageFormat

addPropertyChangeListener

void addPropertyChangeListener(PropertyChangeListener listener)
Registers a PropertyChangeListener to this property. The registered listener will be notified of any changes to the property instance. Tool environment user interfaces should use this mechanism to respond to property change behaviour.

Parameters:
listener - a non null lister that wishes to be notified of property change events.

removePropertyChangeListener

void removePropertyChangeListener(PropertyChangeListener listener)
Removes a PropertyChangeListener from this property.

Parameters:
listener - listener a non null lister that wishes removed from the notification list.
See Also:
addPropertyChangeListener(PropertyChangeListener)

isEnabled

boolean isEnabled()
Returns if this property is enabled or disabled. Tool environments must use this method to determine how to show the property in a presentation that indicates whether the property is appropriate for the current context or not. For example, on graphical user interfaces a disabled String property may appear as a grayed out text field.

Returns:
a boolean flag indicating if property is enabled or disabled.

clone

Object clone()
Tool environments may need to make copies of properties for logical, performance, or caching, needs. To support this all PropertyDescriptors must extend the Cloneableinterface. Implementors of the clone method must ensure that a deep copy is performed where necessary. For example, if a property group has many properties that listen to each other for changes, then it is insufficient to simply clone the property values. The cloned property group must also clone the listening behavior among the properties as well.

Returns:
a non null clone of this Object.

getID

String getID()
Returns a unique ID that has been assigned to the property descriptor. The ID could be used to allow customization in tooling for this property descriptor instance.

Returns:
A unique ID that has been assigned to the property descriptor or null if no id exists.
Since:
1.1