Package org.openbravo.role.inheritance
Class RoleInheritanceManager
- java.lang.Object
-
- org.openbravo.role.inheritance.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 Summary
Constructors Constructor Description RoleInheritanceManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
recalculateAccessFromTemplate(Role template, String classCanonicalName)
Recalculates the accesses of a particular class, for those roles using as template the role passed as parameterMap<String,org.openbravo.role.inheritance.RoleInheritanceManager.CalculationResult>
recalculateAllAccessesForRole(Role role)
Set<Role>
recalculateAllAccessesFromTemplate(Role template)
Recalculates all accesses for those roles using as template the role passed as parameter
-
-
-
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 * @paramclassCanonicalName
- the name of the class
-
-