Interface CanonicalUnit
- All Superinterfaces:
Browsable, Extensible, Identifiable, Operable, OsidObject
A Canonical Unit is an approved item to be offered.
Like all OsidObjects, CanonicalUnit is managed by its
OsidSessions and may not be accessed by concurrent processing
threads.
-
Method Summary
Modifier and TypeMethodDescriptiongetCanonicalUnitRecord(Type canonicalUnitRecordType) Gets the record corresponding to the givenCanonicalUnitrecordType.getCode()Gets the code for this canonical unit.Gets the cyclic periodIdsin which this CU can be offered.Gets the cyclic periods in which this CU can be offered.Gets the various result optionIdsallowed for results.Gets the various result options allowed for this canonical unit.Gets the sponsorIds.Gets the sponsors.getTitle()Gets the title for this canonical unit.booleanTests if this canonical has results when offered.booleanTests if this canonical has sponsors.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, isOfGenusType
-
Method Details
-
getTitle
DisplayText getTitle()Gets the title for this canonical unit.- Returns:
- the title
- Compliance:
mandatory- This method must be implemented.
-
getCode
String getCode()Gets the code for this canonical unit.- Returns:
- the code
- Compliance:
mandatory- This method must be implemented.
-
getOfferedCyclicTimePeriodIds
IdList getOfferedCyclicTimePeriodIds()Gets the cyclic periodIdsin which this CU can be offered. If there are no time cycles, then it can be offered any time.- Returns:
- a list of cyclic period
Ids - Compliance:
mandatory- This method must be implemented.
-
getOfferedCyclicTimePeriods
Gets the cyclic periods in which this CU can be offered. If there are no time cycles, then it can be offered any time.- Returns:
- a list of cyclic periods
- Throws:
OperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
hasResults
boolean hasResults()Tests if this canonical has results when offered.- Returns:
trueif this canonical has results,falseotherwise- Compliance:
mandatory- This method must be implemented.
-
getResultOptionIds
IdList getResultOptionIds()Gets the various result optionIdsallowed for results.- Returns:
- the returned list of grading option
Ids - Throws:
IllegalStateException-hasResults()isfalse- Compliance:
mandatory- This method must be implemented.
-
getResultOptions
Gets the various result options allowed for this canonical unit.- Returns:
- the returned list of grading options
- Throws:
IllegalStateException-hasResults()isfalseOperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
hasSponsors
boolean hasSponsors()Tests if this canonical has sponsors.- Returns:
trueif this canonical has sponsors,falseotherwise- Compliance:
mandatory- This method must be implemented.
-
getSponsorIds
IdList getSponsorIds()Gets the sponsorIds.- Returns:
- the sponsor
Ids - Throws:
IllegalStateException-hasSponsors()isfalse- Compliance:
mandatory- This method must be implemented.
-
getSponsors
Gets the sponsors.- Returns:
- the sponsors
- Throws:
IllegalStateException-hasSponsors()isfalseOperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
getCanonicalUnitRecord
CanonicalUnitRecord getCanonicalUnitRecord(Type canonicalUnitRecordType) throws OperationFailedException Gets the record corresponding to the givenCanonicalUnitrecordType. This method is used to retrieve an object implementing the requested record. ThecanonicalUnitRecordTypemay be theTypereturned ingetRecordTypes()or any of its parents in aTypehierarchy wherehasRecordType(canonicalUnitRecordType)istrue.- Parameters:
canonicalUnitRecordType- the type of canonical unit record to retrieve- Returns:
- the canonical unit record
- Throws:
NullArgumentException-canonicalUnitRecordTypeisnullOperationFailedException- unable to complete requestUnsupportedException-hasRecordType(canonicalUnitRecordType)isfalse- Compliance:
mandatory- This method must be implemented.
-