|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.basedb.util.extensions.DefaultFilter
public class DefaultFilter
A default filter implementation that enables all
extensions and extension points and sorts the
extensions based on the Extension.getIndex()
values.
Field Summary | |
---|---|
static Comparator<InvokationContext<?>> |
INDEX_COMPARATOR_CTX
Comparator used to order a list of invokation contexts by the index value of the extension. |
static Comparator<Extension<?>> |
INDEX_COMPARATOR_EXT
Comparator used to order a list of extensions by the index value of the extension. |
Constructor Summary | |
---|---|
DefaultFilter()
Create a new default filter. |
Method Summary | |
---|---|
boolean |
isEnabled(Extension<?> extension)
Check if an extension is enabled or disabled. |
boolean |
isEnabled(ExtensionPoint<?> extensionPoint)
Check if an extension point is enabled or disabled. |
void |
sort(List<? extends InvokationContext<?>> extensions)
Sort a list of invoked extensions according to some property. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final Comparator<InvokationContext<?>> INDEX_COMPARATOR_CTX
Extension.getIndex()
public static final Comparator<Extension<?>> INDEX_COMPARATOR_EXT
Extension.getIndex()
Constructor Detail |
---|
public DefaultFilter()
Method Detail |
---|
public boolean isEnabled(ExtensionPoint<?> extensionPoint)
ExtensionsFilter
isEnabled
in interface ExtensionsFilter
extensionPoint
- The extension point to check
public boolean isEnabled(Extension<?> extension)
ExtensionsFilter
isEnabled
in interface ExtensionsFilter
extension
- The extension to check
public void sort(List<? extends InvokationContext<?>> extensions)
ExtensionsFilter
sort
in interface ExtensionsFilter
extensions
- The list of extensions to sort
|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |