Interface AwardRequirement

All Superinterfaces:
Aggregateable, Browsable, Extensible, Identifiable, Operable, OsidObject, OsidRule

public interface AwardRequirement extends OsidRule, Aggregateable

A AwardRequirement is an OsidRule and represents a requirement based on a set of Awards.

Like all OsidObjects, AwardRequirement is managed by its OsidSessions and may not be accessed by concurrent processing threads.

  • Method Details

    • getAltRequisiteIds

      Id[] getAltRequisiteIds()
      Gets the Ids of any Requisites that may be substituted in place of this AwardRequirement.
      Returns:
      the alternate requisite Ids
      Compliance:
      mandatory - This method must be implemented.
    • getAltRequisites

      Requisite[] getAltRequisites() throws OperationFailedException
      Gets any Requisites that may be substituted in place of this AwardRequirement. All Requisites must be satisifed to be a substitute for this award requirement. Inactive Requisites are not evaluated but if no active requisite exists, then this term is ignored.
      Returns:
      the alternate requisites
      Throws:
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • getAwardIds

      IdList getAwardIds()
      Gets the Ids of the Awards.
      Returns:
      the award Ids
      Compliance:
      mandatory - This method must be implemented.
    • getAwards

      Gets the Awards. If requiresMinimumNumber() is false, then all Awards in this set must be completed for this requirement.
      Returns:
      the awards
      Throws:
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • requiresMinimumNumber

      boolean requiresMinimumNumber()
      Tests if a minimum number of Awards from the set must be completed to satisfy this AwardRequirement.
      Returns:
      true if a minimum number of awards is required, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getMinimumNumber

      long getMinimumNumber()
      The minimum number of Awards in this AwardRequirement to complete from the set.
      Returns:
      the minimum number of awards
      Throws:
      IllegalStateException - requiresMinimumNumber() is false
      Compliance:
      mandatory - This method must be implemented.
    • hasTargetNumberForSet

      boolean hasTargetNumberForSet()
      Tests if the set should contain a minimum number of Awards to be a valid requirement.
      Returns:
      true if the set has a minimum award count, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getTargetSetNumber

      long getTargetSetNumber()
      The minimum number of awards in the set to be a valid requirement.
      Returns:
      the minimum number of awards in the set
      Throws:
      IllegalStateException - hasTargetNumberForSet() is false
      Compliance:
      mandatory - This method must be implemented.
    • hasTimeframe

      boolean hasTimeframe()
      Tests if the award must have been earned within the required duration.
      Returns:
      true if the award has to be earned within a required time, false if it could have been completed at any time in the past
      Compliance:
      mandatory - This method must be implemented.
    • getTimeframe

      Duration getTimeframe()
      Gets the timeframe in which the award has to be earned. A negative duration indicates the award had to be completed within the specified amount of time in the past. A posiitive duration indicates the award must be completed within the specified amount of time in the future. A zero duration indicates the award must be completed in the current term.
      Returns:
      the time frame
      Throws:
      IllegalStateException - hasTimeframe() is false
      Compliance:
      mandatory - This method must be implemented.
    • getAwardRequirementRecord

      AwardRequirementRecord getAwardRequirementRecord(Type awardRequirementRecordType) throws OperationFailedException
      Gets the award requirement record corresponding to the given AwardRequirement record Type. This method is used to retrieve an object implementing the requested record. The awardRequirementRecordType may be the Type returned in getRecordTypes() or any of its parents in a Type hierarchy where hasRecordType(awardRequirementRecordType) is true.
      Parameters:
      awardRequirementRecordType - the type of award requirement record to retrieve
      Returns:
      the award requirement record
      Throws:
      NullArgumentException - awardRequirementRecordType is null
      OperationFailedException - unable to complete request
      UnsupportedException - hasRecordType(awardRequirementRecordType) is false
      Compliance:
      mandatory - This method must be implemented.