Class PerunPoliciesContainer

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

public class PerunPoliciesContainer extends Object
PerunPoliciesContainer stores a list of perun policies and map of role management rules..
  • Constructor Details

    • PerunPoliciesContainer

      public PerunPoliciesContainer()
  • Method Details

    • setPerunPolicies

      public void setPerunPolicies(Set<PerunPolicy> perunPolicies)
    • setRolesManagementRules

      public void setRolesManagementRules(Map<String,​RoleManagementRules> rolesManagementRules)
    • getPerunPolicy

      public PerunPolicy getPerunPolicy(String policyName) throws PolicyNotExistsException
      Get PerunPolicy for the policy name from the PerunPoliciesContainer
      Parameters:
      policyName - for which will be the policy fetched
      Returns:
      PerunPolicy for the role name
      Throws:
      PolicyNotExistsException - of there is no policy for the policy name
    • getRoleManagementRules

      public RoleManagementRules getRoleManagementRules(String roleName) throws RoleManagementRulesNotExistsException
      Get RoleManagementRules for the role name from the PerunPoliciesContainer
      Parameters:
      roleName - for which will be the rules fetched
      Returns:
      RoleManagementRules for the role name
      Throws:
      RoleManagementRulesNotExistsException - of there are no rules for the role name
    • fetchPolicyWithAllIncludedPolicies

      public List<PerunPolicy> fetchPolicyWithAllIncludedPolicies(String policyName) throws PolicyNotExistsException
      Fetch policy and all its (also nested) included policies. Method detects and skips cycles.
      Parameters:
      policyName - is a policy definition for which will be policy and its all included policies fetched.
      Returns:
      all included policies together with the policy defined by policyName.
      Throws:
      PolicyNotExistsException - when the given policyName does not exist in the PerunPoliciesContainer.
    • getAllPolicies

      public Set<PerunPolicy> getAllPolicies()
      Return all loaded perun policies.
      Returns:
      all loaded policies
    • getAllRolesManagementRules

      public List<RoleManagementRules> getAllRolesManagementRules()
      Return all loaded roles management rules.
      Returns:
      all roles management rules