Interface Communique

All Superinterfaces:
Browsable, Extensible, Identifiable, OsidObject

public interface Communique extends OsidObject

A communique is a message to a user handled through an application. Communiques may require some form of acknowledgement ranging from a simple confirmation to data input.

  • Method Details

    • getMessage

      DisplayText getMessage()
      Gets the message.
      Returns:
      the message
      Compliance:
      mandatory - This method must be implemented.
    • getLevel

      CommuniqueLevel getLevel()
      Gets the message level for this communique.
      Returns:
      the message level
      Compliance:
      mandatory - This method must be implemented.
    • isResponseRequired

      boolean isResponseRequired()
      Tests if the provider is blocking for a response. A response may take the form of s simple acknowledgement, a selection among a list of options, or a form input.
      Returns:
      true if the provider is blocking for a response false if no response is required
      Compliance:
      mandatory - This method must be implemented.
    • respondViaOption

      boolean respondViaOption()
      Tests if the provider is blocking on a choice selection. If respondViaForm() is true, then this method must return false. If isResponseRequired() is false and respondViaOption() is true, then a response is optional.
      Returns:
      true if the provider accepts a selection input, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getResponseOptions

      ResponseOption[] getResponseOptions()
      Gets a list of possible response choices to this communique.
      Returns:
      a list of possible responses
      Throws:
      IllegalStateException - respondViaOption() is false
      Compliance:
      mandatory - This method must be implemented.
    • respondViaForm

      boolean respondViaForm()
      Tests if the provider is blocking on a form input. If respondViaOption() is true, then this method must return false. If isResponseRequired() is false and respondViaForm() is true, then a response is optional.
      Returns:
      true if the provider accepts form input, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getCommuniqueRecord

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