Class PerunRolesLoader

java.lang.Object
cz.metacentrum.perun.core.impl.PerunRolesLoader

public class PerunRolesLoader extends Object
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 Details

    • PerunRolesLoader

      public PerunRolesLoader()
  • Method Details

    • loadPerunRoles

      public void loadPerunRoles(JdbcPerunTemplate jdbc)
      Load perun roles from the configuration file to the database.
      Parameters:
      jdbc - connection to database
    • loadPerunPolicies

      public Set<PerunPolicy> loadPerunPolicies()
      Load policies from the configuration file as list of PerunPolicies
      Returns:
      list of PerunPolicies
    • loadPerunRolesManagement

      public Map<String,​RoleManagementRules> loadPerunRolesManagement()
      Load role management rules from the configuration file as map with RoleManagementRules' identification as key and RoleManagementRules as value.
      Returns:
      RoleManagementRules in a map.
    • setConfigurationPath

      public void setConfigurationPath(Resource configurationPath)
    • getSecondaryConfigurationPath

      public Resource getSecondaryConfigurationPath()
    • setSecondaryConfigurationPath

      public void setSecondaryConfigurationPath(Resource secondaryConfigurationPath)