Interface MessageView

All Superinterfaces:
StanzaView, XmlLangElement
All Known Implementing Classes:
Message, MessageBuilder

public interface MessageView extends StanzaView
  • Method Details

    • getType

      Returns the type of the message. If no type has been set this method will return Message.Type.normal.
      Returns:
      the type of the message.
    • getSubject

      default String getSubject()
      Returns the default subject of the message, or null if the subject has not been set. The subject is a short description of message contents.

      The default subject of a message is the subject that corresponds to the message's language. (see XmlLangElement.getLanguage()) or if no language is set to the applications default language (see Stanza.getDefaultLanguage()).

      Returns:
      the subject of the message.
    • getSubject

      default String getSubject(String language)
      Returns the subject corresponding to the language. If the language is null, the method result will be the same as getSubject(). Null will be returned if the language does not have a corresponding subject.
      Parameters:
      language - the language of the subject to return.
      Returns:
      the subject related to the passed in language.
    • getMessageSubject

    • getSubjects

      Returns a set of all subjects in this Message, including the default message subject accessible from getSubject().
      Returns:
      a collection of all subjects in this message.
    • getSubjectLanguages

      Returns all the languages being used for the subjects, not including the default subject.
      Returns:
      the languages being used for the subjects.
    • getBody

      default String getBody()
      Returns the default body of the message, or null if the body has not been set. The body is the main message contents.

      The default body of a message is the body that corresponds to the message's language. (see XmlLangElement.getLanguage()) or if no language is set to the applications default language (see Stanza.getDefaultLanguage()).

      Returns:
      the body of the message.
    • getBody

      default String getBody(String language)
      Returns the body corresponding to the language. If the language is null, the method result will be the same as getBody(). Null will be returned if the language does not have a corresponding body.
      Parameters:
      language - the language of the body to return.
      Returns:
      the body related to the passed in language.
      Since:
      3.0.2
    • getMessageBody

      default Message.Body getMessageBody(String language)
    • getBodies

      Returns a set of all bodies in this Message, including the default message body accessible from getBody().
      Returns:
      a collection of all bodies in this Message.
      Since:
      3.0.2
    • getBodyLanguages

      Returns all the languages being used for the bodies, not including the default body.
      Returns:
      the languages being used for the bodies.
      Since:
      3.0.2
    • getThread

      default String getThread()
      Returns the thread id of the message, which is a unique identifier for a sequence of "chat" messages. If no thread id is set, null will be returned.
      Returns:
      the thread id of the message, or null if it doesn't exist.