Package org.apache.pdfbox.preflight
Class PreflightConfiguration
- java.lang.Object
-
- org.apache.pdfbox.preflight.PreflightConfiguration
-
public class PreflightConfiguration extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ACRO_FORM_PROCESS
private ActionManagerFactory
actionFact
Define the ActionManagerFactory used by ValidationProcessstatic java.lang.String
ACTIONS_PROCESS
static java.lang.String
ANNOTATIONS_PROCESS
private AnnotationValidatorFactory
annotFact
Define the AnnotationFactory used by ValidationProcessstatic java.lang.String
BOOKMARK_PROCESS
static java.lang.String
CATALOG_PROCESS
private ColorSpaceHelperFactory
colorSpaceHelperFact
Define the ColorSpaceHelperFactory used by the validationProcess.static java.lang.String
DESTINATION_PROCESS
private boolean
errorOnMissingProcess
Boolean to know if an exception must be thrown if a ValidationProcess is missing.static java.lang.String
EXTGSTATE_PROCESS
static java.lang.String
FILE_SPECIF_PROCESS
static java.lang.String
FONT_PROCESS
static java.lang.String
GRAPHIC_PROCESS
private java.util.Map<java.lang.String,java.lang.Class<? extends ValidationProcess>>
innerProcesses
private boolean
lazyValidation
Boolean to know mark some error as a Warning, if the validation result contains only warning the validation is successfulprivate int
maxErrors
Define the maximum number of errors.static java.lang.String
META_DATA_PROCESS
static java.lang.String
PAGE_PROCESS
static java.lang.String
PAGES_TREE_PROCESS
private java.util.Map<java.lang.String,java.lang.Class<? extends ValidationProcess>>
processes
static java.lang.String
RESOURCES_PROCESS
static java.lang.String
SHADING_PATTERN_PROCESS
static java.lang.String
STREAM_PROCESS
static java.lang.String
TILING_PATTERN_PROCESS
static java.lang.String
TRAILER_PROCESS
static java.lang.String
XREF_PROCESS
-
Constructor Summary
Constructors Constructor Description PreflightConfiguration()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PreflightConfiguration
createPdfA1BConfiguration()
ActionManagerFactory
getActionFact()
AnnotationValidatorFactory
getAnnotFact()
ColorSpaceHelperFactory
getColorSpaceHelperFact()
ValidationProcess
getInstanceOfProcess(java.lang.String processName)
Return the validation process linked with the given nameint
getMaxErrors()
Get the maximum number of errors after which to abort when possible.java.util.Collection<java.lang.String>
getPageValidationProcessNames()
java.util.Collection<java.lang.String>
getProcessNames()
boolean
isErrorOnMissingProcess()
boolean
isLazyValidation()
void
removePageProcess(java.lang.String processName)
void
removeProcess(java.lang.String processName)
void
replacePageProcess(java.lang.String processName, java.lang.Class<? extends ValidationProcess> process)
void
replaceProcess(java.lang.String processName, java.lang.Class<? extends ValidationProcess> process)
void
setActionFact(ActionManagerFactory actionFact)
void
setAnnotFact(AnnotationValidatorFactory annotFact)
void
setColorSpaceHelperFact(ColorSpaceHelperFactory colorSpaceHelperFact)
void
setErrorOnMissingProcess(boolean errorOnMissingProcess)
void
setLazyValidation(boolean lazyValidation)
void
setMaxErrors(int maxErrors)
Set the maximum number of errors after which to abort when possible.
-
-
-
Field Detail
-
CATALOG_PROCESS
public static final java.lang.String CATALOG_PROCESS
- See Also:
- Constant Field Values
-
STREAM_PROCESS
public static final java.lang.String STREAM_PROCESS
- See Also:
- Constant Field Values
-
TRAILER_PROCESS
public static final java.lang.String TRAILER_PROCESS
- See Also:
- Constant Field Values
-
XREF_PROCESS
public static final java.lang.String XREF_PROCESS
- See Also:
- Constant Field Values
-
BOOKMARK_PROCESS
public static final java.lang.String BOOKMARK_PROCESS
- See Also:
- Constant Field Values
-
ACRO_FORM_PROCESS
public static final java.lang.String ACRO_FORM_PROCESS
- See Also:
- Constant Field Values
-
FILE_SPECIF_PROCESS
public static final java.lang.String FILE_SPECIF_PROCESS
- See Also:
- Constant Field Values
-
PAGES_TREE_PROCESS
public static final java.lang.String PAGES_TREE_PROCESS
- See Also:
- Constant Field Values
-
META_DATA_PROCESS
public static final java.lang.String META_DATA_PROCESS
- See Also:
- Constant Field Values
-
PAGE_PROCESS
public static final java.lang.String PAGE_PROCESS
- See Also:
- Constant Field Values
-
RESOURCES_PROCESS
public static final java.lang.String RESOURCES_PROCESS
- See Also:
- Constant Field Values
-
ACTIONS_PROCESS
public static final java.lang.String ACTIONS_PROCESS
- See Also:
- Constant Field Values
-
ANNOTATIONS_PROCESS
public static final java.lang.String ANNOTATIONS_PROCESS
- See Also:
- Constant Field Values
-
GRAPHIC_PROCESS
public static final java.lang.String GRAPHIC_PROCESS
- See Also:
- Constant Field Values
-
FONT_PROCESS
public static final java.lang.String FONT_PROCESS
- See Also:
- Constant Field Values
-
EXTGSTATE_PROCESS
public static final java.lang.String EXTGSTATE_PROCESS
- See Also:
- Constant Field Values
-
SHADING_PATTERN_PROCESS
public static final java.lang.String SHADING_PATTERN_PROCESS
- See Also:
- Constant Field Values
-
TILING_PATTERN_PROCESS
public static final java.lang.String TILING_PATTERN_PROCESS
- See Also:
- Constant Field Values
-
DESTINATION_PROCESS
public static final java.lang.String DESTINATION_PROCESS
- See Also:
- Constant Field Values
-
errorOnMissingProcess
private boolean errorOnMissingProcess
Boolean to know if an exception must be thrown if a ValidationProcess is missing.
-
lazyValidation
private boolean lazyValidation
Boolean to know mark some error as a Warning, if the validation result contains only warning the validation is successful
-
processes
private final java.util.Map<java.lang.String,java.lang.Class<? extends ValidationProcess>> processes
-
innerProcesses
private final java.util.Map<java.lang.String,java.lang.Class<? extends ValidationProcess>> innerProcesses
-
annotFact
private AnnotationValidatorFactory annotFact
Define the AnnotationFactory used by ValidationProcess
-
actionFact
private ActionManagerFactory actionFact
Define the ActionManagerFactory used by ValidationProcess
-
colorSpaceHelperFact
private ColorSpaceHelperFactory colorSpaceHelperFact
Define the ColorSpaceHelperFactory used by the validationProcess.
-
maxErrors
private int maxErrors
Define the maximum number of errors.
-
-
Method Detail
-
createPdfA1BConfiguration
public static PreflightConfiguration createPdfA1BConfiguration()
-
getProcessNames
public java.util.Collection<java.lang.String> getProcessNames()
-
getInstanceOfProcess
public ValidationProcess getInstanceOfProcess(java.lang.String processName) throws ValidationException
Return the validation process linked with the given name- Parameters:
processName
-- Returns:
- an instance of validationProcess, null if it doesn't exist and if the errorOnMissingProcess is false.
- Throws:
MissingValidationProcessException
- if the Process doesn't exist (errorOnMissingProcess is true).ValidationException
- if the process instance can't be created.
-
replaceProcess
public void replaceProcess(java.lang.String processName, java.lang.Class<? extends ValidationProcess> process)
-
removeProcess
public void removeProcess(java.lang.String processName)
-
getPageValidationProcessNames
public java.util.Collection<java.lang.String> getPageValidationProcessNames()
-
replacePageProcess
public void replacePageProcess(java.lang.String processName, java.lang.Class<? extends ValidationProcess> process)
-
removePageProcess
public void removePageProcess(java.lang.String processName)
-
isErrorOnMissingProcess
public boolean isErrorOnMissingProcess()
-
setErrorOnMissingProcess
public void setErrorOnMissingProcess(boolean errorOnMissingProcess)
-
isLazyValidation
public boolean isLazyValidation()
-
setLazyValidation
public void setLazyValidation(boolean lazyValidation)
-
getAnnotFact
public AnnotationValidatorFactory getAnnotFact()
-
setAnnotFact
public void setAnnotFact(AnnotationValidatorFactory annotFact)
-
getActionFact
public ActionManagerFactory getActionFact()
-
setActionFact
public void setActionFact(ActionManagerFactory actionFact)
-
getColorSpaceHelperFact
public ColorSpaceHelperFactory getColorSpaceHelperFact()
-
setColorSpaceHelperFact
public void setColorSpaceHelperFact(ColorSpaceHelperFactory colorSpaceHelperFact)
-
getMaxErrors
public int getMaxErrors()
Get the maximum number of errors after which to abort when possible.- Returns:
-
setMaxErrors
public void setMaxErrors(int maxErrors)
Set the maximum number of errors after which to abort when possible.- Parameters:
maxErrors
-
-
-