Class AbstractPagingAndSortingController

java.lang.Object
de.digitalcollections.commons.springmvc.controller.AbstractController
de.digitalcollections.cudami.admin.controller.AbstractPagingAndSortingController
Direct Known Subclasses:
AbstractUniqueObjectController

public abstract class AbstractPagingAndSortingController extends de.digitalcollections.commons.springmvc.controller.AbstractController
  • Field Details

  • Constructor Details

    • AbstractPagingAndSortingController

      public AbstractPagingAndSortingController(LanguageService languageService)
  • Method Details

    • createBTRequest

      protected BTRequest createBTRequest(Class targetClass, int offset, int limit, String sortProperty, String sortOrder, String searchProperty, String searchTerm, String dataLanguage) throws de.digitalcollections.model.exception.TechnicalException, IllegalArgumentException
      Throws:
      de.digitalcollections.model.exception.TechnicalException
      IllegalArgumentException
    • createPageRequest

      protected de.digitalcollections.model.list.paging.PageRequest createPageRequest(Class targetClass, int pageNumber, int pageSize, String sortProperty, String sortOrder, String searchProperty, String searchTerm, String dataLanguage) throws de.digitalcollections.model.exception.TechnicalException
      Throws:
      de.digitalcollections.model.exception.TechnicalException
    • createPageRequest

      protected de.digitalcollections.model.list.paging.PageRequest createPageRequest(Class targetClass, int pageNumber, int pageSize, List<de.digitalcollections.model.list.sorting.Order> sortBy, String searchProperty, String searchTerm, String dataLanguage) throws de.digitalcollections.model.exception.TechnicalException
      Throws:
      de.digitalcollections.model.exception.TechnicalException
    • getDataLanguage

      protected String getDataLanguage(String targetDataLanguage, LanguageService languageService) throws de.digitalcollections.model.exception.TechnicalException
      Throws:
      de.digitalcollections.model.exception.TechnicalException
    • getDataLanguage

      protected String getDataLanguage(String targetDataLanguage, List<Locale> existingLanguages, LanguageService languageService) throws de.digitalcollections.model.exception.TechnicalException
      Throws:
      de.digitalcollections.model.exception.TechnicalException
    • getFieldType

      public static Class getFieldType(Class clz, String fieldName) throws NoSuchFieldException
      Get Class of a field of a given class.
      Parameters:
      clz - class to search in
      fieldName - name of field
      Returns:
      Class/Type of field (if found)
      Throws:
      NoSuchFieldException - thrown if not found