Interface Provision

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

public interface Provision extends OsidRelationship

A Provision is a relationship between a provisionable and a recipient governed by a broker.

  • Method Details

    • getBrokerId

      Id getBrokerId()
      Gets the Id of the broker.
      Returns:
      the broker Id
      Compliance:
      mandatory - This method must be implemented.
    • getBroker

      Broker getBroker() throws OperationFailedException
      Gets the broker.
      Returns:
      the broker
      Throws:
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • getProvisionableId

      Id getProvisionableId()
      Gets the Id of the provisionable.
      Returns:
      the provisionable Id
      Compliance:
      mandatory - This method must be implemented.
    • getProvisionable

      Provisionable getProvisionable() throws OperationFailedException
      Gets the provisionable.
      Returns:
      the provisionable
      Throws:
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • getRecipientId

      Id getRecipientId()
      Gets the Id of the recipient.
      Returns:
      the resource Id
      Compliance:
      mandatory - This method must be implemented.
    • getRecipient

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

      boolean provisionedByRequest()
      Tests if this provision has a request.
      Returns:
      true if a request is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getRequestId

      Id getRequestId()
      Gets the Id of the request.
      Returns:
      the request Id
      Throws:
      IllegalStateException - provisionedByRequest() is false
      Compliance:
      mandatory - This method must be implemented.
    • getRequest

      Request getRequest() throws OperationFailedException
      Gets the request.
      Returns:
      the request
      Throws:
      IllegalStateException - provisionedByRequest() is false
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • getProvisionDate

      DateTime getProvisionDate()
      Gets the date this was provisioned. The provision date may differ from the effective dates of this provision.
      Returns:
      the provision date
      Compliance:
      mandatory - This method must be implemented.
    • isLeased

      boolean isLeased()
      Tests if this provision is temporary. The lease ends when the provision expires or is returned.
      Returns:
      true if this is a lease, false if the provision is permanent
      Compliance:
      mandatory - This method must be implemented.
    • mustReturn

      boolean mustReturn()
      Tests if this provision is must be returned.
      Returns:
      true if this is must be returned, false otherwise
      Throws:
      IllegalStateException - isLeased() is false
      Compliance:
      mandatory - This method must be implemented.
    • hasDueDate

      boolean hasDueDate()
      Tests if this provision is must be returned and has a due date.
      Returns:
      true if this is must be returned, false otherwise
      Throws:
      IllegalStateException - mustReturn() is false
      Compliance:
      mandatory - This method must be implemented.
    • getDueDate

      DateTime getDueDate()
      Gets the due date for the return.
      Returns:
      the due date
      Throws:
      IllegalStateException - hasDueDate() is false
      Compliance:
      mandatory - This method must be implemented.
    • hasCost

      boolean hasCost()
      Tests if this provision has a total cost. If this is a lease with an expected return than it is the cost for the time period.
      Returns:
      true if there is a cost, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getCost

      Currency getCost()
      Gets the cost.
      Returns:
      the cost
      Throws:
      IllegalStateException - hasCost() is false
      Compliance:
      mandatory - This method must be implemented.
    • hasRate

      boolean hasRate()
      Tests if this provision has a rate per time period.
      Returns:
      true if there is a rate, false otherwise
      Throws:
      IllegalStateException - hasRate() is false
      Compliance:
      mandatory - This method must be implemented.
    • getRateAmount

      Currency getRateAmount()
      Gets the rate amount.
      Returns:
      the rate amount
      Throws:
      IllegalStateException - hasRate() is false
      Compliance:
      mandatory - This method must be implemented.
    • getRatePeriod

      Duration getRatePeriod()
      Gets the rate period.
      Returns:
      the time period
      Throws:
      IllegalStateException - hasRate() is false
      Compliance:
      mandatory - This method must be implemented.
    • isReturned

      boolean isReturned()
      Tests if this provision has been returned.
      Returns:
      true if this provision has been returned, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getProvisionReturn

      ProvisionReturn getProvisionReturn()
      Gets the provision return that has any data that may have been captured in the return process.
      Returns:
      the return
      Throws:
      IllegalStateException - isReturned() is false
      Compliance:
      mandatory - This method must be implemented.
    • getProvisionRecord

      ProvisionRecord getProvisionRecord(Type provisionRecordType) throws OperationFailedException, PermissionDeniedException
      Gets the provision record corresponding to the given Provision record Type. This method is used to retrieve an object implementing the requested record. The provisionRecordType may be the Type returned in getRecordTypes() or any of its parents in a Type hierarchy where hasRecordType(provisionRecordType) is true.
      Parameters:
      provisionRecordType - the type of provision record to retrieve
      Returns:
      the provision record
      Throws:
      NullArgumentException - provisionRecordType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure occurred
      UnsupportedException - hasRecordType(provisionRecordType) is false
      Compliance:
      mandatory - This method must be implemented.