Package com.pd4ml

Class StatusMessage


  • public class StatusMessage
    extends java.lang.Object
    A warning or error recorded during a conversion, for example that a font could not be embedded in PDF/A output, or that the license does not cover the requested output format. Read the messages of the last conversion with (StatusMessage[]) pd4ml.getLastRenderInfo(Constants.PD4ML_PDFA_STATUS).

    For PDF/A output, an error means the result does not conform to the requested standard.

    See Also:
    PD4ML.getLastRenderInfo(String)
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int ERROR
      Message type: a problem that makes the output non-conforming or restricted.
      static int WARNING
      Message type: a problem PD4ML worked around, for example by ignoring a setting.
    • Constructor Summary

      Constructors 
      Constructor Description
      StatusMessage​(int type, int id, java.lang.String message)
      Creates a message.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean addUniqueMessage​(java.util.Vector<StatusMessage> statusMessages, StatusMessage message)
      Adds a message to a list unless a message with the same number is already in it.
      java.lang.Object clone()  
      java.lang.String getDetails()
      Returns additional details about the problem, for example the requested output format.
      java.lang.String getMessage()
      Returns the message text.
      static StatusMessage getMessage​(int id, java.lang.String details)
      Creates a copy of a predefined message.
      boolean isError()
      Tells whether this is an error: for PDF/A output, the result does not conform to the requested standard; otherwise, the output is restricted, for example by the license.
      boolean isWarning()
      Tells whether this is a warning: PD4ML worked around a problem, for example by ignoring a setting the requested standard does not allow.
      void setDetails​(java.lang.String details)
      Sets additional details about the problem.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • WARNING

        public static final int WARNING
        Message type: a problem PD4ML worked around, for example by ignoring a setting.
        See Also:
        Constant Field Values
      • ERROR

        public static final int ERROR
        Message type: a problem that makes the output non-conforming or restricted.
        See Also:
        Constant Field Values
    • Constructor Detail

      • StatusMessage

        public StatusMessage​(int type,
                             int id,
                             java.lang.String message)
        Creates a message.
        Parameters:
        type - WARNING or ERROR
        id - the message number
        message - the message text
    • Method Detail

      • getMessage

        public static StatusMessage getMessage​(int id,
                                               java.lang.String details)
        Creates a copy of a predefined message. For internal use.
        Parameters:
        id - the message number
        details - additional details, or null
        Returns:
        the message, or null if the number is unknown
      • addUniqueMessage

        public static boolean addUniqueMessage​(java.util.Vector<StatusMessage> statusMessages,
                                               StatusMessage message)
        Adds a message to a list unless a message with the same number is already in it. For internal use.
        Parameters:
        statusMessages - the list
        message - the message to add
        Returns:
        true if the message was added
      • clone

        public java.lang.Object clone()
      • getDetails

        public java.lang.String getDetails()
        Returns additional details about the problem, for example the requested output format.
        Returns:
        the details, or null
      • setDetails

        public void setDetails​(java.lang.String details)
        Sets additional details about the problem.
        Parameters:
        details - the details, or null
      • isError

        public boolean isError()
        Tells whether this is an error: for PDF/A output, the result does not conform to the requested standard; otherwise, the output is restricted, for example by the license.
        Returns:
        true for an error
      • isWarning

        public boolean isWarning()
        Tells whether this is a warning: PD4ML worked around a problem, for example by ignoring a setting the requested standard does not allow.
        Returns:
        true for a warning
      • getMessage

        public java.lang.String getMessage()
        Returns the message text.
        Returns:
        the message text