Class RoleInheritanceManager


  • @ApplicationScoped
    public class RoleInheritanceManager
    extends Object
    This class contains all the methods required to manage the Role Inheritance functionality. It is not intended to handle large volumes of objects (permissions) within this class. For this reason it makes use of DAL lists instead of ScrollableResults.
    • Constructor Detail

      • RoleInheritanceManager

        public RoleInheritanceManager()
    • Method Detail

      • recalculateAllAccessesFromTemplate

        public Set<Role> recalculateAllAccessesFromTemplate​(Role template)
        Recalculates all accesses for those roles using as template the role passed as parameter
        Parameters:
        template - The template role used by the roles whose accesses will be recalculated
        Returns:
        a set of the child roles which have accesses that have been updated or created
      • recalculateAllAccessesForRole

        public Map<String,​org.openbravo.role.inheritance.RoleInheritanceManager.CalculationResult> recalculateAllAccessesForRole​(Role role)
        Parameters:
        role - The role whose accesses will be recalculated
        Returns:
        a map with the number of accesses updated and created for every access type
        See Also:
        recalculateAllAccessesForRole(Role, boolean)
      • recalculateAccessFromTemplate

        public void recalculateAccessFromTemplate​(Role template,
                                                  String classCanonicalName)
        Recalculates the accesses of a particular class, for those roles using as template the role passed as parameter
        Parameters:
        template - The template role used by the roles whose accesses will be recalculated * @param
        classCanonicalName - the name of the class