-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* MODFEE-243 implemented (#219) (cherry picked from commit 1736520) * MODFEE-243 - Prevent deleting/updating required FeeFines (#221) * Fixed validation logic and refactored test * Test is fixed * Tests are optimized * Tests are fixed * MODFEE-243 Refactor * MODFEE-243 Extend tests * Tests are fixed * refactored according to review * refactored * refactored Co-authored-by: Alexander Kurash <[email protected]> (cherry picked from commit e24143e) * bugfix-release-17.1.1 cherry pick from MODFEE-247, MODFEE-243 * Update NEWS * [maven-release-plugin] prepare release v17.1.1 * [maven-release-plugin] prepare for next development iteration Co-authored-by: OleksandrVidinieiev <[email protected]>
- Loading branch information
1 parent
d740c31
commit bf5ecec
Showing
13 changed files
with
188 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,7 +50,7 @@ | |
"provides":[ | ||
{ | ||
"id":"feesfines", | ||
"version":"17.1", | ||
"version":"17.2", | ||
"handlers":[ | ||
{ | ||
"methods":[ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
src/main/java/org/folio/rest/domain/AutomaticFeeFineType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package org.folio.rest.domain; | ||
|
||
import java.util.HashMap; | ||
import java.util.Map; | ||
|
||
public enum AutomaticFeeFineType { | ||
// IDs come from /resources/templates/db_scripts/populate-feefines.sql | ||
|
||
OVERDUE_FINE("9523cb96-e752-40c2-89da-60f3961a488d"), | ||
REPLACEMENT_PROCESSING_FEE("d20df2fb-45fd-4184-b238-0d25747ffdd9"), | ||
LOST_ITEM_FEE("cf238f9f-7018-47b7-b815-bb2db798e19f"), | ||
LOST_ITEM_PROCESSING_FEE("c7dede15-aa48-45ed-860b-f996540180e0"); | ||
|
||
private final String id; | ||
private static final Map<String, AutomaticFeeFineType> idIndex = new HashMap<>(AutomaticFeeFineType.values().length); | ||
|
||
static { | ||
for (AutomaticFeeFineType automaticFeeFineType : AutomaticFeeFineType.values()) { | ||
idIndex.put(automaticFeeFineType.id, automaticFeeFineType); | ||
} | ||
} | ||
|
||
AutomaticFeeFineType(String id) { | ||
this.id = id; | ||
} | ||
|
||
public String getId() { | ||
return id; | ||
} | ||
|
||
public static AutomaticFeeFineType getById(String id) { | ||
return idIndex.get(id); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.