Package org.dspace.content.logic
Interface Filter
-
- All Superinterfaces:
org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanNameAware,LogicalStatement
- All Known Implementing Classes:
DefaultFilter,TrueFilter
public interface Filter extends LogicalStatement, org.springframework.beans.factory.BeanNameAware
The interface for Filter currently doesn't add anything to LogicalStatement but inherits from it just to keep naming / reflection clean, and in case Filters should do anything additional in future. We need this as filters have to be specified in the spring configuration (item-filters.xml). Filters are the top level elements of the logic. Only logical statements that implement this interface are allowed to be the root element of a spring configuration (item-filters.xml) of this logic framework. A filter is just helping to differentiate between logical statement that can be used as root elements and logical statement that shouldn't be use as root element. A filter may contain only one substatement.- Author:
- Kim Shepherd
- See Also:
DefaultFilter
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringgetName()Get the name of a filter.booleangetResult(Context context, Item item)Get the result of logical evaluation for an item
-
-
-
Method Detail
-
getResult
boolean getResult(Context context, Item item) throws LogicalStatementException
Get the result of logical evaluation for an item- Specified by:
getResultin interfaceLogicalStatement- Parameters:
context- DSpace contextitem- Item to evaluate- Returns:
- boolean
- Throws:
LogicalStatementException
-
getName
String getName()
Get the name of a filter. This can be used by filters which make use of BeanNameAware to return the bean name.- Returns:
- the id/name of this spring bean
-
-