Skip to content

Commit

Permalink
Fix checkstyle - Kitodo-Core
Browse files Browse the repository at this point in the history
  • Loading branch information
matthias-ronge committed Aug 30, 2024
1 parent d690db2 commit d710bcc
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 56 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,15 @@ public List<Process> loadData(int first, int pageSize, String sortField,
* <p>
* <b>Implementation Requirements:</b><br>
* This function requires that the thread is assigned to a logged-in user.
*
*
* <!-- Here, an additional function loadData() is specified with additional
* parameters, and the generally specified function from
* SearchDatabaseServiceInterface is not used. However, in
* DatabaseTemplateServiceInterface, a value is set that affects the
* generally specified functions countResults() and loadData() in
* SearchDatabaseServiceInterface. This could be equalized at some point in
* the future. -->
*
* @param offset
* number of objects to be skipped at the list head
* @param limit
Expand All @@ -444,19 +452,19 @@ public List<Process> loadData(int first, int pageSize, String sortField,
* {@code null} or empty.
*
* <p>
* One of:
* <ul>
* <li>"id": ID</li>
* <li>"title.keyword": Process title</li>
* <li>"progressCombined": Status</li>
* <li>"lastEditingUser": Last editing user</li>
* <li>"processingBeginLastTask": Processing begin of last
* task</li>
* <li>"processingEndLastTask": Processing end of last task</li>
* <li>"correctionCommentStatus": Comments</li>
* <li>"project.title.keyword": Project</li>
* <li>"creationDate": Duration [sic!]</li>
* </ul>
* One of:
* <ul>
* <li>"id": ID</li>
* <li>"title.keyword": Process title</li>
* <li>"progressCombined": Status</li>
* <li>"lastEditingUser": Last editing user</li>
* <li>"processingBeginLastTask": Processing begin of last task</li>
* <li>"processingEndLastTask": Processing end of last task</li>
* <li>"correctionCommentStatus": Comments</li>
* <li>"project.title.keyword": Project</li>
* <li>"creationDate": Duration [sic!]</li>
* </ul>
*
* @param sortOrder
* sort ascending or descending?
* @param filters
Expand All @@ -472,15 +480,6 @@ public List<Process> loadData(int first, int pageSize, String sortField,
* @throws DataException
* if processes cannot be loaded from search index
*/
/*
* Here, an additional function loadData() is specified with additional
* parameters, and the generally specified function from
* SearchDatabaseServiceInterface is not used. However, in
* DatabaseTemplateServiceInterface, a value is set that affects the
* generally specified functions countResults() and loadData() in
* SearchDatabaseServiceInterface. This could be equalized at some point in
* the future.
*/
public List<Process> loadData(int first, int pageSize, String sortField, SortOrder sortOrder, Map<?, String> filters,
boolean showClosedProcesses, boolean showInactiveProjects) throws DataException {
BeanQuery query = new BeanQuery(Process.class);
Expand Down Expand Up @@ -561,15 +560,14 @@ public List<Process> findByMetadata(Map<String, String> metadata) throws DataExc
/**
* Determines all processes with a specific docket.
*
* <!-- Used in DocketForm to find out whether a docket is used in a
* process. (Then it may not be deleted.) Is only checked for isEmpty(). -->
*
* @param docketId
* record number of the docket
* @return list that is not empty if something was found, otherwise empty
* list
*/
/*
* Used in DocketForm to find out whether a docket is used in a process.
* (Then it may not be deleted.) Is only checked for isEmpty().
*/
public Collection<?> findByDocket(int docketId) throws DataException {
BeanQuery query = new BeanQuery(Process.class);
query.addIntegerRestriction("docket.id", docketId);
Expand All @@ -579,17 +577,17 @@ public Collection<?> findByDocket(int docketId) throws DataException {
/**
* Determines all processes with a specific production template.
*
* <!-- Used in TemplateForm to find out whether a production template is
* used in a process. (Then it may not be deleted.) Is only checked for
* isEmpty(). -->
*
* @param templateId
* record number of the production template
* @return list that is not empty if something was found, otherwise empty
* list
* @throws DataException
* if an error occurred during the search
*/
/*
* Used in TemplateForm to find out whether a production template is used in
* a process. (Then it may not be deleted.) Is only checked for isEmpty().
*/
public Collection<?> findByTemplate(int templateId) throws DataException {
BeanQuery query = new BeanQuery(Process.class);
query.addIntegerRestriction("template.id", templateId);
Expand Down Expand Up @@ -617,15 +615,14 @@ public Collection<Process> findByTitle(String title) throws DataException {
/**
* Determines all processes with a specific ruleset.
*
* <!-- Used in RulesetForm to find out whether a ruleset is used in a
* process. (Then it may not be deleted.) Is only checked for isEmpty(). -->
*
* @param rulesetId
* record number of the ruleset
* @return list that is not empty if something was found, otherwise empty
* list
*/
/*
* Used in RulesetForm to find out whether a ruleset is used in a process.
* (Then it may not be deleted.) Is only checked for isEmpty().
*/
public Collection<?> findByRuleset(int rulesetId) throws DataException {
BeanQuery query = new BeanQuery(Process.class);
query.addIntegerRestriction("ruleset.id", rulesetId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,14 @@ public Long countResults(Map filters) throws DataException {
* <b>Implementation Requirements:</b><br>
* This function requires that the thread is assigned to a logged-in user.
*
* <!-- Here, an additional function countResults() is specified with
* additional parameters, and the generally specified function from
* SearchDatabaseServiceInterface is not used. However, in
* DatabaseTemplateServiceInterface, a value is set that affects the
* generally specified functions countResults() and loadData() in
* SearchDatabaseServiceInterface. This could be equalized at some point in
* the future. -->
*
* @param filters
* a map with exactly one entry, only the value is important, in
* which the content of the filter field is passed
Expand All @@ -160,15 +168,6 @@ public Long countResults(Map filters) throws DataException {
* @throws DataException
* index access error
*/
/*
* Here, an additional function countResults() is specified with additional
* parameters, and the generally specified function from
* SearchDatabaseServiceInterface is not used. However, in
* DatabaseTemplateServiceInterface, a value is set that affects the
* generally specified functions countResults() and loadData() in
* SearchDatabaseServiceInterface. This could be equalized at some point in
* the future.
*/
public Long countResults(Map<?, String> filters, boolean onlyOwnTasks, boolean hideCorrectionTasks,
boolean showAutomaticTasks, List<TaskStatus> taskStatus)
throws DataException {
Expand Down Expand Up @@ -196,6 +195,14 @@ public List<Task> loadData(int first, int pageSize, String sortField, SortOrder
* <b>API Note:</b><br>
* This function filters the data according to the client, for which the
* logged in user is currently working.
*
* <!-- Here, an additional function loadData() is specified with additional
* parameters, and the generally specified function from
* SearchDatabaseServiceInterface is not used. However, in
* DatabaseTemplateServiceInterface, a value is set that affects the
* generally specified functions countResults() and loadData() in
* SearchDatabaseServiceInterface. This could be equalized at some point in
* the future. -->
*
* <p>
* <b>Implementation Requirements:</b><br>
Expand Down Expand Up @@ -242,15 +249,6 @@ public List<Task> loadData(int first, int pageSize, String sortField, SortOrder
* @throws DataException
* if processes cannot be loaded from search index
*/
/*
* Here, an additional function loadData() is specified with additional
* parameters, and the generally specified function from
* SearchDatabaseServiceInterface is not used. However, in
* DatabaseTemplateServiceInterface, a value is set that affects the
* generally specified functions countResults() and loadData() in
* SearchDatabaseServiceInterface. This could be equalized at some point in
* the future.
*/
public List<Task> loadData(int first, int pageSize, String sortField, SortOrder sortOrder, Map<?, String> filters,
boolean onlyOwnTasks, boolean hideCorrectionTasks, boolean showAutomaticTasks,
List<TaskStatus> taskStatus)
Expand Down Expand Up @@ -645,8 +643,8 @@ public List<Task> getCurrentTasksOfBatch(String title, Integer batchId) {
* record number of the process whose tasks are being searched
* @return the tasks in between
*/
public List<Task> getAllTasksInBetween(Integer orderingMax, Integer orderingMin, Integer processId) {
return dao.getAllTasksInBetween(orderingMax, orderingMin, processId);
public List<Task> getAllTasksInBetween(Integer previousOrdering, Integer laterOrdering, Integer processId) {
return dao.getAllTasksInBetween(previousOrdering, laterOrdering, processId);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public SearchDatabaseService(S dao) {
* @throws DataException
* if processes cannot be loaded from search index
*/
public abstract List loadData(int first, int pageSize, String sortField, SortOrder sortOrder, Map<?, String> filters)
public abstract List loadData(int offset, int limit, String sortField, SortOrder sortOrder, Map<?, String> filters)
throws DataException;

/**
Expand Down

0 comments on commit d710bcc

Please sign in to comment.