Package cz.metacentrum.perun.core.impl
Class PerunRolesLoader
java.lang.Object
cz.metacentrum.perun.core.impl.PerunRolesLoader
The purpose of the PerunRolesLoader is to load perun roles and other policies from the perun-roles.yml configuration
 file.
 
Production configuration file is located in /etc/perun/perun-roles.yml Configuration file which is used during the build is located in perun-base/src/test/resources/perun-roles.yml
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionloadPerunPolicies(List<String> roles) Load policies from the configuration file as list of PerunPoliciesLoad perun roles from the configuration file to the database.loadPerunRolesManagement(List<String> availableRoleNames) Load role management rules from the configuration file as map with RoleManagementRules' identification as key and RoleManagementRules as value.voidsetConfigurationPath(Resource configurationPath) voidsetSecondaryConfigurationPath(Resource secondaryConfigurationPath) 
- 
Constructor Details- 
PerunRolesLoaderpublic PerunRolesLoader()
 
- 
- 
Method Details- 
getSecondaryConfigurationPath
- 
loadPerunPoliciesLoad policies from the configuration file as list of PerunPolicies- Parameters:
- roles- the list of role names used to check the correctness of rules
- Returns:
- list of PerunPolicies
 
- 
loadPerunRolesLoad perun roles from the configuration file to the database.- Parameters:
- jdbc- connection to database
- Returns:
- up-to-date list of role names
 
- 
loadPerunRolesManagementLoad role management rules from the configuration file as map with RoleManagementRules' identification as key and RoleManagementRules as value.- Parameters:
- availableRoleNames- available role names in perun to check the role names correctness when parsing the file
- Returns:
- RoleManagementRules in a map.
 
- 
setConfigurationPath
- 
setSecondaryConfigurationPath
 
-