Package org.dspace.content.logic
Class TrueFilter
- java.lang.Object
-
- org.dspace.content.logic.TrueFilter
-
- All Implemented Interfaces:
Filter,LogicalStatement,org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanNameAware
public class TrueFilter extends Object implements Filter
Extremely simple filter that always returns true! Useful to pass to methods that expect a filter, in order to effectively say "all items". This could be configured in Spring XML but it is more stable and reliable to have it hard-coded here so that any broken configuration doesn't silently break parts of DSpace that expect it to work.- Author:
- Kim Shepherd
-
-
Constructor Summary
Constructors Constructor Description TrueFilter()
-
Method Summary
All Methods Instance Methods Concrete 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 itemvoidsetBeanName(String name)
-
-
-
Method Detail
-
getResult
public boolean getResult(Context context, Item item) throws LogicalStatementException
Description copied from interface:FilterGet the result of logical evaluation for an item- Specified by:
getResultin interfaceFilter- Specified by:
getResultin interfaceLogicalStatement- Parameters:
context- DSpace contextitem- Item to evaluate- Returns:
- boolean
- Throws:
LogicalStatementException
-
setBeanName
public void setBeanName(String name)
- Specified by:
setBeanNamein interfaceorg.springframework.beans.factory.BeanNameAware
-
-