Package org.trustdeck.configuration
Class RoleConfig
java.lang.Object
org.trustdeck.configuration.RoleConfig
Configuration class that holds the operational roles for the application.
This class is used to map configuration properties defined under the `app` prefix in the application’s
configuration file (e.g., `application.yml` or `application.properties`). It contains a list of role names
that define the operations required by the application.
For example, a configuration in `application.yml` might look like:
app:
roles:
ACE:
- domain-create
- domain-read
...
KING:
- project-create
- project-read
...
administrative:
- permission-manager
- delete-roles
- Author:
- Eric Wündisch and Armin Müller
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionRetrieves the roles for ACE.Retrieves the roles for for KING.Returns a list of all defined roles including all administrative roles.Retrieves the roles for KING.getRoleSublist(String groupName) Retrieves the roles for a group defined by it's name (e.g.
-
Field Details
-
ADMINISTRATIVE_ROLES_GROUP_KEY
The key to extract the administrative roles from the yml.- See Also:
-
ACE_ROLES_GROUP_KEY
The key to extract the ACE-specific roles from the yml.- See Also:
-
KING_ROLES_GROUP_KEY
The key to extract the KING-specific roles from the yml.- See Also:
-
-
Constructor Details
-
RoleConfig
public RoleConfig()
-
-
Method Details
-
getRoleSublist
Retrieves the roles for a group defined by it's name (e.g. "ACE").- Parameters:
groupName- the name that indicates the sublist of roles- Returns:
- a list of roles found
-
getACERoles
Retrieves the roles for ACE.- Returns:
- a list of roles found
-
getKINGRoles
Retrieves the roles for KING.- Returns:
- a list of roles found
-
getAdministrativeRoles
Retrieves the roles for for KING.- Returns:
- a list of roles found
-
getAllRoles
Returns a list of all defined roles including all administrative roles.- Returns:
- a list of all roles defined in the application.yml
-