com.inline.feature
Interface FeatureSet

All Known Implementing Classes:
AbstractFeatureSet

public interface FeatureSet

FeatureSet is a tree-forming object, it contains children of a parent feature. It maintains itself synchronized with the underlying resources.


Method Summary
 void addFeatureSetListener(FeatureSetListener listener)
          Registration for those interested in getting notifications when features are added or removed.
 FeatureConstructor getDefaultFeatureConstructor(java.lang.String type)
          Returns a feature constructor that can be used by default to create new features of the specified type.
 Feature getFeature(java.lang.String type, java.lang.String signature)
          Finds the feature that has the specified type and signature
 FeatureConstructor getFeatureConstructor(java.lang.String type, java.lang.String name)
          Returns a constructor for the specified type and constructor name.
 com.sun.java.util.collections.Set getFeatureConstructors()
          Returns a set of FeatureConstructor objects suitable for the use in the context of this feature set's parent.
 com.sun.java.util.collections.Set getFeatureConstructors(java.lang.String type)
          Returns a set of FeatureConstructor objects suitable for the use in the context of this feature set's parent.
 com.sun.java.util.collections.Set getFeatures()
          Returns all features handled by this set.
 com.sun.java.util.collections.Set getFeatures(java.lang.String type)
          Returns a subset of features which have the specified type.
 Feature getParent()
          Returns the feature that owns this set of children
 Feature[] getSortedFeatures()
          Returns features sorted according to their DisplayProperty's preferences.
 boolean isEmpty()
          This method exists for optimization purposes.
 void release()
          This method is called when the parent feature is removed from the feature tree.
 void removeFeatureSetListener(FeatureSetListener listener)
           
 

Method Detail

getParent

public Feature getParent()
Returns the feature that owns this set of children

getFeatures

public com.sun.java.util.collections.Set getFeatures()
Returns all features handled by this set. The result may not reflect real situation if the feature set is inactive.

isEmpty

public boolean isEmpty()
This method exists for optimization purposes. Some FeatureSets will be able to answer this question without actually building a set of features.

getFeatures

public com.sun.java.util.collections.Set getFeatures(java.lang.String type)
Returns a subset of features which have the specified type. Will return null if the specified type is not a supported child type for this feature.

getFeature

public Feature getFeature(java.lang.String type,
                          java.lang.String signature)
Finds the feature that has the specified type and signature

getSortedFeatures

public Feature[] getSortedFeatures()
Returns features sorted according to their DisplayProperty's preferences.
See Also:
DisplayProperties

getFeatureConstructors

public com.sun.java.util.collections.Set getFeatureConstructors()
Returns a set of FeatureConstructor objects suitable for the use in the context of this feature set's parent.

getFeatureConstructors

public com.sun.java.util.collections.Set getFeatureConstructors(java.lang.String type)
Returns a set of FeatureConstructor objects suitable for the use in the context of this feature set's parent.

getFeatureConstructor

public FeatureConstructor getFeatureConstructor(java.lang.String type,
                                                java.lang.String name)
Returns a constructor for the specified type and constructor name. Every constructor has a name that identifies it.

getDefaultFeatureConstructor

public FeatureConstructor getDefaultFeatureConstructor(java.lang.String type)
Returns a feature constructor that can be used by default to create new features of the specified type.

release

public void release()
This method is called when the parent feature is removed from the feature tree. The set should unregister itself from everything it was listening to and forward the message to all child features.

addFeatureSetListener

public void addFeatureSetListener(FeatureSetListener listener)
Registration for those interested in getting notifications when features are added or removed.

removeFeatureSetListener

public void removeFeatureSetListener(FeatureSetListener listener)