Interface Message

All Superinterfaces:
Browsable, Extensible, Identifiable, OsidObject

public interface Message extends OsidObject

A Message .

  • Method Details

    • getSubjectLine

      DisplayText getSubjectLine()
      Gets the subject line of this message.
      Returns:
      the subject
      Compliance:
      mandatory - This method must be implemented.
    • getText

      DisplayText getText()
      Gets the text of the message.
      Returns:
      the text
      Compliance:
      mandatory - This method must be implemented.
    • isSent

      boolean isSent()
      Tests if this message has been sent.
      Returns:
      true if this message has been sent, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getSentTime

      DateTime getSentTime()
      Gets the time this message was sent.
      Returns:
      the time
      Throws:
      IllegalStateException - isSent() is false
      Compliance:
      mandatory - This method must be implemented.
    • getSenderId

      Id getSenderId()
      Gets the sender Id of this message.
      Returns:
      the sender agent Id
      Throws:
      IllegalStateException - isSent() is false
      Compliance:
      mandatory - This method must be implemented.
    • getSender

      Gets the sender of this message.
      Returns:
      the sender
      Throws:
      IllegalStateException - isSent() is false
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • getSendingAgentId

      Id getSendingAgentId()
      Gets the sending agent Id of this message.
      Returns:
      the sending agent Id
      Throws:
      IllegalStateException - isSent() is false
      Compliance:
      mandatory - This method must be implemented.
    • getSendingAgent

      Agent getSendingAgent() throws OperationFailedException
      Gets the sending agent of this message.
      Returns:
      the sending agent
      Throws:
      IllegalStateException - isSent() is false
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • getReceivedTime

      DateTime getReceivedTime()
      Gets the time this message was received.
      Returns:
      the time
      Throws:
      IllegalStateException - isSent() is false
      Compliance:
      mandatory - This method must be implemented.
    • getRecipientIds

      IdList getRecipientIds()
      Gets the list of all addressed recipient Ids of this message.
      Returns:
      the recipient resource Ids
      Throws:
      IllegalStateException - isSent() is false
      Compliance:
      mandatory - This method must be implemented.
    • getRecipients

      ResourceList getRecipients() throws OperationFailedException
      Gets the list of all addressed recipients of this message.
      Returns:
      the recpient resources
      Throws:
      IllegalStateException - isSent() is false
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • isRecipient

      boolean isRecipient()
      Tests if the resource related to the authenticated agent is one of the recipients of this message.
      Returns:
      true if this agent is a recipient, false otherwise
      Throws:
      IllegalStateException - isSent() is false
      Compliance:
      mandatory - This method must be implemented.
    • getReceiptId

      Id getReceiptId()
      Gets the receipt Id for this message. A receipt is available for the receiver of this message.
      Returns:
      the receipt Id
      Throws:
      IllegalStateException - isRecipient() is false
      Compliance:
      mandatory - This method must be implemented.
    • getReceipt

      Receipt getReceipt() throws OperationFailedException
      Gets the receipt for this message. A receipt is available for the receiver of this message.
      Returns:
      the receipt
      Throws:
      IllegalStateException - isRecipient() is false
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • getMessageRecord

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