Class FilterUtils


  • public class FilterUtils
    extends Object
    General utility methods for logical item filtering
    Author:
    Kim Shepherd
    • Constructor Summary

      Constructors 
      Constructor Description
      FilterUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static Filter getFilterFromConfiguration​(String property)
      Get a Filter by configuration property name For example, if a module has implemented "my-feature.filter" configuration property this method will return a filter with the ID specified by the configuration property
      static Filter getFilterFromConfiguration​(String property, Filter defaultFilter)
      Get a Filter by configuration property name For example, if a module has implemented "my-feature.filter" configuration property this method will return a filter with the ID specified by the configuration property
      static Map<Class<? extends Identifier>,​Filter> getIdentifierFilters​(boolean inProgress)
      Get a map of identifier types and filters to use when creating workspace or archived items This is used by services installing new archived or workspace items to filter by identifier type as some filters should apply to DOI creation but not Handle creation, and so on.
    • Constructor Detail

      • FilterUtils

        public FilterUtils()
    • Method Detail

      • getFilterFromConfiguration

        public static Filter getFilterFromConfiguration​(String property)
        Get a Filter by configuration property name For example, if a module has implemented "my-feature.filter" configuration property this method will return a filter with the ID specified by the configuration property
        Parameters:
        property - DSpace configuration property name (Apache Commons config)
        Returns:
        Filter object, with a bean ID configured for this property key, or null
      • getFilterFromConfiguration

        public static Filter getFilterFromConfiguration​(String property,
                                                        Filter defaultFilter)
        Get a Filter by configuration property name For example, if a module has implemented "my-feature.filter" configuration property this method will return a filter with the ID specified by the configuration property
        Parameters:
        property - DSpace configuration property name (Apache Commons config)
        Returns:
        Filter object, with a bean ID configured for this property key, or default filter
      • getIdentifierFilters

        public static Map<Class<? extends Identifier>,​Filter> getIdentifierFilters​(boolean inProgress)
        Get a map of identifier types and filters to use when creating workspace or archived items This is used by services installing new archived or workspace items to filter by identifier type as some filters should apply to DOI creation but not Handle creation, and so on. The in progress or archived status will be used to load the appropriate filter from configuration

        Parameters:
        inProgress -
        Returns: