-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: update get-props function to support override
- Loading branch information
Showing
4 changed files
with
41 additions
and
12 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
17 changes: 16 additions & 1 deletion
17
src/main/java/it/finanze/sanita/fse2/ms/gtw/rulesmanager/enums/ConfigItemTypeEnum.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 |
---|---|---|
@@ -1,6 +1,21 @@ | ||
package it.finanze.sanita.fse2.ms.gtw.rulesmanager.enums; | ||
|
||
import java.util.Arrays; | ||
import java.util.List; | ||
|
||
public enum ConfigItemTypeEnum { | ||
GENERIC, | ||
RULES_MANAGER, | ||
RULES_MANAGER; | ||
|
||
/** | ||
* This method may seem useless, but it has been made | ||
* to prevent relying on enum declaration order {@link ConfigItemTypeEnum#values()} | ||
* @return The config item types sort by priority | ||
*/ | ||
public static List<ConfigItemTypeEnum> priority() { | ||
List<ConfigItemTypeEnum> items = Arrays.asList(ConfigItemTypeEnum.values()); | ||
items.sort((a, b) -> a == GENERIC ? -1 : b == GENERIC ? 1 : 0); | ||
return items; | ||
} | ||
|
||
} |
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