Skip to content

Commit

Permalink
Fix checkstyle
Browse files Browse the repository at this point in the history
  • Loading branch information
matthias-ronge committed Nov 26, 2024
1 parent 87121c4 commit 5a7969c
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 57 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
/*
* (c) Kitodo. Key to digital objects e. V. <[email protected]>
*
* This file is part of the Kitodo project.
*
* It is licensed under GNU General Public License version 3 or later.
*
* For the full copyright and license information, please read the
* GPL3-License.txt file that was distributed with this source code.
*/

package org.kitodo.production.services.data;

import java.util.Map;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,10 @@ enum FilterField {
"tasks AS task WITH task.processingStatus = :queryObject AND task.id",
"processingStatus = :queryObject AND id", TaskStatus.DONE, "searchTask", "closed"),
TASK_FINISHED_USER(
"tasks AS task WITH task.processingStatus = :queryObject AND (task.processingUser.name = # OR task.processingUser.surname = # OR task.processingUser.login = # OR task.processingUser.ldapLogin = #)",
"~.processingStatus = :queryObject AND (~.processingUser.name = # OR ~.processingUser.surname = # OR ~.processingUser.login = # OR ~.processingUser.ldapLogin = #)",
"tasks AS task WITH task.processingStatus = :queryObject AND (task.processingUser.name = # OR task.processingUser.surname = # "
.concat("OR task.processingUser.login = # OR task.processingUser.ldapLogin = #)"),
"~.processingStatus = :queryObject AND (~.processingUser.name = # OR ~.processingUser.surname = # "
.concat("OR ~.processingUser.login = # OR ~.processingUser.ldapLogin = #)"),
"tasks AS task WITH task.processingStatus = :queryObject AND task.processingUser.id",
"processingStatus = :queryObject AND processingUser.id", TaskStatus.DONE, "searchTask", "closeduser");

Expand All @@ -68,61 +70,34 @@ static FilterField ofString(String fieldName) {
return null;
}
switch (fieldName.toLowerCase()) {
case "":
return null;
case "id":
return PROCESS_ID;
case "process":
return PROCESS_TITLE;
case "project":
return PROJECT;
case "projectexact":
return PROJECT;
case "batch":
return BATCH;
case "step":
return TASK;
case "stepautomatic":
return TASK_AUTOMATIC;
case "steplocked":
return TASK_UNREADY;
case "stepopen":
return TASK_READY;
case "stepinwork":
return TASK_ONGOING;
case "stepdone":
return TASK_FINISHED;
case "stepdonetitle":
return TASK_FINISHED;
case "stepdoneuser":
return TASK_FINISHED_USER;

case "prozess":
return PROCESS_TITLE;
case "projekt":
return PROJECT;
case "projektexakt":
return PROJECT_EXACT;
case "gruppe":
return BATCH;
case "schritt":
return TASK;
case "schrittautomatisch":
return TASK_AUTOMATIC;
case "schrittgesperrt":
return TASK_UNREADY;
case "schrittoffen":
return TASK_READY;
case "schrittinarbeit":
return TASK_ONGOING;
case "schrittabgeschlossen":
return TASK_FINISHED;
case "abgeschlossenerschritttitel":
return TASK_FINISHED;
case "abgeschlossenerschrittbenutzer":
return TASK_FINISHED_USER;
default:
return null;
case "": return null;
case "id": return PROCESS_ID;
case "process": return PROCESS_TITLE;
case "project": return PROJECT;
case "projectexact": return PROJECT;
case "batch": return BATCH;
case "step": return TASK;
case "stepautomatic": return TASK_AUTOMATIC;
case "steplocked": return TASK_UNREADY;
case "stepopen": return TASK_READY;
case "stepinwork": return TASK_ONGOING;
case "stepdone": return TASK_FINISHED;
case "stepdonetitle": return TASK_FINISHED;
case "stepdoneuser": return TASK_FINISHED_USER;

case "prozess": return PROCESS_TITLE;
case "projekt": return PROJECT;
case "projektexakt": return PROJECT_EXACT;
case "gruppe": return BATCH;
case "schritt": return TASK;
case "schrittautomatisch": return TASK_AUTOMATIC;
case "schrittgesperrt": return TASK_UNREADY;
case "schrittoffen": return TASK_READY;
case "schrittinarbeit": return TASK_ONGOING;
case "schrittabgeschlossen": return TASK_FINISHED;
case "abgeschlossenerschritttitel": return TASK_FINISHED;
case "abgeschlossenerschrittbenutzer": return TASK_FINISHED_USER;
default: return null;
}
}

Expand Down

0 comments on commit 5a7969c

Please sign in to comment.