org.eclipse.wst.common.frameworks.datamodel
Interface IDataModelProvider

All Superinterfaces:
IDataModelProperties
All Known Implementing Classes:
AbstractDataModelProvider

public interface IDataModelProvider
extends IDataModelProperties

IDataModelProviders are used by the DataMdoelFactory to construct IDataModels.

This interface is not intended to be implemented by clients. Clients should subclass AbstractDataModelProvider.

Since:
1.0

Field Summary
static org.eclipse.core.runtime.IStatus OK_STATUS
           
 
Fields inherited from interface org.eclipse.wst.common.frameworks.datamodel.IDataModelProperties
ALLOW_EXTENSIONS, RESTRICT_EXTENSIONS
 
Method Summary
 void dispose()
           
 IDataModel getDataModel()
           Returns the backing IDataModel for this provider.
 IDataModelOperation getDefaultOperation()
           
 java.lang.Object getDefaultProperty(java.lang.String propertyName)
           This is where the provider should define how default properties should be computed.
 java.util.List getExtendedContext()
           
 java.lang.String getID()
           
 DataModelPropertyDescriptor getPropertyDescriptor(java.lang.String propertyName)
           
 java.util.Set getPropertyNames()
           Returns a list of property names for which this provider is responsible.
 DataModelPropertyDescriptor[] getValidPropertyDescriptors(java.lang.String propertyName)
           
 void init()
           Providers should perform additional initialization here.
 boolean isPropertyEnabled(java.lang.String propertyName)
           This is where the provider should define how property enablements are computed.
 boolean propertySet(java.lang.String propertyName, java.lang.Object propertyValue)
           This is a special callback hook for the IDataModel provider to be notified of a setProperty() call invoked on the backing IDataModel.
 void setDataModel(IDataModel dataModel)
           
 org.eclipse.core.runtime.IStatus validate(java.lang.String name)
          IDataModelProviders should perform property validation here.
 

Field Detail

OK_STATUS

static final org.eclipse.core.runtime.IStatus OK_STATUS
Method Detail

setDataModel

void setDataModel(IDataModel dataModel)

getDataModel

IDataModel getDataModel()

Returns the backing IDataModel for this provider.

Returns:
the backing IDataModel

getPropertyNames

java.util.Set getPropertyNames()

Returns a list of property names for which this provider is responsible. This method is called only once during initialization.

Returns:
the array of valid property names.

init

void init()

Providers should perform additional initialization here.


getDefaultProperty

java.lang.Object getDefaultProperty(java.lang.String propertyName)

This is where the provider should define how default properties should be computed.

Parameters:
propertyName - the specified property
Returns:
the default property value

isPropertyEnabled

boolean isPropertyEnabled(java.lang.String propertyName)

This is where the provider should define how property enablements are computed.

Parameters:
propertyName - the specified property
Returns:
true if the property is enabled, false otherwise.

validate

org.eclipse.core.runtime.IStatus validate(java.lang.String name)
IDataModelProviders should perform property validation here. All calls to IDataModel.validateProperty(String) are routed to the appropriate IDatModelProvider. When IDataModel.validate() or IDataModel.validate(boolean) are called to validate the entire IDataModel, any nested model names are also passed through to the IDataModelProvider for a chance to validate the nested IDataModel in an appropriate manner.

Parameters:
name -
Returns:
an IStatus

propertySet

boolean propertySet(java.lang.String propertyName,
                    java.lang.Object propertyValue)

This is a special callback hook for the IDataModel provider to be notified of a setProperty() call invoked on the backing IDataModel. This method is called after the actual value has been stored by the IDataModel but before any general notifications are fired to its listeners. Thus this IDataModelProvider may react to updates apropriately by setting other properties, notifying default changes, notifying valid value changes, etc.

Parameters:
propertyName -
propertyValue -
Returns:
true to fire a VALUE_CHG DataModelEvent.

getPropertyDescriptor

DataModelPropertyDescriptor getPropertyDescriptor(java.lang.String propertyName)

getValidPropertyDescriptors

DataModelPropertyDescriptor[] getValidPropertyDescriptors(java.lang.String propertyName)

getExtendedContext

java.util.List getExtendedContext()

getDefaultOperation

IDataModelOperation getDefaultOperation()

getID

java.lang.String getID()

dispose

void dispose()