Interface Credential
- All Superinterfaces:
Browsable, Extensible, Identifiable, OsidObject
A Credential represents something awarded at program
completion.
-
Method Summary
Modifier and TypeMethodDescriptiongetCredentialRecord(Type credentialRecordType) Gets the credential record corresponding to the givenCredentialrecordType.Gets the lifetime of this credential once awarded.booleanTests if this credential has a limited lifetime.Methods inherited from interface Browsable
getProperties, getPropertiesByRecordTypeModifier and TypeMethodDescriptionGets a list of properties.getPropertiesByRecordType(Type recordType) Gets a list of properties corresponding to the specified record type.Methods inherited from interface Extensible
getRecordTypes, hasRecordTypeModifier and TypeMethodDescriptionGets the record types available in this object.booleanhasRecordType(Type recordType) Tests if this object supports the given recordType.Methods inherited from interface Identifiable
getId, isCurrentMethods inherited from interface OsidObject
getDescription, getDisplayName, getGenusType, isOfGenusTypeModifier and TypeMethodDescriptionGets the description associated with this instance of this OSID object.Gets the preferred display name associated with this instance of this OSID object appropriate for display to the user.Gets the genus type of this object.booleanisOfGenusType(Type genusType) Tests if this object is of the given genusType.
-
Method Details
-
hasLifeTime
boolean hasLifeTime()Tests if this credential has a limited lifetime.- Returns:
trueif this credential expires,falseif permanent- Compliance:
mandatory- This method is must be implemented.
-
getLifetime
Duration getLifetime()Gets the lifetime of this credential once awarded.- Returns:
- the lifetime
- Throws:
IllegalStateException-hasLifetime()isfalse- Compliance:
mandatory- This method must be implemented.
-
getCredentialRecord
Gets the credential record corresponding to the givenCredentialrecordType. This method is used to retrieve an object implementing the requested record. ThecredentialRecordTypemay be theTypereturned ingetRecordTypes()or any of its parents in aTypehierarchy wherehasRecordType(credentialRecordType)istrue.- Parameters:
credentialRecordType- the type of credential record to retrieve- Returns:
- the credential record
- Throws:
NullArgumentException-credentialRecordTypeisnullOperationFailedException- unable to complete requestUnsupportedException-hasRecordType(credentialRecordType)isfalse- Compliance:
mandatory- This method must be implemented.
-