Interface Hold

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

public interface Hold extends OsidRelationship

A Hold is an Issue applicable to a Resource or Agent . The effective dates of the relationship specify the duration of the hold. A Hold defined for a Resource is effective for all Agents related to the Resource .

  • Method Details

    • getIssueId

      Id getIssueId()
      Gets the Id of the issue.
      Returns:
      the issue Id
      Compliance:
      mandatory - This method must be implemented.
    • getIssue

      Issue getIssue() throws OperationFailedException
      Gets the issue.
      Returns:
      the issue
      Throws:
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • hasResource

      boolean hasResource()
      Tests if this hold is for a Resource .
      Returns:
      true if this hold has a Resource , false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getResourceId

      Id getResourceId()
      Gets the Id of resource.
      Returns:
      the resource Id
      Throws:
      IllegalStateException - hasResource() is false
      Compliance:
      mandatory - This method must be implemented.
    • getResource

      Resource getResource() throws OperationFailedException
      Gets the resources that can be assigned to an issue.
      Returns:
      the resource
      Throws:
      IllegalStateException - hasResource() is false
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • hasAgent

      boolean hasAgent()
      Tests if this hold is for an Agent .
      Returns:
      true if this hold has an Agent , false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getAgentId

      Id getAgentId()
      Gets the Agent Id for this hold.
      Returns:
      the Agent Id
      Throws:
      IllegalStateException - hasAgent() is false
      Compliance:
      mandatory - This method must be implemented.
    • getAgent

      Agent getAgent() throws OperationFailedException
      Gets the Agent for this hold.
      Returns:
      the Agent
      Throws:
      IllegalStateException - hasAgent() is false
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • getHoldRecord

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