Interface Commission

All Superinterfaces:
Browsable, Extensible, Identifiable, OsidObject, OsidRelationship, Temporal

public interface Commission extends OsidRelationship

A Commission represents a commitment of a resource for work. A commission may also specify a competency to qualify the work performed. The effective dates of the relationship specify the duration of the commission.

  • Method Details

    • getResourceId

      Id getResourceId()
      Gets the Id of the commissioned resource.
      Returns:
      the resource Id
      Compliance:
      mandatory - This method must be implemented.
    • getResource

      Resource getResource() throws OperationFailedException
      Gets the commissioned resource.
      Returns:
      the resource
      Throws:
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • getWorkId

      Id getWorkId()
      Gets the Id of the work.
      Returns:
      the work Id
      Compliance:
      mandatory - This method must be implemented.
    • getWork

      Work getWork() throws OperationFailedException
      Gets the work.
      Returns:
      the work
      Throws:
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • isCompetent

      boolean isCompetent()
      Tests if a competency is specified for this commission.
      Returns:
      true if a competency is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getCompetencyId

      Id getCompetencyId()
      Gets the competency Id .
      Returns:
      the competency Id
      Throws:
      IllegalStateException - isCompetent() is false
      Compliance:
      mandatory - This method must be implemented.
    • getCompetency

      Competency getCompetency() throws OperationFailedException
      Gets the competency.
      Returns:
      the competency
      Throws:
      IllegalStateException - isCompetent() is false
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • getPercentage

      long getPercentage()
      Gets the percentage commitment.
      Returns:
      the percentage commitment
      Compliance:
      mandatory - This method must be implemented.
    • getCommissionRecord

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