Interface Filter

All Superinterfaces:
Aware, BeanNameAware, LogicalStatement
All Known Implementing Classes:
DefaultFilter, TrueFilter

public interface Filter extends LogicalStatement, 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:
  • Method Summary

    Modifier and Type
    Method
    Description
    Get the name of a filter.
    boolean
    getResult(Context context, Item item)
    Get the result of logical evaluation for an item

    Methods inherited from interface org.springframework.beans.factory.BeanNameAware

    setBeanName
  • Method Details

    • getResult

      boolean getResult(Context context, Item item) throws LogicalStatementException
      Get the result of logical evaluation for an item
      Specified by:
      getResult in interface LogicalStatement
      Parameters:
      context - DSpace context
      item - 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