com.inline.feature.common
Class AbstractFeatureFactory
java.lang.Object
|
+--com.inline.feature.common.AbstractFeatureFactory
- Direct Known Subclasses:
- JavaClassFeatureFactory, JavaFileFeatureFactory, JavaMemberFeatureFactory
- public abstract class AbstractFeatureFactory
- extends java.lang.Object
- implements FeatureFactory
Recommended superclass for FeatureFactories.
Method Summary |
java.net.URL |
getParentFeatureURL(FeatureModel model,
java.net.URL url)
Override this method to support direct feature lookup in the model. |
boolean |
isEnabled(Feature parent,
java.lang.String type)
The default implementation of this method forwards the request to
FeatureModel by calling FeatureModel.isFeatureFactoryEnabled() . |
protected boolean |
isModelType(FeatureModel model,
java.lang.String type)
The implementation of this method is:
|
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
AbstractFeatureFactory
public AbstractFeatureFactory()
isModelType
protected boolean isModelType(FeatureModel model,
java.lang.String type)
- The implementation of this method is:
return model.getProperty(FeatureModel.TYPE).equals(type);
isEnabled
public boolean isEnabled(Feature parent,
java.lang.String type)
- The default implementation of this method forwards the request to
FeatureModel by calling
FeatureModel.isFeatureFactoryEnabled()
.
This allow FeatureModel to resolve conflicts between factories supporting
the same type.
- Specified by:
- isEnabled in interface FeatureFactory
- See Also:
FeatureModel.isFeatureFactoryEnabled(Feature,String,FeatureFactory)
getParentFeatureURL
public java.net.URL getParentFeatureURL(FeatureModel model,
java.net.URL url)
- Override this method to support direct feature lookup in the model.
The method should infer parent feature's URL from the supplied feature URL.
- Specified by:
- getParentFeatureURL in interface FeatureFactory