You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pdfbox.apache.org by ti...@apache.org on 2014/11/28 20:02:14 UTC
svn commit: r1642351 -
/pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/ValidationResult.java
Author: tilman
Date: Fri Nov 28 19:02:14 2014
New Revision: 1642351
URL: http://svn.apache.org/r1642351
Log:
PDFBOX-2529: added page number to the ValidationError
Modified:
pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/ValidationResult.java
Modified: pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/ValidationResult.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/ValidationResult.java?rev=1642351&r1=1642350&r2=1642351&view=diff
==============================================================================
--- pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/ValidationResult.java (original)
+++ pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/ValidationResult.java Fri Nov 28 19:02:14 2014
@@ -210,6 +210,11 @@ public class ValidationResult
* The underlying cause if the ValidationError was caused by a Throwable.
*/
private Throwable cause = null;
+
+ /**
+ * The page number on which the error happened, if known.
+ */
+ private Integer pageNumber = null;
/**
* Get the underlying cause if the ValidationError was caused by a
@@ -224,6 +229,24 @@ public class ValidationResult
}
/**
+ * Returns the page number, or null if not known.
+ */
+ public Integer getPageNumber()
+ {
+ return pageNumber;
+ }
+
+ /**
+ * Sets or resets the page number.
+ *
+ * @param pageNumber zero based page number or null if none is known.
+ */
+ public void setPageNumber(Integer pageNumber)
+ {
+ this.pageNumber = pageNumber;
+ }
+
+ /**
* Create a validation error with the given error code
*
* @param errorCode