Interface Provision
- All Superinterfaces:
Browsable, Extensible, Identifiable, OsidObject, OsidRelationship, Temporal
A Provision is a relationship between a provisionable and a
recipient governed by a broker.
-
Method Summary
Modifier and TypeMethodDescriptionGets the broker.Gets theIdof the broker.getCost()Gets the cost.Gets the due date for the return.Gets the provisionable.Gets theIdof the provisionable.Gets the date this was provisioned.getProvisionRecord(Type provisionRecordType) Gets the provision record corresponding to the givenProvisionrecordType.Gets the provision return that has any data that may have been captured in the return process.Gets the rate amount.Gets the rate period.Gets the recipient.Gets theIdof the recipient.Gets the request.Gets theIdof the request.booleanhasCost()Tests if this provision has a total cost.booleanTests if this provision is must be returned and has a due date.booleanhasRate()Tests if this provision has a rate per time period.booleanisLeased()Tests if this provision is temporary.booleanTests if this provision has been returned.booleanTests if this provision is must be returned.booleanTests if this provision has a request.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.Methods inherited from interface OsidRelationship
getEndReason, getEndReasonId, hasEndReasonModifier and TypeMethodDescriptionGets a state indicating why this relationship has ended.Gets a stateIdindicating why this relationship has ended.booleanTests if a reason this relationship came to an end is known.Methods inherited from interface Temporal
getEndDate, getStartDate, isEffectiveModifier and TypeMethodDescriptionGets the end date.Gets the start date.booleanTests if the current date is within the start end end dates inclusive.
-
Method Details
-
getBrokerId
Id getBrokerId()Gets theIdof the broker.- Returns:
- the broker
Id - Compliance:
mandatory- This method must be implemented.
-
getBroker
Gets the broker.- Returns:
- the broker
- Throws:
OperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
getProvisionableId
Id getProvisionableId()Gets theIdof the provisionable.- Returns:
- the provisionable
Id - Compliance:
mandatory- This method must be implemented.
-
getProvisionable
Gets the provisionable.- Returns:
- the provisionable
- Throws:
OperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
getRecipientId
Id getRecipientId()Gets theIdof the recipient.- Returns:
- the resource
Id - Compliance:
mandatory- This method must be implemented.
-
getRecipient
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:
trueif a request is available, false otherwise- Compliance:
mandatory- This method must be implemented.
-
getRequestId
Id getRequestId()Gets theIdof the request.- Returns:
- the request
Id - Throws:
IllegalStateException-provisionedByRequest()isfalse- Compliance:
mandatory- This method must be implemented.
-
getRequest
Gets the request.- Returns:
- the request
- Throws:
IllegalStateException-provisionedByRequest()isfalseOperationFailedException- 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:
trueif this is a lease,falseif the provision is permanent- Compliance:
mandatory- This method must be implemented.
-
mustReturn
boolean mustReturn()Tests if this provision is must be returned.- Returns:
trueif this is must be returned,falseotherwise- Throws:
IllegalStateException-isLeased()isfalse- Compliance:
mandatory- This method must be implemented.
-
hasDueDate
boolean hasDueDate()Tests if this provision is must be returned and has a due date.- Returns:
trueif this is must be returned,falseotherwise- Throws:
IllegalStateException-mustReturn()isfalse- Compliance:
mandatory- This method must be implemented.
-
getDueDate
DateTime getDueDate()Gets the due date for the return.- Returns:
- the due date
- Throws:
IllegalStateException-hasDueDate()isfalse- 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:
trueif there is a cost,falseotherwise- Compliance:
mandatory- This method must be implemented.
-
getCost
Currency getCost()Gets the cost.- Returns:
- the cost
- Throws:
IllegalStateException-hasCost()isfalse- Compliance:
mandatory- This method must be implemented.
-
hasRate
boolean hasRate()Tests if this provision has a rate per time period.- Returns:
trueif there is a rate, false otherwise- Throws:
IllegalStateException-hasRate()isfalse- Compliance:
mandatory- This method must be implemented.
-
getRateAmount
Currency getRateAmount()Gets the rate amount.- Returns:
- the rate amount
- Throws:
IllegalStateException-hasRate()isfalse- Compliance:
mandatory- This method must be implemented.
-
getRatePeriod
Duration getRatePeriod()Gets the rate period.- Returns:
- the time period
- Throws:
IllegalStateException-hasRate()isfalse- Compliance:
mandatory- This method must be implemented.
-
isReturned
boolean isReturned()Tests if this provision has been returned.- Returns:
trueif this provision has been returned,falseotherwise- 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()isfalse- Compliance:
mandatory- This method must be implemented.
-
getProvisionRecord
ProvisionRecord getProvisionRecord(Type provisionRecordType) throws OperationFailedException, PermissionDeniedException Gets the provision record corresponding to the givenProvisionrecordType. This method is used to retrieve an object implementing the requested record. TheprovisionRecordTypemay be theTypereturned ingetRecordTypes()or any of its parents in aTypehierarchy wherehasRecordType(provisionRecordType)istrue.- Parameters:
provisionRecordType- the type of provision record to retrieve- Returns:
- the provision record
- Throws:
NullArgumentException-provisionRecordTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure occurredUnsupportedException-hasRecordType(provisionRecordType)isfalse- Compliance:
mandatory- This method must be implemented.
-