Class ResourceListQueryImpl

java.lang.Object
org.opencastproject.list.impl.ResourceListQueryImpl
All Implemented Interfaces:
ResourceListQuery

public class ResourceListQueryImpl extends Object implements ResourceListQuery
  • Field Details

    • availableFilters

      protected final List<ResourceListFilter<?>> availableFilters
    • sortBy

      protected org.opencastproject.util.data.Option<String> sortBy
  • Constructor Details

    • ResourceListQueryImpl

      public ResourceListQueryImpl()
  • Method Details

    • addFilter

      public void addFilter(ResourceListFilter<?> filter)
    • removeFilter

      public void removeFilter(ResourceListFilter<?> filter)
    • setLimit

      public void setLimit(Integer limit)
    • setOffset

      public void setOffset(Integer offset)
    • getFilters

      public List<ResourceListFilter<?>> getFilters()
      Description copied from interface: ResourceListQuery
      Returns all the ResourceListFilter set for the query.
      Specified by:
      getFilters in interface ResourceListQuery
      Returns:
      all the query filters
    • getFilter

      public ResourceListFilter<?> getFilter(String name)
      Description copied from interface: ResourceListQuery
      Returns the filter with the given name
      Specified by:
      getFilter in interface ResourceListQuery
      Parameters:
      name -
      Returns:
      the query filter or null if the filter does not exist
    • getLimit

      public org.opencastproject.util.data.Option<Integer> getLimit()
      Description copied from interface: ResourceListQuery
      Returns the limit for the resource query
      Specified by:
      getLimit in interface ResourceListQuery
      Returns:
      the list limit
    • getOffset

      public org.opencastproject.util.data.Option<Integer> getOffset()
      Description copied from interface: ResourceListQuery
      Returns the offset for the resource query
      Specified by:
      getOffset in interface ResourceListQuery
      Returns:
      the list offset
    • getSortBy

      public org.opencastproject.util.data.Option<String> getSortBy()
      Description copied from interface: ResourceListQuery
      Returns the name of the field by which the list should be sorted
      Specified by:
      getSortBy in interface ResourceListQuery
      Returns:
      the name of the field to use to sort the list
    • hasFilter

      public Boolean hasFilter(String name)
      Description copied from interface: ResourceListQuery
      Returns if the given filter is or not set
      Specified by:
      hasFilter in interface ResourceListQuery
      Parameters:
      name - the filter name
      Returns:
      true if set
    • getAvailableFilters

      public List<ResourceListFilter<?>> getAvailableFilters()
      Description copied from interface: ResourceListQuery
      Returns all the available ResourceListFilter filters with this query. The objects returned in the list are simple instance without any filter value set.
      Specified by:
      getAvailableFilters in interface ResourceListQuery
      Returns:
      all the available filters
    • getFilterValue

      public <A> org.opencastproject.util.data.Option<A> getFilterValue(String name)
      Returns the filter value wrapped in an Option or none if the filter is not existing or has no value.
      Parameters:
      name - the filter name
      Returns:
      an Option wrapping the value or none.