Interface AwardRequirement
- All Superinterfaces:
Aggregateable, Browsable, Extensible, Identifiable, Operable, OsidObject, OsidRule
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 Summary
Modifier and TypeMethodDescriptionId[]Gets theIdsof anyRequisitesthat may be substituted in place of thisAwardRequirement.Gets anyRequisitesthat may be substituted in place of thisAwardRequirement.Gets theIdsof theAwards.getAwardRequirementRecord(Type awardRequirementRecordType) Gets the award requirement record corresponding to the givenAwardRequirementrecordType.Gets theAwards.longThe minimum number ofAwardsin thisAwardRequirementto complete from the set.longThe minimum number of awards in the set to be a valid requirement.Gets the timeframe in which the award has to be earned.booleanTests if the set should contain a minimum number ofAwardsto be a valid requirement.booleanTests if the award must have been earned within the required duration.booleanTests if a minimum number ofAwardsfrom the set must be completed to satisfy thisAwardRequirement.Methods inherited from interface Browsable
getProperties, getPropertiesByRecordTypeMethods inherited from interface Extensible
getRecordTypes, hasRecordTypeMethods inherited from interface Identifiable
getId, isCurrentMethods inherited from interface Operable
isActive, isDisabled, isEnabled, isOperationalMethods inherited from interface OsidObject
getDescription, getDisplayName, getGenusType, isOfGenusTypeMethods inherited from interface OsidRule
getConditionRecordTypes, getRule, getRuleId, hasRule
-
Method Details
-
getAltRequisiteIds
Id[] getAltRequisiteIds()Gets theIdsof anyRequisitesthat may be substituted in place of thisAwardRequirement.- Returns:
- the alternate requisite
Ids - Compliance:
mandatory- This method must be implemented.
-
getAltRequisites
Gets anyRequisitesthat may be substituted in place of thisAwardRequirement. AllRequisitesmust be satisifed to be a substitute for this award requirement. InactiveRequisitesare 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 theIdsof theAwards.- Returns:
- the award
Ids - Compliance:
mandatory- This method must be implemented.
-
getAwards
Gets theAwards. IfrequiresMinimumNumber()isfalse, then allAwardsin 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 ofAwardsfrom the set must be completed to satisfy thisAwardRequirement.- Returns:
trueif a minimum number of awards is required,falseotherwise- Compliance:
mandatory- This method must be implemented.
-
getMinimumNumber
long getMinimumNumber()The minimum number ofAwardsin thisAwardRequirementto complete from the set.- Returns:
- the minimum number of awards
- Throws:
IllegalStateException-requiresMinimumNumber()isfalse- Compliance:
mandatory- This method must be implemented.
-
hasTargetNumberForSet
boolean hasTargetNumberForSet()Tests if the set should contain a minimum number ofAwardsto be a valid requirement.- Returns:
trueif the set has a minimum award count,falseotherwise- 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()isfalse- Compliance:
mandatory- This method must be implemented.
-
hasTimeframe
boolean hasTimeframe()Tests if the award must have been earned within the required duration.- Returns:
trueif the award has to be earned within a required time,falseif 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()isfalse- Compliance:
mandatory- This method must be implemented.
-
getAwardRequirementRecord
AwardRequirementRecord getAwardRequirementRecord(Type awardRequirementRecordType) throws OperationFailedException Gets the award requirement record corresponding to the givenAwardRequirementrecordType. This method is used to retrieve an object implementing the requested record. TheawardRequirementRecordTypemay be theTypereturned ingetRecordTypes()or any of its parents in aTypehierarchy wherehasRecordType(awardRequirementRecordType)istrue.- Parameters:
awardRequirementRecordType- the type of award requirement record to retrieve- Returns:
- the award requirement record
- Throws:
NullArgumentException-awardRequirementRecordTypeisnullOperationFailedException- unable to complete requestUnsupportedException-hasRecordType(awardRequirementRecordType)isfalse- Compliance:
mandatory- This method must be implemented.
-