Interface MessageView

    • Method Detail

      • getSubject

        default java.lang.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 java.lang.String getSubject​(java.lang.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.
      • getSubjects

        default java.util.Set<Message.SubjectgetSubjects()
        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

        default java.util.List<java.lang.String> 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 java.lang.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 java.lang.String getBody​(java.lang.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
      • getBodies

        default java.util.Set<Message.BodygetBodies()
        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

        default java.util.List<java.lang.String> 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 java.lang.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.