This commit is contained in:
Anthony Stirling
2023-08-13 22:46:18 +01:00
parent cadc8e499d
commit 35a998b934
6 changed files with 68 additions and 11 deletions

View File

@@ -38,6 +38,13 @@ public enum Role {
return webCallsPerDay;
}
public static Role fromString(String roleId) {
for (Role role : Role.values()) {
if (role.getRoleId().equalsIgnoreCase(roleId)) {
return role;
}
}
throw new IllegalArgumentException("No Role defined for id: " + roleId);
}
}