diff options
Diffstat (limited to 'Spezifikation/PDFSignator Schnittstelle/src/at/asit/pdfover/pdfsignator/profileproperties/validators/RegExValidator.java')
-rw-r--r-- | Spezifikation/PDFSignator Schnittstelle/src/at/asit/pdfover/pdfsignator/profileproperties/validators/RegExValidator.java | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/Spezifikation/PDFSignator Schnittstelle/src/at/asit/pdfover/pdfsignator/profileproperties/validators/RegExValidator.java b/Spezifikation/PDFSignator Schnittstelle/src/at/asit/pdfover/pdfsignator/profileproperties/validators/RegExValidator.java deleted file mode 100644 index 6337231c..00000000 --- a/Spezifikation/PDFSignator Schnittstelle/src/at/asit/pdfover/pdfsignator/profileproperties/validators/RegExValidator.java +++ /dev/null @@ -1,41 +0,0 @@ -package at.asit.pdfover.pdfsignator.profileproperties.validators; - -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -import at.asit.pdfover.pdfsignator.InvalidPropertyTypeException; -import at.asit.pdfover.pdfsignator.InvalidPropertyValueException; -import at.asit.pdfover.pdfsignator.profileproperties.FloatProfileProperty; -import at.asit.pdfover.pdfsignator.profileproperties.ProfileProperty; - -public class RegExValidator extends PropertyValidator { - - /** - * The regex value - */ - protected String regex; - - /** - * Constructor - * @param regex The regex to check - */ - public RegExValidator(String regex) { - this.regex = regex; - } - - @Override - public void validate(ProfileProperty property) - throws InvalidPropertyValueException, InvalidPropertyTypeException { - - if(!property.GetTextValue().matches(this.regex)) { - throw new InvalidPropertyValueException(property, String.format( - "Value is invalid!")); - } - } - - @Override - public void CheckPropertyType(ProfileProperty property) - throws InvalidPropertyTypeException { - // Is valid on all Property Types - } -} |