diff options
author | tkellner <tkellner@174cde9d-5d70-4d2a-aa98-46368bc2aaf7> | 2013-04-10 18:49:01 +0000 |
---|---|---|
committer | tkellner <tkellner@174cde9d-5d70-4d2a-aa98-46368bc2aaf7> | 2013-04-10 18:49:01 +0000 |
commit | 3f5eda3adbea29aa8ad2cca5d300cef3f3a444a5 (patch) | |
tree | bf4948a55beed5a9ab64bc59caa1898703ce5e2b /pdf-over/pdf-signer-interface/src/main/java/at/asit/pdfover/pdfsignator/profileproperties/validators/PropertyValidator.java | |
parent | 93d4e1db036224b937fc03fdb3ef0ea7bbaa25a2 (diff) | |
download | mocca-3f5eda3adbea29aa8ad2cca5d300cef3f3a444a5.tar.gz mocca-3f5eda3adbea29aa8ad2cca5d300cef3f3a444a5.tar.bz2 mocca-3f5eda3adbea29aa8ad2cca5d300cef3f3a444a5.zip |
Added Maven project for PDF-OVER 4.0 (Includes Spezification Diagramms)
git-svn-id: https://joinup.ec.europa.eu/svn/pdf-over/trunk@2 174cde9d-5d70-4d2a-aa98-46368bc2aaf7
Diffstat (limited to 'pdf-over/pdf-signer-interface/src/main/java/at/asit/pdfover/pdfsignator/profileproperties/validators/PropertyValidator.java')
-rw-r--r-- | pdf-over/pdf-signer-interface/src/main/java/at/asit/pdfover/pdfsignator/profileproperties/validators/PropertyValidator.java | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/pdf-over/pdf-signer-interface/src/main/java/at/asit/pdfover/pdfsignator/profileproperties/validators/PropertyValidator.java b/pdf-over/pdf-signer-interface/src/main/java/at/asit/pdfover/pdfsignator/profileproperties/validators/PropertyValidator.java new file mode 100644 index 00000000..8da9babc --- /dev/null +++ b/pdf-over/pdf-signer-interface/src/main/java/at/asit/pdfover/pdfsignator/profileproperties/validators/PropertyValidator.java @@ -0,0 +1,41 @@ +package at.asit.pdfover.pdfsignator.profileproperties.validators; + +import at.asit.pdfover.pdfsignator.InvalidPropertyTypeException; +import at.asit.pdfover.pdfsignator.InvalidPropertyValueException; +import at.asit.pdfover.pdfsignator.profileproperties.ProfileProperty; + +/** + * Validates the value of a property + */ +public abstract class PropertyValidator { + + /** + * The priority of this property should determine the order of validations + */ + protected int priority = 1; + + /** + * Called to validate the value of the given property and throws an InvalidPropertyValueException if value is invalid + * @param propety + * @throws InvalidPropertyValueException + */ + public abstract void validate(ProfileProperty property) throws InvalidPropertyValueException, InvalidPropertyTypeException; + + /** + * Sets the priority of this validator + * @param value The new priority + */ + public void SetPriority(int value) { + this.priority = value; + } + + /** + * Gets the priority of this validator + * @return The priority of this validator + */ + public int GetPriority() { + return this.priority; + } + + public abstract void CheckPropertyType(ProfileProperty property) throws InvalidPropertyTypeException; +} |