Package com.pd4ml
Class StatusMessage
- java.lang.Object
-
- com.pd4ml.StatusMessage
-
public class StatusMessage extends java.lang.ObjectA 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)
-
-
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 booleanaddUniqueMessage(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.Objectclone()java.lang.StringgetDetails()Returns additional details about the problem, for example the requested output format.java.lang.StringgetMessage()Returns the message text.static StatusMessagegetMessage(int id, java.lang.String details)Creates a copy of a predefined message.booleanisError()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.booleanisWarning()Tells whether this is a warning: PD4ML worked around a problem, for example by ignoring a setting the requested standard does not allow.voidsetDetails(java.lang.String details)Sets additional details about the problem.
-
-
-
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
-
-
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 numberdetails- additional details, ornull- Returns:
- the message, or
nullif 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 listmessage- the message to add- Returns:
trueif 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, ornull
-
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:
truefor 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:
truefor a warning
-
getMessage
public java.lang.String getMessage()
Returns the message text.- Returns:
- the message text
-
-