Interface RequirementRuleService

All Known Implementing Classes:
RequirementRuleServiceImpl

public interface RequirementRuleService
  • Method Details

    • linkRequirementRules

      void linkRequirementRules(EntityList sourceEntities, EntityList requirementPackages)
      Connect all the requirement rules with given single source entity. A requirement entity is created for each rule in the given requirement packages. If a rule is present in multiple packages only a single requirement entity is created. Each requirement entity knows from which package it originated.
      Parameters:
      sourceEntities - Entities of model 'Schooling' or 'Registration'
      requirementPackages - the requirement packages from which to load the rules to be used
    • linkRequirementRulesForSingleEntity

      void linkRequirementRulesForSingleEntity(Entity sourceEntity, EntityList requirementPackages)
      Parameters:
      sourceEntity - Single entity of model 'Schooling' or 'Registration'
      requirementPackages - the Requirement_packages from which to load the rules to be used
    • getValidSchoolings

      EntityList getValidSchoolings(Entity courseOfStudy)
      Return all schooling entites which are linked with given course of study and have an empty end date or in future
      Parameters:
      courseOfStudy - Source course of study entity
      Returns:
      EntityList with valid schooling entities
    • getValidRegistrations

      EntityList getValidRegistrations(Entity event)
      Return all registrations for given event entity which have status 'registered' or 'booked'
      Parameters:
      event - Source event entity
      Returns:
      EntityList with valid registration entities
    • removeRequirementPackage

      void removeRequirementPackage(EntityList sources, Entity requirementPackage)
      removes Requirement_packages from Requirements that were generated on sources. If the Requirements have any other status than 'open' a confirmation is sent to the user before anything else is done. Afterwards the Requirement_package is removed from Requirement_relRequirement_package. If that Requirement_package is the last one on the Requirement, it is deleted.
      Parameters:
      sources - the sources from which to load Requirements
      requirementPackage - the Requirement to remove
    • filterOpenRequirements

      EntityList filterOpenRequirements(EntityList requirements)
      filter out all Requirements that aren't open
      Parameters:
      requirements - the Requirements to filter
      Returns:
      a list of Requirements with any status other than 'open'
    • confirmRequirementAdjustements

      boolean confirmRequirementAdjustements(EntityList requirements)
      send the user a confirmation question if the Requirements should actually be updated
      Parameters:
      requirements - the Requirements to list in the question
      Returns:
      the answer from the user