|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
FeatureModel is the container of a Feature tree. It plays several roles:
Field Summary | |
static java.lang.String |
DISPLAY_MODE
Property that determines the type of UI used to display this model. |
static java.lang.String |
STANDARD_DISPLAY_MODE
Property that identifies the default type of UI. |
static java.lang.String |
TYPE
Property that determines the type of model, for example "EJB1.1 Assembly", "J2EE Assembly", "EDOC Subsystem" etc. |
Method Summary | |
void |
commit()
Invokes the commit() method on all changed, new and removed features. |
void |
featureChanged(Feature feature,
java.lang.String property,
java.lang.Object oldValue,
java.lang.Object newValue)
Invoked by a feature when it changes, except when it changes during the resource parsing process. |
void |
featureDeleted(Feature feature)
Invoked by a feature when it is deleted from the model, except as a result of the resource parsing process. |
void |
featureInserted(Feature feature)
Invoked by a feature set when a new feature is inserted, except as a result of the resource parsing process. |
com.sun.java.util.collections.Set |
getAdditionalActions(Feature feature)
Returns a set of FeatureActions provided by FeatureActionFactories for the supplied feature. |
com.sun.java.util.collections.Set |
getAdditionalFeatureConstructors(Feature parent,
java.lang.String childType)
Returns a set of FeatureConstructors for the supplied parent and child type. |
FeatureSet |
getChildFeatureSet(Feature parent)
Returns a FeatureSet that represents all children of the supplied feature. |
DisplayProperties |
getDisplayProperties(Displayable displayable)
Returns DisplayProperties for the Displayable object (feature, action, constructor, etc). |
Feature |
getFeature(java.net.URL url)
Returns the feature for the specified URL. |
java.lang.Object |
getProperty(java.lang.String propertyName)
Returns the value of the specified property. |
ResourceAdapter |
getResourceAdapter(com.inline.resources.ResourceReference reference)
Resource adaptor will do a lot of resource management: create resources, post events when the resources change, maintain timestamps etc. |
com.inline.resources.ResourceRepository |
getResourceRepository()
Resource repository will provide access to various resources the model is base upon. |
ResourceSetAdapter |
getResourceSetAdapter(java.lang.String type,
com.inline.resources.ResourceQualifier qualifier)
Will post events when a resource of the corresponding type satisfying the qualifier is created/removed. |
Feature |
getRootFeature()
Returns the root feature. |
boolean |
isDefaultFeatureConstructor(Feature parent,
java.lang.String childType,
FeatureConstructor constructor)
The model can veto the choice of a particular constructor as the default one. |
boolean |
isFeatureActionEnabled(Feature feature,
FeatureAction action)
If the model returns false, the action will not be added to the list of enbaled actions for the supplied feature. |
boolean |
isFeatureActionFactoryEnabled(Feature feature,
FeatureActionFactory factory)
The model can veto action allocation by a factory. |
boolean |
isFeatureConstructorEnabled(Feature parent,
java.lang.String childType,
FeatureConstructor constructor)
The model can veto use of a particular constructor. |
boolean |
isFeatureConstructorFactoryEnabled(Feature parent,
java.lang.String childType,
FeatureConstructorFactory factory)
The model can veto feature constructor allocation by a factory |
boolean |
isFeatureFactoryEnabled(Feature parent,
java.lang.String type,
FeatureFactory factory)
The model can veto child recognition by a factory |
boolean |
isFeatureRecognitionEnabled(Feature parent,
java.net.URL url,
FeatureFactory factory)
The model can veto feature recognition by a feature set associated with a particular feature factory. |
void |
reparse()
Sends the reparse() method to all registered resource and resource
set adapters. |
void |
resourceModified(ResourceAdapter adapter)
Invoked by a feature during the commit process to indicate that the feature may have changed the specified resource. |
Field Detail |
public static final java.lang.String TYPE
public static final java.lang.String DISPLAY_MODE
public static final java.lang.String STANDARD_DISPLAY_MODE
Method Detail |
public Feature getRootFeature()
public Feature getFeature(java.net.URL url)
public FeatureSet getChildFeatureSet(Feature parent)
Feature.getChildren()
instead.public com.sun.java.util.collections.Set getAdditionalFeatureConstructors(Feature parent, java.lang.String childType)
FeatureSet.getFeatureConstructors(type)
instead.FeatureConstructor
,
FeatureConstructorFactory
,
AbstractFeatureSet.getFeatureConstructors(String)
public com.sun.java.util.collections.Set getAdditionalActions(Feature feature)
Feature.getActions()
instead.FeatureAction
,
FeatureActionFactory
,
AbstractFeature.getActions()
public DisplayProperties getDisplayProperties(Displayable displayable)
public java.lang.Object getProperty(java.lang.String propertyName)
public boolean isFeatureFactoryEnabled(Feature parent, java.lang.String type, FeatureFactory factory)
public boolean isFeatureRecognitionEnabled(Feature parent, java.net.URL url, FeatureFactory factory)
public boolean isFeatureConstructorFactoryEnabled(Feature parent, java.lang.String childType, FeatureConstructorFactory factory)
public boolean isFeatureConstructorEnabled(Feature parent, java.lang.String childType, FeatureConstructor constructor)
public boolean isDefaultFeatureConstructor(Feature parent, java.lang.String childType, FeatureConstructor constructor)
public boolean isFeatureActionFactoryEnabled(Feature feature, FeatureActionFactory factory)
public boolean isFeatureActionEnabled(Feature feature, FeatureAction action)
public com.inline.resources.ResourceRepository getResourceRepository()
public ResourceAdapter getResourceAdapter(com.inline.resources.ResourceReference reference)
public ResourceSetAdapter getResourceSetAdapter(java.lang.String type, com.inline.resources.ResourceQualifier qualifier)
public void reparse()
reparse()
method to all registered resource and resource
set adapters. Each adapter checks the status of the corresponding resource(s) and
sends an event if the status or contents have changed. This check is only
performed if the adapter has at least one observer. The adapter observers are
features and feature sets, they will reparse the resources when they receive
a notification.public void commit() throws InvalidFeatureException
commit()
method on all changed, new and removed features.
Then invokes commit(SHALLOW_COMMIT)
on all modified resource adapters.
Then invokes reparse()
on itself.public void featureChanged(Feature feature, java.lang.String property, java.lang.Object oldValue, java.lang.Object newValue)
public void featureInserted(Feature feature)
public void featureDeleted(Feature feature)
public void resourceModified(ResourceAdapter adapter)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |