From 2cb18f13ccd0bba1c2e695dea46e7e675d0679f1 Mon Sep 17 00:00:00 2001 From: Matthias Ronge Date: Tue, 23 Apr 2024 15:43:40 +0200 Subject: [PATCH] Fix checkstyle --- .../DatabaseProcessServiceInterface.java | 24 ++++++++----------- .../DatabaseTaskServiceInterface.java | 3 +-- .../SearchDatabaseServiceInterface.java | 18 +++++++++++--- 3 files changed, 26 insertions(+), 19 deletions(-) diff --git a/Kitodo/src/main/java/org/kitodo/production/services/data/interfaces/DatabaseProcessServiceInterface.java b/Kitodo/src/main/java/org/kitodo/production/services/data/interfaces/DatabaseProcessServiceInterface.java index 37a5da61f35..6e6408f4802 100644 --- a/Kitodo/src/main/java/org/kitodo/production/services/data/interfaces/DatabaseProcessServiceInterface.java +++ b/Kitodo/src/main/java/org/kitodo/production/services/data/interfaces/DatabaseProcessServiceInterface.java @@ -85,16 +85,15 @@ Long countResults(Map filters, boolean showClosedProcesses, boolean s * If batchMaxSize is configured, at most the configured number of * processes will be returned. * + * + * * @param processfilter * substring to search * @return all processes whose names contain the comparison string * @throws DAOException * in the event of a database connection error */ - /* - * To replace the existing search functionality in - * BatchForm.filterProcesses(). - */ default List filterProcesses(String processfilter) throws DAOException { int batchMaxSize = ConfigCore.getIntParameter(ParameterCore.BATCH_DISPLAY_LIMIT, -1); String query = "FROM Process WHERE title LIKE '%" + processfilter + "%'" @@ -260,14 +259,13 @@ List findLinkableParentProcesses(String searchInput, int proje * Implementation Requirements:
* This function requires that the thread is assigned to a logged-in user. * + * + * * @param title * process name to be searched for * @return number of processes with this title */ - /* - * Used to check whether a process identifier is already in use. In both - * cases, the result is only checked for > 0. - */ default Long findNumberOfProcessesWithTitle(String title) throws DataException { int sessionClientId = ServiceManager.getUserService().getSessionClientId(); String query = "FROM Process process WHERE process.title = '" + title + "' " @@ -399,6 +397,9 @@ default String getProcessDataDirectory(ProcessInterface process) { /** * Sets the record number of the process into the processBaseUri field. Can * also save the process. + * + * * * @param process * process for which the data record number should be placed in @@ -407,10 +408,6 @@ default String getProcessDataDirectory(ProcessInterface process) { * whether the process should not be saved * @return the record number in a URI object */ - /* - * Since the moment this was introduced, I've never understood why this - * exists. Nor why property processBaseUri exists at all. See #5856 - */ default URI getProcessDataDirectory(Process process, boolean forIndexingAll) { try { Integer id = process.getId(); @@ -488,8 +485,7 @@ default List getTemplateProcesses() throws DataException, DAOException * maximum number of objects to return * @param sortField * by which column the data should be sorted. Must not be - * {@code null} or empty. - *

+ * {@code null} or empty.
* One of:
*

    *
  • "id": ID
  • diff --git a/Kitodo/src/main/java/org/kitodo/production/services/data/interfaces/DatabaseTaskServiceInterface.java b/Kitodo/src/main/java/org/kitodo/production/services/data/interfaces/DatabaseTaskServiceInterface.java index ecd4bb689ff..8768bc41c38 100644 --- a/Kitodo/src/main/java/org/kitodo/production/services/data/interfaces/DatabaseTaskServiceInterface.java +++ b/Kitodo/src/main/java/org/kitodo/production/services/data/interfaces/DatabaseTaskServiceInterface.java @@ -227,8 +227,7 @@ Long countResults(Map filters, boolean onlyOwnTasks, boolean hideCorr * maximum number of objects to return * @param sortField * by which column the data should be sorted. Must not be - * {@code null} or empty. - *

    + * {@code null} or empty.
    * One of:
    *

      *
    • "title.keyword": Title
    • diff --git a/Kitodo/src/main/java/org/kitodo/production/services/data/interfaces/SearchDatabaseServiceInterface.java b/Kitodo/src/main/java/org/kitodo/production/services/data/interfaces/SearchDatabaseServiceInterface.java index 359d42c0d0e..637483cafc9 100644 --- a/Kitodo/src/main/java/org/kitodo/production/services/data/interfaces/SearchDatabaseServiceInterface.java +++ b/Kitodo/src/main/java/org/kitodo/production/services/data/interfaces/SearchDatabaseServiceInterface.java @@ -23,7 +23,7 @@ import org.primefaces.model.SortOrder; /** - * Specifies the functions of the Search Database Service + * Specifies the functions of the Search Database Service. * * @param * type of database objects @@ -162,8 +162,20 @@ public interface SearchDatabaseServiceInterface { * @param limit * maximum number of objects to return * @param sortField - * by which column the data should be sorted - * + * by which column the data should be sorted. Must not be + * {@code null} or empty.
      + * One of:
      + *
        + *
      • "title.keyword": Title [docket, ruleset, process template, + * and workflow]
      • + *
      • "file.keyword": File [docket, and ruleset]
      • + *
      • "orderMetadataByRuleset": Order metadata as in ruleset + * (otherwise alphabetically) [only ruleset]
      • + *
      • "ruleset.title.keyword": Ruleset [only process + * template]
      • + *
      • "active": Active [only process template]
      • + *
      • "status": Status [only workflow]
      • + *
      * @param sortOrder * sort ascending or descending? * @param filters