Class ResourceAssignmentChecker


public class ResourceAssignmentChecker extends Object
This component is periodically called to search for and fix inconsistencies in automatic group-resource assignments.
Johana Supikova <>
  • Constructor Details

    • ResourceAssignmentChecker

      public ResourceAssignmentChecker(PerunBl perunBl)
  • Method Details

    • assignSubgroupsToResource

      public void assignSubgroupsToResource(Resource resource, List<AssignedGroup> automaticallyAssignedSubgroups, AssignedGroup sourceGroup)
      Filter subgroups of source group (with autoassign) which are not assigned and assign them. Runs in transaction.
      resource -
      automaticallyAssignedSubgroups -
      sourceGroup -
    • fixInconsistentGroupResourceAssignments

      @Scheduled(initialDelay=600000L, fixedDelay=3600000L) public void fixInconsistentGroupResourceAssignments()
      Waits for 10 minutes after Perun startup and then every hour checks, if all group-resource assignments are consistent, e.g. all subgroups are automatically assigned and no automatic subgroups assignments are kept after removing source group.
    • getPerunBl

      public PerunBl getPerunBl()
    • removeSubgroupFromResource

      public void removeSubgroupFromResource(Resource resource, List<AssignedGroup> sourceGroups, AssignedGroup assignedSubgroup)
      Remove assigned subgroup which source group is not assigned as source group. Runs in transaction.
      resource -
      sourceGroups -
      assignedSubgroup -
    • setPerunBl

      public void setPerunBl(PerunBl perunBl)