Interface Credential

All Superinterfaces:
Browsable, Extensible, Identifiable, OsidObject

public interface Credential extends OsidObject

A Credential represents something awarded at program completion.

  • Method Details

    • hasLifeTime

      boolean hasLifeTime()
      Tests if this credential has a limited lifetime.
      Returns:
      true if this credential expires, false if 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() is false
      Compliance:
      mandatory - This method must be implemented.
    • getCredentialRecord

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