Class Message

  • Direct Known Subclasses:
    ErrorMessage, InfoMessage

    public abstract class Message
    extends Object
    This class encapsulates a message to be displayed.
    • Field Detail

      • message

        protected final JhoveMessage message
        PRIVATE INSTANCE FIELDS.
      • _subMessage

        protected final String _subMessage
        Additional information.
      • _offset

        protected final long _offset
        Byte offset to which message applies.
    • Constructor Detail

      • Message

        protected Message​(String message)
        Creates a Message with an unknown identifier for backward compatibility. This constructor cannot be invoked directly, since Message is abstract.
        Parameters:
        message - Human-readable message text.
      • Message

        protected Message​(JhoveMessage message)
        Creates a Message with an identifier. This constructor cannot be invoked directly, since Message is abstract.
        Parameters:
        message - The message text and its identifier.
      • Message

        protected Message​(String message,
                          String subMessage)
        Creates a Message. This constructor cannot be invoked directly, since Message is abstract. The second argument adds secondary details to the primary message; the message will typically be displayed in the form "message: subMessage".
        Parameters:
        message - Human-readable message text.
        subMessage - Human-readable additional information.
      • Message

        protected Message​(JhoveMessage message,
                          String subMessage)
        Creates a Message with an identifier. This constructor cannot be invoked directly, since Message is abstract. The second argument adds secondary details to the primary message; the message will typically be displayed in the form "message: subMessage".
        Parameters:
        message - The message text and its identifier.
        subMessage - Human-readable additional information.
      • Message

        protected Message​(String message,
                          long offset)
        Creates a Message. This constructor cannot be invoked directly, since Message is abstract. The second argument adds secondary details to the primary message; the message will typically be displayed in the form "message: subMessage".
        Parameters:
        message - Human-readable message text.
        offset - Byte offset associated with the message.
      • Message

        protected Message​(JhoveMessage message,
                          long offset)
        Creates a Message with an identifier. This constructor cannot be invoked directly, since Message is abstract. The second argument adds secondary details to the primary message; the message will typically be displayed in the form "message: subMessage".
        Parameters:
        message - The message text and its identifier.
        offset - Byte offset associated with the message.
      • Message

        protected Message​(String message,
                          String subMessage,
                          long offset)
        Creates a Message. This constructor cannot be invoked directly, since Message is abstract. The second argument adds secondary details to the primary message; the message will typically be displayed in the form "message: subMessage".
        Parameters:
        message - Human-readable message text.
        subMessage - Human-readable additional information.
        offset - Byte offset associated with the message.
      • Message

        protected Message​(JhoveMessage message,
                          String subMessage,
                          long offset)
        Creates a Message with an identifier. This constructor cannot be invoked directly, since Message is abstract. The second argument adds secondary details to the primary message; the message will typically be displayed in the form "message: subMessage".
        Parameters:
        message - The message text and its identifier.
        subMessage - Human-readable additional information.
        offset - Byte offset associated with the message.
    • Method Detail

      • getMessage

        public String getMessage()
        Returns the message text.
      • getSubMessage

        public String getSubMessage()
        Returns the submessage text.
      • getOffset

        public long getOffset()
        Returns the offset to which this message is related.
      • getId

        public String getId()
        Returns the message's identifier.
      • getPrefix

        public String getPrefix()