From a55e35c8c2c0d2edccca62741c026c7826ee0241 Mon Sep 17 00:00:00 2001
From: Henry Lee
Date: Thu, 30 Nov 2023 13:57:19 +0900
Subject: [PATCH] refactor(java): base image for 3 java projects
---
Java-base/commons-validator/Dockerfile | 28 +
Java-base/commons-validator/src/BUILDING.txt | 29 +
.../commons-validator/src/CONTRIBUTING.md | 97 +
Java-base/commons-validator/src/LICENSE.txt | 202 +
Java-base/commons-validator/src/NOTICE.txt | 5 +
Java-base/commons-validator/src/PROPOSAL.html | 112 +
Java-base/commons-validator/src/README.md | 104 +
.../commons-validator/src/RELEASE-NOTES.txt | 63 +
.../src/checkstyle-suppressions.xml | 28 +
.../commons-validator/src/checkstyle.xml | 169 +
Java-base/commons-validator/src/pom.xml | 411 ++
.../src/src/assembly/bin.xml | 46 +
.../src/src/assembly/src.xml | 47 +
.../src/src/changes/changes.xml | 1143 +++++
.../src/src/changes/release-notes.vm | 122 +
.../validator/example/ValidateBean.java | 113 +
.../validator/example/ValidateExample.java | 197 +
.../example/applicationResources.properties | 28 +
.../validator/example/validator-example.xml | 61 +
.../org/apache/commons/validator/Arg.java | 193 +
.../validator/CreditCardValidator.java | 260 ++
.../commons/validator/DateValidator.java | 133 +
.../commons/validator/EmailValidator.java | 224 +
.../org/apache/commons/validator/Field.java | 958 ++++
.../org/apache/commons/validator/Form.java | 352 ++
.../org/apache/commons/validator/FormSet.java | 378 ++
.../commons/validator/FormSetFactory.java | 115 +
.../validator/GenericTypeValidator.java | 473 ++
.../commons/validator/GenericValidator.java | 435 ++
.../commons/validator/ISBNValidator.java | 56 +
.../org/apache/commons/validator/Msg.java | 162 +
.../commons/validator/UrlValidator.java | 468 ++
.../apache/commons/validator/Validator.java | 391 ++
.../commons/validator/ValidatorAction.java | 796 ++++
.../commons/validator/ValidatorException.java | 46 +
.../commons/validator/ValidatorResources.java | 662 +++
.../commons/validator/ValidatorResult.java | 205 +
.../commons/validator/ValidatorResults.java | 152 +
.../org/apache/commons/validator/Var.java | 218 +
.../org/apache/commons/validator/package.html | 244 +
.../routines/AbstractCalendarValidator.java | 427 ++
.../routines/AbstractFormatValidator.java | 221 +
.../routines/AbstractNumberValidator.java | 277 ++
.../routines/BigDecimalValidator.java | 240 +
.../routines/BigIntegerValidator.java | 211 +
.../validator/routines/ByteValidator.java | 258 +
.../validator/routines/CalendarValidator.java | 338 ++
.../validator/routines/CodeValidator.java | 283 ++
.../routines/CreditCardValidator.java | 517 ++
.../validator/routines/CurrencyValidator.java | 118 +
.../validator/routines/DateValidator.java | 350 ++
.../validator/routines/DomainValidator.java | 2117 +++++++++
.../validator/routines/DoubleValidator.java | 252 +
.../validator/routines/EmailValidator.java | 223 +
.../validator/routines/FloatValidator.java | 270 ++
.../validator/routines/IBANValidator.java | 299 ++
.../validator/routines/ISBNValidator.java | 271 ++
.../validator/routines/ISINValidator.java | 124 +
.../validator/routines/ISSNValidator.java | 202 +
.../routines/InetAddressValidator.java | 190 +
.../validator/routines/IntegerValidator.java | 257 +
.../validator/routines/LongValidator.java | 252 +
.../validator/routines/PercentValidator.java | 127 +
.../validator/routines/RegexValidator.java | 230 +
.../validator/routines/ShortValidator.java | 255 +
.../validator/routines/TimeValidator.java | 285 ++
.../validator/routines/UrlValidator.java | 576 +++
.../checkdigit/ABANumberCheckDigit.java | 85 +
.../routines/checkdigit/CUSIPCheckDigit.java | 100 +
.../routines/checkdigit/CheckDigit.java | 71 +
.../checkdigit/CheckDigitException.java | 55 +
.../routines/checkdigit/EAN13CheckDigit.java | 78 +
.../routines/checkdigit/IBANCheckDigit.java | 137 +
.../routines/checkdigit/ISBN10CheckDigit.java | 115 +
.../routines/checkdigit/ISBNCheckDigit.java | 106 +
.../routines/checkdigit/ISINCheckDigit.java | 111 +
.../routines/checkdigit/ISSNCheckDigit.java | 85 +
.../routines/checkdigit/LuhnCheckDigit.java | 76 +
.../checkdigit/ModulusCheckDigit.java | 204 +
.../checkdigit/ModulusTenCheckDigit.java | 243 +
.../routines/checkdigit/SedolCheckDigit.java | 114 +
.../checkdigit/VerhoeffCheckDigit.java | 129 +
.../routines/checkdigit/package.html | 29 +
.../commons/validator/routines/package.html | 835 ++++
.../apache/commons/validator/util/Flags.java | 206 +
.../validator/util/ValidatorUtils.java | 200 +
.../commons/validator/util/package.html | 26 +
.../commons/validator/digester-rules.xml | 102 +
.../validator/resources/validator_1_0.dtd | 262 ++
.../validator/resources/validator_1_0_1.dtd | 261 ++
.../validator/resources/validator_1_1.dtd | 308 ++
.../validator/resources/validator_1_1_3.dtd | 328 ++
.../validator/resources/validator_1_2_0.dtd | 249 +
.../validator/resources/validator_1_3_0.dtd | 249 +
.../validator/resources/validator_1_4_0.dtd | 253 +
.../src/site/resources/download_validator.cgi | 4 +
.../src/src/site/resources/images/logo.png | Bin 0 -> 13087 bytes
.../commons-validator/src/src/site/site.xml | 51 +
.../src/src/site/xdoc/building.xml | 75 +
.../src/src/site/xdoc/community.xml | 50 +
.../src/src/site/xdoc/download_validator.xml | 154 +
.../src/src/site/xdoc/index.xml | 123 +
.../src/src/site/xdoc/issue-tracking.xml | 102 +
.../src/src/site/xdoc/mail-lists.xml | 202 +
.../src/src/site/xdoc/tasks.xml | 63 +
.../site/xdoc/validator_2_0_0_proposal.dtd | 269 ++
.../commons/validator/AbstractCommonTest.java | 59 +
.../commons/validator/AbstractNumberTest.java | 112 +
.../apache/commons/validator/ByteTest.java | 99 +
.../validator/CreditCardValidatorTest.java | 89 +
.../CustomValidatorResourcesTest.java | 72 +
.../apache/commons/validator/DateTest.java | 112 +
.../apache/commons/validator/DoubleTest.java | 77 +
.../apache/commons/validator/EmailTest.java | 449 ++
.../commons/validator/EntityImportTest.java | 51 +
.../commons/validator/ExceptionTest.java | 150 +
.../commons/validator/ExtensionTest.java | 365 ++
.../apache/commons/validator/FieldTest.java | 286 ++
.../apache/commons/validator/FloatTest.java | 76 +
.../validator/GenericTypeValidatorImpl.java | 248 +
.../validator/GenericTypeValidatorTest.java | 195 +
.../validator/GenericValidatorImpl.java | 275 ++
.../validator/GenericValidatorTest.java | 77 +
.../commons/validator/ISBNValidatorTest.java | 60 +
.../apache/commons/validator/IntegerTest.java | 101 +
.../apache/commons/validator/LocaleTest.java | 203 +
.../apache/commons/validator/LongTest.java | 98 +
.../validator/MultipleConfigFilesTest.java | 268 ++
.../commons/validator/MultipleTest.java | 356 ++
.../apache/commons/validator/NameBean.java | 56 +
.../commons/validator/ParameterTest.java | 117 +
.../validator/ParameterValidatorImpl.java | 42 +
.../commons/validator/RequiredIfTest.java | 238 +
.../commons/validator/RequiredNameTest.java | 269 ++
.../apache/commons/validator/ResultPair.java | 32 +
.../commons/validator/RetrieveFormTest.java | 233 +
.../apache/commons/validator/ShortTest.java | 76 +
.../apache/commons/validator/TypeBean.java | 100 +
.../org/apache/commons/validator/UrlTest.java | 284 ++
.../validator/ValidatorResourcesTest.java | 52 +
.../validator/ValidatorResultsTest.java | 163 +
.../commons/validator/ValidatorTest.java | 286 ++
.../apache/commons/validator/ValueBean.java | 42 +
.../org/apache/commons/validator/VarTest.java | 109 +
.../custom/CustomValidatorResources.java | 44 +
.../AbstractCalendarValidatorTest.java | 261 ++
.../routines/AbstractNumberValidatorTest.java | 246 +
.../routines/BigDecimalValidatorTest.java | 144 +
.../routines/BigIntegerValidatorTest.java | 139 +
.../validator/routines/ByteValidatorTest.java | 148 +
.../routines/CalendarValidatorTest.java | 279 ++
.../validator/routines/CodeValidatorTest.java | 262 ++
.../routines/CreditCardValidatorTest.java | 650 +++
.../routines/CurrencyValidatorTest.java | 197 +
.../validator/routines/DateValidatorTest.java | 169 +
.../routines/DomainValidatorTest.java | 721 +++
.../routines/DoubleValidatorTest.java | 138 +
.../routines/EmailValidatorTest.java | 545 +++
.../routines/FloatValidatorTest.java | 168 +
.../validator/routines/IBANValidatorTest.java | 362 ++
.../validator/routines/ISBNValidatorTest.java | 326 ++
.../validator/routines/ISINValidatorTest.java | 100 +
.../validator/routines/ISSNValidatorTest.java | 212 +
.../routines/InetAddressValidatorTest.java | 621 +++
.../routines/IntegerValidatorTest.java | 152 +
.../validator/routines/LongValidatorTest.java | 149 +
.../routines/PercentValidatorTest.java | 117 +
.../routines/RegexValidatorTest.java | 296 ++
.../routines/ShortValidatorTest.java | 140 +
.../validator/routines/TimeValidatorTest.java | 342 ++
.../validator/routines/UrlValidatorTest.java | 618 +++
.../checkdigit/ABANumberCheckDigitTest.java | 53 +
.../checkdigit/AbstractCheckDigitTest.java | 334 ++
.../checkdigit/CUSIPCheckDigitTest.java | 75 +
.../checkdigit/EAN13CheckDigitTest.java | 50 +
.../checkdigit/IBANCheckDigitTest.java | 255 +
.../checkdigit/ISBN10CheckDigitTest.java | 51 +
.../checkdigit/ISBNCheckDigitTest.java | 94 +
.../checkdigit/ISINCheckDigitTest.java | 74 +
.../checkdigit/ISSNCheckDigitTest.java | 67 +
.../checkdigit/LuhnCheckDigitTest.java | 60 +
.../ModulusTenABACheckDigitTest.java | 52 +
.../ModulusTenCUSIPCheckDigitTest.java | 74 +
.../ModulusTenEAN13CheckDigitTest.java | 49 +
.../ModulusTenLuhnCheckDigitTest.java | 59 +
.../ModulusTenSedolCheckDigitTest.java | 68 +
.../checkdigit/SedolCheckDigitTest.java | 69 +
.../checkdigit/VerhoeffCheckDigitTest.java | 56 +
.../commons/validator/util/FlagsTest.java | 132 +
.../commons/validator/DateTest-config.xml | 47 +
.../commons/validator/EmailTest-config.xml | 34 +
.../validator/EntityImportTest-byteform.xml | 19 +
.../validator/EntityImportTest-config.xml | 33 +
.../validator/ExceptionTest-config.xml | 34 +
.../validator/ExtensionTest-config.xml | 55 +
.../GenericTypeValidatorTest-config.xml | 122 +
.../commons/validator/LocaleTest-config.xml | 72 +
.../MultipleConfigFilesTest-1-config.xml | 84 +
.../MultipleConfigFilesTest-2-config.xml | 78 +
.../validator/MultipleTests-config.xml | 55 +
.../validator/ParameterTest-config.xml | 41 +
.../validator/RequiredIfTest-config.xml | 55 +
.../validator/RequiredNameTest-config.xml | 39 +
.../validator/RetrieveFormTest-config.xml | 157 +
.../commons/validator/TestNumber-config.xml | 80 +
.../validator/ValidatorResultsTest-config.xml | 55 +
.../commons/validator/VarTest-config.xml | 52 +
.../routines/checkdigit/IBANtests.txt | 113 +
Java-base/directory-mavibot/Dockerfile | 28 +
Java-base/directory-mavibot/src/LICENSE | 202 +
Java-base/directory-mavibot/src/NOTICE | 5 +
.../src/distribution/pom.xml | 90 +
.../distribution/src/main/assembly/bin.xml | 78 +
.../distribution/src/main/assembly/src.xml | 80 +
.../src/mavibot/img/BTree.graphml | 732 +++
.../src/mavibot/img/BTree.png | Bin 0 -> 8128 bytes
.../src/mavibot/img/ElementHolder.graphml | 195 +
.../src/mavibot/img/ElementHolder.png | Bin 0 -> 49955 bytes
.../src/mavibot/img/Leaf.graphml | 100 +
.../src/mavibot/img/Leaf.png | Bin 0 -> 7274 bytes
.../src/mavibot/img/MavibotValue.graphml | 349 ++
.../src/mavibot/img/MavibotValue.png | Bin 0 -> 50979 bytes
.../src/mavibot/img/Node.graphml | 66 +
.../src/mavibot/img/Node.png | Bin 0 -> 6911 bytes
.../src/mavibot/img/PageHierarchy.graphml | 122 +
.../src/mavibot/img/PageHierarchy.png | Bin 0 -> 8349 bytes
.../src/mavibot/img/PageIOLogical.graphml | 386 ++
.../src/mavibot/img/PageIOLogical.png | Bin 0 -> 4369 bytes
.../src/mavibot/img/PageMergeDelete.graphml | 2353 ++++++++++
.../src/mavibot/img/PageMergeDelete.png | Bin 0 -> 59696 bytes
.../src/mavibot/img/PageMergeMove.graphml | 2686 +++++++++++
.../src/mavibot/img/PageMergeMove.png | Bin 0 -> 57993 bytes
.../src/mavibot/img/R1-node.graphml | 138 +
.../src/mavibot/img/R1-node.png | Bin 0 -> 3596 bytes
.../src/mavibot/img/R2-node.graphml | 295 ++
.../src/mavibot/img/R2-node.png | Bin 0 -> 5893 bytes
.../src/mavibot/img/R3-node.graphml | 697 +++
.../src/mavibot/img/R3-node.png | Bin 0 -> 15746 bytes
.../src/mavibot/img/R4-node-bis.png | Bin 0 -> 27210 bytes
.../src/mavibot/img/R4-node.graphml | 1121 +++++
.../src/mavibot/img/R4-node.png | Bin 0 -> 26276 bytes
.../src/mavibot/img/RMHeader.graphml | 854 ++++
.../src/mavibot/img/RMHeader.png | Bin 0 -> 29839 bytes
.../src/mavibot/img/UC1.2.1.graphml | 1335 ++++++
.../src/mavibot/img/UC1.2.1.png | Bin 0 -> 41493 bytes
.../src/mavibot/img/UC1.2.2.graphml | 1778 +++++++
.../src/mavibot/img/UC1.2.2.png | Bin 0 -> 46814 bytes
.../src/mavibot/img/UC11.graphml | 1361 ++++++
.../src/mavibot/img/UC11.png | Bin 0 -> 35655 bytes
.../src/mavibot/img/abstractPage.graphml | 134 +
.../src/mavibot/img/abstractPage.png | Bin 0 -> 9152 bytes
.../src/mavibot/img/btreeHeader.graphml | 986 ++++
.../src/mavibot/img/btreeHeader.png | Bin 0 -> 42588 bytes
.../src/mavibot/img/datastructure.graphml | 2824 +++++++++++
.../src/mavibot/img/datastructure.png | Bin 0 -> 137629 bytes
.../src/mavibot/img/leaves.graphml | 1173 +++++
.../src/mavibot/img/leaves.png | Bin 0 -> 25267 bytes
.../src/mavibot/img/nodeLeaf.graphml | 2661 +++++++++++
.../src/mavibot/img/nodeLeaf.png | Bin 0 -> 51546 bytes
.../src/mavibot/img/nodes.graphml | 468 ++
.../src/mavibot/img/nodes.png | Bin 0 -> 16785 bytes
.../src/mavibot/img/trans1.graphml | 236 +
.../src/mavibot/img/trans1.png | Bin 0 -> 21167 bytes
.../src/mavibot/img/trans2.graphml | 407 ++
.../src/mavibot/img/trans2.png | Bin 0 -> 27611 bytes
.../src/mavibot/img/transko.graphml | 332 ++
.../src/mavibot/img/transko.png | Bin 0 -> 26104 bytes
.../src/mavibot/img/transok.graphml | 374 ++
.../src/mavibot/img/transok.png | Bin 0 -> 29608 bytes
.../directory-mavibot/src/mavibot/pom.xml | 108 +
.../mavibot/btree/AbstractBTree.java | 1119 +++++
.../AbstractBorrowedFromSiblingResult.java | 127 +
.../mavibot/btree/AbstractDeleteResult.java | 99 +
.../directory/mavibot/btree/AbstractPage.java | 699 +++
.../mavibot/btree/AbstractResult.java | 106 +
.../btree/AbstractTransactionManager.java | 30 +
.../mavibot/btree/AbstractValueHolder.java | 441 ++
.../directory/mavibot/btree/Addition.java | 43 +
.../apache/directory/mavibot/btree/BTree.java | 387 ++
.../directory/mavibot/btree/BTreeFactory.java | 906 ++++
.../directory/mavibot/btree/BTreeHeader.java | 315 ++
.../mavibot/btree/BTreeTypeEnum.java | 55 +
.../mavibot/btree/BorrowedFromLeftResult.java | 81 +
.../btree/BorrowedFromRightResult.java | 79 +
.../btree/BorrowedFromSiblingResult.java | 53 +
.../directory/mavibot/btree/BulkLoader.java | 1446 ++++++
.../directory/mavibot/btree/Cursor.java | 87 +
.../directory/mavibot/btree/DeleteResult.java | 43 +
.../directory/mavibot/btree/Deletion.java | 42 +
.../mavibot/btree/EmptyTupleCursor.java | 201 +
.../mavibot/btree/EmptyValueCursor.java | 188 +
.../directory/mavibot/btree/ExistsResult.java | 32 +
.../mavibot/btree/InMemoryBTree.java | 923 ++++
.../mavibot/btree/InMemoryBTreeBuilder.java | 501 ++
.../btree/InMemoryBTreeConfiguration.java | 322 ++
.../directory/mavibot/btree/InMemoryLeaf.java | 1029 ++++
.../directory/mavibot/btree/InMemoryNode.java | 1084 +++++
.../btree/InMemoryTransactionManager.java | 143 +
.../mavibot/btree/InMemoryValueHolder.java | 313 ++
.../directory/mavibot/btree/InsertResult.java | 35 +
.../directory/mavibot/btree/KeyCursor.java | 777 +++
.../directory/mavibot/btree/KeyHolder.java | 72 +
.../directory/mavibot/btree/LevelInfo.java | 261 ++
.../mavibot/btree/MavibotInspector.java | 1457 ++++++
.../btree/MergedWithSiblingResult.java | 76 +
.../directory/mavibot/btree/Modification.java | 50 +
.../directory/mavibot/btree/ModifyResult.java | 114 +
.../directory/mavibot/btree/NameRevision.java | 128 +
.../mavibot/btree/NameRevisionComparator.java | 87 +
.../mavibot/btree/NameRevisionSerializer.java | 248 +
.../mavibot/btree/NotPresentResult.java | 72 +
.../apache/directory/mavibot/btree/Page.java | 285 ++
.../directory/mavibot/btree/PageHolder.java | 60 +
.../directory/mavibot/btree/PageIO.java | 273 ++
.../mavibot/btree/PageReclaimer.java | 215 +
.../directory/mavibot/btree/ParentPos.java | 66 +
.../mavibot/btree/PersistedBTree.java | 817 ++++
.../mavibot/btree/PersistedBTreeBuilder.java | 211 +
.../btree/PersistedBTreeConfiguration.java | 290 ++
.../mavibot/btree/PersistedKeyHolder.java | 147 +
.../mavibot/btree/PersistedLeaf.java | 1447 ++++++
.../mavibot/btree/PersistedNode.java | 1188 +++++
.../mavibot/btree/PersistedPageHolder.java | 180 +
.../mavibot/btree/PersistedValueHolder.java | 801 ++++
.../directory/mavibot/btree/PoisonPill.java | 44 +
.../mavibot/btree/ReadTransaction.java | 167 +
.../mavibot/btree/RecordManager.java | 4158 +++++++++++++++++
.../directory/mavibot/btree/RemoveResult.java | 75 +
.../directory/mavibot/btree/Result.java | 47 +
.../directory/mavibot/btree/RevisionName.java | 138 +
.../mavibot/btree/RevisionNameComparator.java | 67 +
.../mavibot/btree/RevisionNameSerializer.java | 248 +
.../mavibot/btree/RevisionOffset.java | 117 +
.../btree/RevisionOffsetComparator.java | 80 +
.../btree/RevisionOffsetSerializer.java | 199 +
.../directory/mavibot/btree/SplitResult.java | 120 +
.../mavibot/btree/TransactionManager.java | 64 +
.../apache/directory/mavibot/btree/Tuple.java | 194 +
.../mavibot/btree/TupleComparator.java | 71 +
.../directory/mavibot/btree/TupleCursor.java | 1004 ++++
.../mavibot/btree/ValueArrayCursor.java | 174 +
.../mavibot/btree/ValueBTreeCursor.java | 233 +
.../directory/mavibot/btree/ValueCursor.java | 64 +
.../directory/mavibot/btree/ValueHolder.java | 92 +
.../mavibot/btree/WriteTransaction.java | 92 +
.../comparator/BooleanArrayComparator.java | 109 +
.../btree/comparator/BooleanComparator.java | 70 +
.../btree/comparator/ByteArrayComparator.java | 128 +
.../btree/comparator/ByteComparator.java | 81 +
.../btree/comparator/CharArrayComparator.java | 136 +
.../btree/comparator/CharComparator.java | 92 +
.../btree/comparator/IntArrayComparator.java | 135 +
.../btree/comparator/IntComparator.java | 81 +
.../btree/comparator/LongArrayComparator.java | 135 +
.../btree/comparator/LongComparator.java | 90 +
.../comparator/ShortArrayComparator.java | 135 +
.../btree/comparator/ShortComparator.java | 92 +
.../btree/comparator/StringComparator.java | 82 +
.../BTreeAlreadyCreatedException.java | 72 +
.../BTreeAlreadyManagedException.java | 73 +
.../exception/BTreeCreationException.java | 72 +
.../exception/BTreeOperationException.java | 72 +
.../BadTransactionStateException.java | 72 +
.../DuplicateValueNotAllowedException.java | 73 +
.../exception/EndOfFileExceededException.java | 75 +
.../btree/exception/FileException.java | 72 +
.../btree/exception/FreePageException.java | 72 +
.../exception/InitializationException.java | 72 +
.../exception/InvalidBTreeException.java | 72 +
.../exception/InvalidOffsetException.java | 72 +
.../btree/exception/KeyNotFoundException.java | 76 +
.../exception/MissingSerializerException.java | 72 +
.../PageSizeAlreadySetException.java | 74 +
.../exception/RecordManagerException.java | 72 +
.../SerializerCreationException.java | 72 +
.../mavibot/btree/memory/BulkDataSorter.java | 273 ++
.../btree/persisted/BulkDataSorter.java | 273 ++
.../serializer/AbstractElementSerializer.java | 109 +
.../btree/serializer/BooleanSerializer.java | 169 +
.../btree/serializer/BufferHandler.java | 144 +
.../btree/serializer/ByteArraySerializer.java | 344 ++
.../btree/serializer/ByteSerializer.java | 164 +
.../btree/serializer/CharArraySerializer.java | 279 ++
.../btree/serializer/CharSerializer.java | 167 +
.../btree/serializer/ElementSerializer.java | 111 +
.../btree/serializer/IntSerializer.java | 171 +
.../btree/serializer/LongArraySerializer.java | 334 ++
.../btree/serializer/LongSerializer.java | 189 +
.../mavibot/btree/serializer/Serializer.java | 67 +
.../btree/serializer/ShortSerializer.java | 165 +
.../btree/serializer/StringSerializer.java | 381 ++
.../btree/util/IntTupleReaderWriter.java | 75 +
.../directory/mavibot/btree/util/Strings.java | 571 +++
.../mavibot/btree/util/TupleReaderWriter.java | 44 +
.../mavibot/btree/BulkLoaderTest.java | 1189 +++++
.../btree/InMemoryBTreeBuilderTest.java | 82 +
.../btree/InMemoryBTreeConfigurationTest.java | 244 +
.../btree/InMemoryBTreeDuplicateKeyTest.java | 768 +++
.../mavibot/btree/InMemoryBTreeFlushTest.java | 298 ++
.../mavibot/btree/InMemoryBTreeTest.java | 2011 ++++++++
.../mavibot/btree/InMemoryBTreeTestOps.java | 115 +
.../btree/InMemoryBulkDataSorterTest.java | 187 +
.../mavibot/btree/InMemoryLeafTest.java | 446 ++
.../btree/MultiThreadedInMemoryBtreeTest.java | 343 ++
.../mavibot/btree/PageReclaimerTest.java | 335 ++
.../btree/PersistedBTreeBrowseTest.java | 1292 +++++
.../btree/PersistedBTreeBuilderTest.java | 100 +
.../btree/PersistedBTreeDuplicateKeyTest.java | 850 ++++
.../btree/PersistedBTreeTransactionTest.java | 170 +
.../mavibot/btree/PersistedReadTest.java | 360 ++
.../mavibot/btree/PersistedStoreTest.java | 462 ++
.../btree/PersistedSubBtreeKeyCursorTest.java | 132 +
.../btree/RecordManagerFreePageTest.java | 204 +
.../btree/RecordManagerPrivateMethodTest.java | 144 +
.../mavibot/btree/RecordManagerTest.java | 962 ++++
.../RecordManagerWithDuplicatesTest.java | 207 +
.../btree/RevisionNameComparatorTest.java | 47 +
.../btree/RevisionNameSerializerTest.java | 83 +
.../BooleanArrayComparatorTest.java | 82 +
.../comparator/BooleanComparatorTest.java | 50 +
.../comparator/ByteArrayComparatorTest.java | 87 +
.../btree/comparator/ByteComparatorTest.java | 53 +
.../comparator/CharArrayComparatorTest.java | 86 +
.../btree/comparator/CharComparatorTest.java | 49 +
.../comparator/IntArrayComparatorTest.java | 86 +
.../btree/comparator/IntComparatorTest.java | 51 +
.../comparator/LongArrayComparatorTest.java | 86 +
.../btree/comparator/LongComparatorTest.java | 51 +
.../comparator/ShortArrayComparatorTest.java | 86 +
.../btree/comparator/ShortComparatorTest.java | 51 +
.../comparator/StringComparatorTest.java | 51 +
.../serializer/BooleanSerializerTest.java | 58 +
.../serializer/ByteArraySerializerTest.java | 85 +
.../btree/serializer/ByteSerializerTest.java | 82 +
.../btree/serializer/CharSerializerTest.java | 105 +
.../btree/serializer/IntSerializerTest.java | 163 +
.../serializer/LongArraySerializerTest.java | 129 +
.../btree/serializer/LongSerializerTest.java | 354 ++
.../btree/serializer/ShortSerializerTest.java | 102 +
.../serializer/StringSerializerTest.java | 103 +
.../src/test/resources/log4j.properties | 36 +
Java-base/directory-mavibot/src/pom.xml | 451 ++
Java-base/geronimo-jcache-simple/Dockerfile | 28 +
Java-base/geronimo-jcache-simple/build.sh | 1 +
.../geronimo-jcache-simple/src/README.adoc | 12 +
Java-base/geronimo-jcache-simple/src/pom.xml | 325 ++
.../geronimo/jcache/simple/Asserts.java | 32 +
.../jcache/simple/ClassLoaderAwareCache.java | 372 ++
.../ConfigurableMBeanServerIdBuilder.java | 153 +
.../simple/ExceptionWrapperHandler.java | 69 +
.../apache/geronimo/jcache/simple/JMXs.java | 65 +
.../geronimo/jcache/simple/NoLoader.java | 48 +
.../geronimo/jcache/simple/NoWriter.java | 54 +
.../jcache/simple/Serializations.java | 127 +
.../geronimo/jcache/simple/SimpleCache.java | 876 ++++
.../jcache/simple/SimpleCacheMXBean.java | 92 +
.../simple/SimpleCacheStatisticsMXBean.java | 106 +
.../jcache/simple/SimpleConfiguration.java | 172 +
.../geronimo/jcache/simple/SimpleElement.java | 42 +
.../geronimo/jcache/simple/SimpleEntry.java | 51 +
.../geronimo/jcache/simple/SimpleEvent.java | 69 +
.../geronimo/jcache/simple/SimpleKey.java | 59 +
.../jcache/simple/SimpleListener.java | 126 +
.../geronimo/jcache/simple/SimpleManager.java | 285 ++
.../jcache/simple/SimpleMutableEntry.java | 67 +
.../jcache/simple/SimpleProvider.java | 136 +
.../jcache/simple/SimpleThreadFactory.java | 47 +
.../geronimo/jcache/simple/Statistics.java | 139 +
.../jcache/simple/TempStateCacheView.java | 283 ++
.../apache/geronimo/jcache/simple/Times.java | 33 +
.../jcache/simple/cdi/CDIJCacheHelper.java | 557 +++
.../cdi/CacheInvocationContextImpl.java | 91 +
.../cdi/CacheInvocationParameterImpl.java | 63 +
.../simple/cdi/CacheKeyGeneratorImpl.java | 39 +
.../cdi/CacheKeyInvocationContextImpl.java | 54 +
.../simple/cdi/CacheMethodDetailsImpl.java | 68 +
.../simple/cdi/CachePutInterceptor.java | 97 +
.../simple/cdi/CacheRemoveAllInterceptor.java | 94 +
.../simple/cdi/CacheRemoveInterceptor.java | 97 +
.../simple/cdi/CacheResolverFactoryImpl.java | 83 +
.../jcache/simple/cdi/CacheResolverImpl.java | 39 +
.../simple/cdi/CacheResultInterceptor.java | 112 +
.../simple/cdi/GeneratedCacheKeyImpl.java | 53 +
.../cdi/MakeJCacheCDIInterceptorFriendly.java | 192 +
.../jcache/simple/osgi/JCacheActivator.java | 78 +
.../jcache/simple/osgi/package-info.java | 22 +
.../services/javax.cache.spi.CachingProvider | 1 +
.../javax.enterprise.inject.spi.Extension | 1 +
.../tck/CacheResultCompletionStageTest.java | 118 +
.../jcache/simple/tck/ExpiryListenerTest.java | 96 +
.../jcache/simple/tck/OWBBeanProvider.java | 59 +
.../src/src/test/resources/ExcludeList | 19 +
.../javax.cache.annotation.BeanProvider | 1 +
493 files changed, 120181 insertions(+)
create mode 100644 Java-base/commons-validator/Dockerfile
create mode 100644 Java-base/commons-validator/src/BUILDING.txt
create mode 100644 Java-base/commons-validator/src/CONTRIBUTING.md
create mode 100644 Java-base/commons-validator/src/LICENSE.txt
create mode 100644 Java-base/commons-validator/src/NOTICE.txt
create mode 100644 Java-base/commons-validator/src/PROPOSAL.html
create mode 100644 Java-base/commons-validator/src/README.md
create mode 100644 Java-base/commons-validator/src/RELEASE-NOTES.txt
create mode 100644 Java-base/commons-validator/src/checkstyle-suppressions.xml
create mode 100644 Java-base/commons-validator/src/checkstyle.xml
create mode 100644 Java-base/commons-validator/src/pom.xml
create mode 100644 Java-base/commons-validator/src/src/assembly/bin.xml
create mode 100644 Java-base/commons-validator/src/src/assembly/src.xml
create mode 100644 Java-base/commons-validator/src/src/changes/changes.xml
create mode 100644 Java-base/commons-validator/src/src/changes/release-notes.vm
create mode 100644 Java-base/commons-validator/src/src/example/org/apache/commons/validator/example/ValidateBean.java
create mode 100644 Java-base/commons-validator/src/src/example/org/apache/commons/validator/example/ValidateExample.java
create mode 100644 Java-base/commons-validator/src/src/example/org/apache/commons/validator/example/applicationResources.properties
create mode 100644 Java-base/commons-validator/src/src/example/org/apache/commons/validator/example/validator-example.xml
create mode 100644 Java-base/commons-validator/src/src/main/java/org/apache/commons/validator/Arg.java
create mode 100644 Java-base/commons-validator/src/src/main/java/org/apache/commons/validator/CreditCardValidator.java
create mode 100644 Java-base/commons-validator/src/src/main/java/org/apache/commons/validator/DateValidator.java
create mode 100644 Java-base/commons-validator/src/src/main/java/org/apache/commons/validator/EmailValidator.java
create mode 100644 Java-base/commons-validator/src/src/main/java/org/apache/commons/validator/Field.java
create mode 100644 Java-base/commons-validator/src/src/main/java/org/apache/commons/validator/Form.java
create mode 100644 Java-base/commons-validator/src/src/main/java/org/apache/commons/validator/FormSet.java
create mode 100644 Java-base/commons-validator/src/src/main/java/org/apache/commons/validator/FormSetFactory.java
create mode 100644 Java-base/commons-validator/src/src/main/java/org/apache/commons/validator/GenericTypeValidator.java
create mode 100644 Java-base/commons-validator/src/src/main/java/org/apache/commons/validator/GenericValidator.java
create mode 100644 Java-base/commons-validator/src/src/main/java/org/apache/commons/validator/ISBNValidator.java
create mode 100644 Java-base/commons-validator/src/src/main/java/org/apache/commons/validator/Msg.java
create mode 100644 Java-base/commons-validator/src/src/main/java/org/apache/commons/validator/UrlValidator.java
create mode 100644 Java-base/commons-validator/src/src/main/java/org/apache/commons/validator/Validator.java
create mode 100644 Java-base/commons-validator/src/src/main/java/org/apache/commons/validator/ValidatorAction.java
create mode 100644 Java-base/commons-validator/src/src/main/java/org/apache/commons/validator/ValidatorException.java
create mode 100644 Java-base/commons-validator/src/src/main/java/org/apache/commons/validator/ValidatorResources.java
create mode 100644 Java-base/commons-validator/src/src/main/java/org/apache/commons/validator/ValidatorResult.java
create mode 100644 Java-base/commons-validator/src/src/main/java/org/apache/commons/validator/ValidatorResults.java
create mode 100644 Java-base/commons-validator/src/src/main/java/org/apache/commons/validator/Var.java
create mode 100644 Java-base/commons-validator/src/src/main/java/org/apache/commons/validator/package.html
create mode 100644 Java-base/commons-validator/src/src/main/java/org/apache/commons/validator/routines/AbstractCalendarValidator.java
create mode 100644 Java-base/commons-validator/src/src/main/java/org/apache/commons/validator/routines/AbstractFormatValidator.java
create mode 100644 Java-base/commons-validator/src/src/main/java/org/apache/commons/validator/routines/AbstractNumberValidator.java
create mode 100644 Java-base/commons-validator/src/src/main/java/org/apache/commons/validator/routines/BigDecimalValidator.java
create mode 100644 Java-base/commons-validator/src/src/main/java/org/apache/commons/validator/routines/BigIntegerValidator.java
create mode 100644 Java-base/commons-validator/src/src/main/java/org/apache/commons/validator/routines/ByteValidator.java
create mode 100644 Java-base/commons-validator/src/src/main/java/org/apache/commons/validator/routines/CalendarValidator.java
create mode 100644 Java-base/commons-validator/src/src/main/java/org/apache/commons/validator/routines/CodeValidator.java
create mode 100644 Java-base/commons-validator/src/src/main/java/org/apache/commons/validator/routines/CreditCardValidator.java
create mode 100644 Java-base/commons-validator/src/src/main/java/org/apache/commons/validator/routines/CurrencyValidator.java
create mode 100644 Java-base/commons-validator/src/src/main/java/org/apache/commons/validator/routines/DateValidator.java
create mode 100644 Java-base/commons-validator/src/src/main/java/org/apache/commons/validator/routines/DomainValidator.java
create mode 100644 Java-base/commons-validator/src/src/main/java/org/apache/commons/validator/routines/DoubleValidator.java
create mode 100644 Java-base/commons-validator/src/src/main/java/org/apache/commons/validator/routines/EmailValidator.java
create mode 100644 Java-base/commons-validator/src/src/main/java/org/apache/commons/validator/routines/FloatValidator.java
create mode 100644 Java-base/commons-validator/src/src/main/java/org/apache/commons/validator/routines/IBANValidator.java
create mode 100644 Java-base/commons-validator/src/src/main/java/org/apache/commons/validator/routines/ISBNValidator.java
create mode 100644 Java-base/commons-validator/src/src/main/java/org/apache/commons/validator/routines/ISINValidator.java
create mode 100644 Java-base/commons-validator/src/src/main/java/org/apache/commons/validator/routines/ISSNValidator.java
create mode 100644 Java-base/commons-validator/src/src/main/java/org/apache/commons/validator/routines/InetAddressValidator.java
create mode 100644 Java-base/commons-validator/src/src/main/java/org/apache/commons/validator/routines/IntegerValidator.java
create mode 100644 Java-base/commons-validator/src/src/main/java/org/apache/commons/validator/routines/LongValidator.java
create mode 100644 Java-base/commons-validator/src/src/main/java/org/apache/commons/validator/routines/PercentValidator.java
create mode 100644 Java-base/commons-validator/src/src/main/java/org/apache/commons/validator/routines/RegexValidator.java
create mode 100644 Java-base/commons-validator/src/src/main/java/org/apache/commons/validator/routines/ShortValidator.java
create mode 100644 Java-base/commons-validator/src/src/main/java/org/apache/commons/validator/routines/TimeValidator.java
create mode 100644 Java-base/commons-validator/src/src/main/java/org/apache/commons/validator/routines/UrlValidator.java
create mode 100644 Java-base/commons-validator/src/src/main/java/org/apache/commons/validator/routines/checkdigit/ABANumberCheckDigit.java
create mode 100644 Java-base/commons-validator/src/src/main/java/org/apache/commons/validator/routines/checkdigit/CUSIPCheckDigit.java
create mode 100644 Java-base/commons-validator/src/src/main/java/org/apache/commons/validator/routines/checkdigit/CheckDigit.java
create mode 100644 Java-base/commons-validator/src/src/main/java/org/apache/commons/validator/routines/checkdigit/CheckDigitException.java
create mode 100644 Java-base/commons-validator/src/src/main/java/org/apache/commons/validator/routines/checkdigit/EAN13CheckDigit.java
create mode 100644 Java-base/commons-validator/src/src/main/java/org/apache/commons/validator/routines/checkdigit/IBANCheckDigit.java
create mode 100644 Java-base/commons-validator/src/src/main/java/org/apache/commons/validator/routines/checkdigit/ISBN10CheckDigit.java
create mode 100644 Java-base/commons-validator/src/src/main/java/org/apache/commons/validator/routines/checkdigit/ISBNCheckDigit.java
create mode 100644 Java-base/commons-validator/src/src/main/java/org/apache/commons/validator/routines/checkdigit/ISINCheckDigit.java
create mode 100644 Java-base/commons-validator/src/src/main/java/org/apache/commons/validator/routines/checkdigit/ISSNCheckDigit.java
create mode 100644 Java-base/commons-validator/src/src/main/java/org/apache/commons/validator/routines/checkdigit/LuhnCheckDigit.java
create mode 100644 Java-base/commons-validator/src/src/main/java/org/apache/commons/validator/routines/checkdigit/ModulusCheckDigit.java
create mode 100644 Java-base/commons-validator/src/src/main/java/org/apache/commons/validator/routines/checkdigit/ModulusTenCheckDigit.java
create mode 100644 Java-base/commons-validator/src/src/main/java/org/apache/commons/validator/routines/checkdigit/SedolCheckDigit.java
create mode 100644 Java-base/commons-validator/src/src/main/java/org/apache/commons/validator/routines/checkdigit/VerhoeffCheckDigit.java
create mode 100644 Java-base/commons-validator/src/src/main/java/org/apache/commons/validator/routines/checkdigit/package.html
create mode 100644 Java-base/commons-validator/src/src/main/java/org/apache/commons/validator/routines/package.html
create mode 100644 Java-base/commons-validator/src/src/main/java/org/apache/commons/validator/util/Flags.java
create mode 100644 Java-base/commons-validator/src/src/main/java/org/apache/commons/validator/util/ValidatorUtils.java
create mode 100644 Java-base/commons-validator/src/src/main/java/org/apache/commons/validator/util/package.html
create mode 100644 Java-base/commons-validator/src/src/main/resources/org/apache/commons/validator/digester-rules.xml
create mode 100644 Java-base/commons-validator/src/src/main/resources/org/apache/commons/validator/resources/validator_1_0.dtd
create mode 100644 Java-base/commons-validator/src/src/main/resources/org/apache/commons/validator/resources/validator_1_0_1.dtd
create mode 100644 Java-base/commons-validator/src/src/main/resources/org/apache/commons/validator/resources/validator_1_1.dtd
create mode 100644 Java-base/commons-validator/src/src/main/resources/org/apache/commons/validator/resources/validator_1_1_3.dtd
create mode 100644 Java-base/commons-validator/src/src/main/resources/org/apache/commons/validator/resources/validator_1_2_0.dtd
create mode 100644 Java-base/commons-validator/src/src/main/resources/org/apache/commons/validator/resources/validator_1_3_0.dtd
create mode 100644 Java-base/commons-validator/src/src/main/resources/org/apache/commons/validator/resources/validator_1_4_0.dtd
create mode 100755 Java-base/commons-validator/src/src/site/resources/download_validator.cgi
create mode 100644 Java-base/commons-validator/src/src/site/resources/images/logo.png
create mode 100644 Java-base/commons-validator/src/src/site/site.xml
create mode 100644 Java-base/commons-validator/src/src/site/xdoc/building.xml
create mode 100644 Java-base/commons-validator/src/src/site/xdoc/community.xml
create mode 100644 Java-base/commons-validator/src/src/site/xdoc/download_validator.xml
create mode 100644 Java-base/commons-validator/src/src/site/xdoc/index.xml
create mode 100644 Java-base/commons-validator/src/src/site/xdoc/issue-tracking.xml
create mode 100644 Java-base/commons-validator/src/src/site/xdoc/mail-lists.xml
create mode 100644 Java-base/commons-validator/src/src/site/xdoc/tasks.xml
create mode 100644 Java-base/commons-validator/src/src/site/xdoc/validator_2_0_0_proposal.dtd
create mode 100644 Java-base/commons-validator/src/src/test/java/org/apache/commons/validator/AbstractCommonTest.java
create mode 100644 Java-base/commons-validator/src/src/test/java/org/apache/commons/validator/AbstractNumberTest.java
create mode 100644 Java-base/commons-validator/src/src/test/java/org/apache/commons/validator/ByteTest.java
create mode 100644 Java-base/commons-validator/src/src/test/java/org/apache/commons/validator/CreditCardValidatorTest.java
create mode 100644 Java-base/commons-validator/src/src/test/java/org/apache/commons/validator/CustomValidatorResourcesTest.java
create mode 100644 Java-base/commons-validator/src/src/test/java/org/apache/commons/validator/DateTest.java
create mode 100644 Java-base/commons-validator/src/src/test/java/org/apache/commons/validator/DoubleTest.java
create mode 100644 Java-base/commons-validator/src/src/test/java/org/apache/commons/validator/EmailTest.java
create mode 100644 Java-base/commons-validator/src/src/test/java/org/apache/commons/validator/EntityImportTest.java
create mode 100644 Java-base/commons-validator/src/src/test/java/org/apache/commons/validator/ExceptionTest.java
create mode 100644 Java-base/commons-validator/src/src/test/java/org/apache/commons/validator/ExtensionTest.java
create mode 100644 Java-base/commons-validator/src/src/test/java/org/apache/commons/validator/FieldTest.java
create mode 100644 Java-base/commons-validator/src/src/test/java/org/apache/commons/validator/FloatTest.java
create mode 100644 Java-base/commons-validator/src/src/test/java/org/apache/commons/validator/GenericTypeValidatorImpl.java
create mode 100644 Java-base/commons-validator/src/src/test/java/org/apache/commons/validator/GenericTypeValidatorTest.java
create mode 100644 Java-base/commons-validator/src/src/test/java/org/apache/commons/validator/GenericValidatorImpl.java
create mode 100644 Java-base/commons-validator/src/src/test/java/org/apache/commons/validator/GenericValidatorTest.java
create mode 100644 Java-base/commons-validator/src/src/test/java/org/apache/commons/validator/ISBNValidatorTest.java
create mode 100644 Java-base/commons-validator/src/src/test/java/org/apache/commons/validator/IntegerTest.java
create mode 100644 Java-base/commons-validator/src/src/test/java/org/apache/commons/validator/LocaleTest.java
create mode 100644 Java-base/commons-validator/src/src/test/java/org/apache/commons/validator/LongTest.java
create mode 100644 Java-base/commons-validator/src/src/test/java/org/apache/commons/validator/MultipleConfigFilesTest.java
create mode 100644 Java-base/commons-validator/src/src/test/java/org/apache/commons/validator/MultipleTest.java
create mode 100644 Java-base/commons-validator/src/src/test/java/org/apache/commons/validator/NameBean.java
create mode 100644 Java-base/commons-validator/src/src/test/java/org/apache/commons/validator/ParameterTest.java
create mode 100644 Java-base/commons-validator/src/src/test/java/org/apache/commons/validator/ParameterValidatorImpl.java
create mode 100644 Java-base/commons-validator/src/src/test/java/org/apache/commons/validator/RequiredIfTest.java
create mode 100644 Java-base/commons-validator/src/src/test/java/org/apache/commons/validator/RequiredNameTest.java
create mode 100644 Java-base/commons-validator/src/src/test/java/org/apache/commons/validator/ResultPair.java
create mode 100644 Java-base/commons-validator/src/src/test/java/org/apache/commons/validator/RetrieveFormTest.java
create mode 100644 Java-base/commons-validator/src/src/test/java/org/apache/commons/validator/ShortTest.java
create mode 100644 Java-base/commons-validator/src/src/test/java/org/apache/commons/validator/TypeBean.java
create mode 100644 Java-base/commons-validator/src/src/test/java/org/apache/commons/validator/UrlTest.java
create mode 100644 Java-base/commons-validator/src/src/test/java/org/apache/commons/validator/ValidatorResourcesTest.java
create mode 100644 Java-base/commons-validator/src/src/test/java/org/apache/commons/validator/ValidatorResultsTest.java
create mode 100644 Java-base/commons-validator/src/src/test/java/org/apache/commons/validator/ValidatorTest.java
create mode 100644 Java-base/commons-validator/src/src/test/java/org/apache/commons/validator/ValueBean.java
create mode 100644 Java-base/commons-validator/src/src/test/java/org/apache/commons/validator/VarTest.java
create mode 100644 Java-base/commons-validator/src/src/test/java/org/apache/commons/validator/custom/CustomValidatorResources.java
create mode 100644 Java-base/commons-validator/src/src/test/java/org/apache/commons/validator/routines/AbstractCalendarValidatorTest.java
create mode 100644 Java-base/commons-validator/src/src/test/java/org/apache/commons/validator/routines/AbstractNumberValidatorTest.java
create mode 100644 Java-base/commons-validator/src/src/test/java/org/apache/commons/validator/routines/BigDecimalValidatorTest.java
create mode 100644 Java-base/commons-validator/src/src/test/java/org/apache/commons/validator/routines/BigIntegerValidatorTest.java
create mode 100644 Java-base/commons-validator/src/src/test/java/org/apache/commons/validator/routines/ByteValidatorTest.java
create mode 100644 Java-base/commons-validator/src/src/test/java/org/apache/commons/validator/routines/CalendarValidatorTest.java
create mode 100644 Java-base/commons-validator/src/src/test/java/org/apache/commons/validator/routines/CodeValidatorTest.java
create mode 100644 Java-base/commons-validator/src/src/test/java/org/apache/commons/validator/routines/CreditCardValidatorTest.java
create mode 100644 Java-base/commons-validator/src/src/test/java/org/apache/commons/validator/routines/CurrencyValidatorTest.java
create mode 100644 Java-base/commons-validator/src/src/test/java/org/apache/commons/validator/routines/DateValidatorTest.java
create mode 100644 Java-base/commons-validator/src/src/test/java/org/apache/commons/validator/routines/DomainValidatorTest.java
create mode 100644 Java-base/commons-validator/src/src/test/java/org/apache/commons/validator/routines/DoubleValidatorTest.java
create mode 100644 Java-base/commons-validator/src/src/test/java/org/apache/commons/validator/routines/EmailValidatorTest.java
create mode 100644 Java-base/commons-validator/src/src/test/java/org/apache/commons/validator/routines/FloatValidatorTest.java
create mode 100644 Java-base/commons-validator/src/src/test/java/org/apache/commons/validator/routines/IBANValidatorTest.java
create mode 100644 Java-base/commons-validator/src/src/test/java/org/apache/commons/validator/routines/ISBNValidatorTest.java
create mode 100644 Java-base/commons-validator/src/src/test/java/org/apache/commons/validator/routines/ISINValidatorTest.java
create mode 100644 Java-base/commons-validator/src/src/test/java/org/apache/commons/validator/routines/ISSNValidatorTest.java
create mode 100644 Java-base/commons-validator/src/src/test/java/org/apache/commons/validator/routines/InetAddressValidatorTest.java
create mode 100644 Java-base/commons-validator/src/src/test/java/org/apache/commons/validator/routines/IntegerValidatorTest.java
create mode 100644 Java-base/commons-validator/src/src/test/java/org/apache/commons/validator/routines/LongValidatorTest.java
create mode 100644 Java-base/commons-validator/src/src/test/java/org/apache/commons/validator/routines/PercentValidatorTest.java
create mode 100644 Java-base/commons-validator/src/src/test/java/org/apache/commons/validator/routines/RegexValidatorTest.java
create mode 100644 Java-base/commons-validator/src/src/test/java/org/apache/commons/validator/routines/ShortValidatorTest.java
create mode 100644 Java-base/commons-validator/src/src/test/java/org/apache/commons/validator/routines/TimeValidatorTest.java
create mode 100644 Java-base/commons-validator/src/src/test/java/org/apache/commons/validator/routines/UrlValidatorTest.java
create mode 100644 Java-base/commons-validator/src/src/test/java/org/apache/commons/validator/routines/checkdigit/ABANumberCheckDigitTest.java
create mode 100644 Java-base/commons-validator/src/src/test/java/org/apache/commons/validator/routines/checkdigit/AbstractCheckDigitTest.java
create mode 100644 Java-base/commons-validator/src/src/test/java/org/apache/commons/validator/routines/checkdigit/CUSIPCheckDigitTest.java
create mode 100644 Java-base/commons-validator/src/src/test/java/org/apache/commons/validator/routines/checkdigit/EAN13CheckDigitTest.java
create mode 100644 Java-base/commons-validator/src/src/test/java/org/apache/commons/validator/routines/checkdigit/IBANCheckDigitTest.java
create mode 100644 Java-base/commons-validator/src/src/test/java/org/apache/commons/validator/routines/checkdigit/ISBN10CheckDigitTest.java
create mode 100644 Java-base/commons-validator/src/src/test/java/org/apache/commons/validator/routines/checkdigit/ISBNCheckDigitTest.java
create mode 100644 Java-base/commons-validator/src/src/test/java/org/apache/commons/validator/routines/checkdigit/ISINCheckDigitTest.java
create mode 100644 Java-base/commons-validator/src/src/test/java/org/apache/commons/validator/routines/checkdigit/ISSNCheckDigitTest.java
create mode 100644 Java-base/commons-validator/src/src/test/java/org/apache/commons/validator/routines/checkdigit/LuhnCheckDigitTest.java
create mode 100644 Java-base/commons-validator/src/src/test/java/org/apache/commons/validator/routines/checkdigit/ModulusTenABACheckDigitTest.java
create mode 100644 Java-base/commons-validator/src/src/test/java/org/apache/commons/validator/routines/checkdigit/ModulusTenCUSIPCheckDigitTest.java
create mode 100644 Java-base/commons-validator/src/src/test/java/org/apache/commons/validator/routines/checkdigit/ModulusTenEAN13CheckDigitTest.java
create mode 100644 Java-base/commons-validator/src/src/test/java/org/apache/commons/validator/routines/checkdigit/ModulusTenLuhnCheckDigitTest.java
create mode 100644 Java-base/commons-validator/src/src/test/java/org/apache/commons/validator/routines/checkdigit/ModulusTenSedolCheckDigitTest.java
create mode 100644 Java-base/commons-validator/src/src/test/java/org/apache/commons/validator/routines/checkdigit/SedolCheckDigitTest.java
create mode 100644 Java-base/commons-validator/src/src/test/java/org/apache/commons/validator/routines/checkdigit/VerhoeffCheckDigitTest.java
create mode 100644 Java-base/commons-validator/src/src/test/java/org/apache/commons/validator/util/FlagsTest.java
create mode 100644 Java-base/commons-validator/src/src/test/resources/org/apache/commons/validator/DateTest-config.xml
create mode 100644 Java-base/commons-validator/src/src/test/resources/org/apache/commons/validator/EmailTest-config.xml
create mode 100644 Java-base/commons-validator/src/src/test/resources/org/apache/commons/validator/EntityImportTest-byteform.xml
create mode 100644 Java-base/commons-validator/src/src/test/resources/org/apache/commons/validator/EntityImportTest-config.xml
create mode 100644 Java-base/commons-validator/src/src/test/resources/org/apache/commons/validator/ExceptionTest-config.xml
create mode 100644 Java-base/commons-validator/src/src/test/resources/org/apache/commons/validator/ExtensionTest-config.xml
create mode 100644 Java-base/commons-validator/src/src/test/resources/org/apache/commons/validator/GenericTypeValidatorTest-config.xml
create mode 100644 Java-base/commons-validator/src/src/test/resources/org/apache/commons/validator/LocaleTest-config.xml
create mode 100644 Java-base/commons-validator/src/src/test/resources/org/apache/commons/validator/MultipleConfigFilesTest-1-config.xml
create mode 100644 Java-base/commons-validator/src/src/test/resources/org/apache/commons/validator/MultipleConfigFilesTest-2-config.xml
create mode 100644 Java-base/commons-validator/src/src/test/resources/org/apache/commons/validator/MultipleTests-config.xml
create mode 100644 Java-base/commons-validator/src/src/test/resources/org/apache/commons/validator/ParameterTest-config.xml
create mode 100644 Java-base/commons-validator/src/src/test/resources/org/apache/commons/validator/RequiredIfTest-config.xml
create mode 100644 Java-base/commons-validator/src/src/test/resources/org/apache/commons/validator/RequiredNameTest-config.xml
create mode 100644 Java-base/commons-validator/src/src/test/resources/org/apache/commons/validator/RetrieveFormTest-config.xml
create mode 100644 Java-base/commons-validator/src/src/test/resources/org/apache/commons/validator/TestNumber-config.xml
create mode 100644 Java-base/commons-validator/src/src/test/resources/org/apache/commons/validator/ValidatorResultsTest-config.xml
create mode 100644 Java-base/commons-validator/src/src/test/resources/org/apache/commons/validator/VarTest-config.xml
create mode 100644 Java-base/commons-validator/src/src/test/resources/org/apache/commons/validator/routines/checkdigit/IBANtests.txt
create mode 100644 Java-base/directory-mavibot/Dockerfile
create mode 100644 Java-base/directory-mavibot/src/LICENSE
create mode 100644 Java-base/directory-mavibot/src/NOTICE
create mode 100644 Java-base/directory-mavibot/src/distribution/pom.xml
create mode 100644 Java-base/directory-mavibot/src/distribution/src/main/assembly/bin.xml
create mode 100644 Java-base/directory-mavibot/src/distribution/src/main/assembly/src.xml
create mode 100644 Java-base/directory-mavibot/src/mavibot/img/BTree.graphml
create mode 100644 Java-base/directory-mavibot/src/mavibot/img/BTree.png
create mode 100644 Java-base/directory-mavibot/src/mavibot/img/ElementHolder.graphml
create mode 100644 Java-base/directory-mavibot/src/mavibot/img/ElementHolder.png
create mode 100644 Java-base/directory-mavibot/src/mavibot/img/Leaf.graphml
create mode 100644 Java-base/directory-mavibot/src/mavibot/img/Leaf.png
create mode 100644 Java-base/directory-mavibot/src/mavibot/img/MavibotValue.graphml
create mode 100644 Java-base/directory-mavibot/src/mavibot/img/MavibotValue.png
create mode 100644 Java-base/directory-mavibot/src/mavibot/img/Node.graphml
create mode 100644 Java-base/directory-mavibot/src/mavibot/img/Node.png
create mode 100644 Java-base/directory-mavibot/src/mavibot/img/PageHierarchy.graphml
create mode 100644 Java-base/directory-mavibot/src/mavibot/img/PageHierarchy.png
create mode 100644 Java-base/directory-mavibot/src/mavibot/img/PageIOLogical.graphml
create mode 100644 Java-base/directory-mavibot/src/mavibot/img/PageIOLogical.png
create mode 100644 Java-base/directory-mavibot/src/mavibot/img/PageMergeDelete.graphml
create mode 100644 Java-base/directory-mavibot/src/mavibot/img/PageMergeDelete.png
create mode 100644 Java-base/directory-mavibot/src/mavibot/img/PageMergeMove.graphml
create mode 100644 Java-base/directory-mavibot/src/mavibot/img/PageMergeMove.png
create mode 100644 Java-base/directory-mavibot/src/mavibot/img/R1-node.graphml
create mode 100644 Java-base/directory-mavibot/src/mavibot/img/R1-node.png
create mode 100644 Java-base/directory-mavibot/src/mavibot/img/R2-node.graphml
create mode 100644 Java-base/directory-mavibot/src/mavibot/img/R2-node.png
create mode 100644 Java-base/directory-mavibot/src/mavibot/img/R3-node.graphml
create mode 100644 Java-base/directory-mavibot/src/mavibot/img/R3-node.png
create mode 100644 Java-base/directory-mavibot/src/mavibot/img/R4-node-bis.png
create mode 100644 Java-base/directory-mavibot/src/mavibot/img/R4-node.graphml
create mode 100644 Java-base/directory-mavibot/src/mavibot/img/R4-node.png
create mode 100644 Java-base/directory-mavibot/src/mavibot/img/RMHeader.graphml
create mode 100644 Java-base/directory-mavibot/src/mavibot/img/RMHeader.png
create mode 100644 Java-base/directory-mavibot/src/mavibot/img/UC1.2.1.graphml
create mode 100644 Java-base/directory-mavibot/src/mavibot/img/UC1.2.1.png
create mode 100644 Java-base/directory-mavibot/src/mavibot/img/UC1.2.2.graphml
create mode 100644 Java-base/directory-mavibot/src/mavibot/img/UC1.2.2.png
create mode 100644 Java-base/directory-mavibot/src/mavibot/img/UC11.graphml
create mode 100644 Java-base/directory-mavibot/src/mavibot/img/UC11.png
create mode 100644 Java-base/directory-mavibot/src/mavibot/img/abstractPage.graphml
create mode 100644 Java-base/directory-mavibot/src/mavibot/img/abstractPage.png
create mode 100644 Java-base/directory-mavibot/src/mavibot/img/btreeHeader.graphml
create mode 100644 Java-base/directory-mavibot/src/mavibot/img/btreeHeader.png
create mode 100644 Java-base/directory-mavibot/src/mavibot/img/datastructure.graphml
create mode 100644 Java-base/directory-mavibot/src/mavibot/img/datastructure.png
create mode 100644 Java-base/directory-mavibot/src/mavibot/img/leaves.graphml
create mode 100644 Java-base/directory-mavibot/src/mavibot/img/leaves.png
create mode 100644 Java-base/directory-mavibot/src/mavibot/img/nodeLeaf.graphml
create mode 100644 Java-base/directory-mavibot/src/mavibot/img/nodeLeaf.png
create mode 100644 Java-base/directory-mavibot/src/mavibot/img/nodes.graphml
create mode 100644 Java-base/directory-mavibot/src/mavibot/img/nodes.png
create mode 100644 Java-base/directory-mavibot/src/mavibot/img/trans1.graphml
create mode 100644 Java-base/directory-mavibot/src/mavibot/img/trans1.png
create mode 100644 Java-base/directory-mavibot/src/mavibot/img/trans2.graphml
create mode 100644 Java-base/directory-mavibot/src/mavibot/img/trans2.png
create mode 100644 Java-base/directory-mavibot/src/mavibot/img/transko.graphml
create mode 100644 Java-base/directory-mavibot/src/mavibot/img/transko.png
create mode 100644 Java-base/directory-mavibot/src/mavibot/img/transok.graphml
create mode 100644 Java-base/directory-mavibot/src/mavibot/img/transok.png
create mode 100644 Java-base/directory-mavibot/src/mavibot/pom.xml
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/AbstractBTree.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/AbstractBorrowedFromSiblingResult.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/AbstractDeleteResult.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/AbstractPage.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/AbstractResult.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/AbstractTransactionManager.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/AbstractValueHolder.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/Addition.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/BTree.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/BTreeFactory.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/BTreeHeader.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/BTreeTypeEnum.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/BorrowedFromLeftResult.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/BorrowedFromRightResult.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/BorrowedFromSiblingResult.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/BulkLoader.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/Cursor.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/DeleteResult.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/Deletion.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/EmptyTupleCursor.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/EmptyValueCursor.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/ExistsResult.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/InMemoryBTree.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/InMemoryBTreeBuilder.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/InMemoryBTreeConfiguration.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/InMemoryLeaf.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/InMemoryNode.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/InMemoryTransactionManager.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/InMemoryValueHolder.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/InsertResult.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/KeyCursor.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/KeyHolder.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/LevelInfo.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/MavibotInspector.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/MergedWithSiblingResult.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/Modification.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/ModifyResult.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/NameRevision.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/NameRevisionComparator.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/NameRevisionSerializer.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/NotPresentResult.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/Page.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/PageHolder.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/PageIO.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/PageReclaimer.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/ParentPos.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/PersistedBTree.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/PersistedBTreeBuilder.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/PersistedBTreeConfiguration.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/PersistedKeyHolder.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/PersistedLeaf.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/PersistedNode.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/PersistedPageHolder.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/PersistedValueHolder.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/PoisonPill.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/ReadTransaction.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/RecordManager.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/RemoveResult.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/Result.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/RevisionName.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/RevisionNameComparator.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/RevisionNameSerializer.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/RevisionOffset.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/RevisionOffsetComparator.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/RevisionOffsetSerializer.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/SplitResult.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/TransactionManager.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/Tuple.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/TupleComparator.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/TupleCursor.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/ValueArrayCursor.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/ValueBTreeCursor.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/ValueCursor.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/ValueHolder.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/WriteTransaction.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/comparator/BooleanArrayComparator.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/comparator/BooleanComparator.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/comparator/ByteArrayComparator.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/comparator/ByteComparator.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/comparator/CharArrayComparator.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/comparator/CharComparator.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/comparator/IntArrayComparator.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/comparator/IntComparator.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/comparator/LongArrayComparator.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/comparator/LongComparator.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/comparator/ShortArrayComparator.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/comparator/ShortComparator.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/comparator/StringComparator.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/exception/BTreeAlreadyCreatedException.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/exception/BTreeAlreadyManagedException.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/exception/BTreeCreationException.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/exception/BTreeOperationException.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/exception/BadTransactionStateException.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/exception/DuplicateValueNotAllowedException.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/exception/EndOfFileExceededException.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/exception/FileException.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/exception/FreePageException.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/exception/InitializationException.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/exception/InvalidBTreeException.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/exception/InvalidOffsetException.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/exception/KeyNotFoundException.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/exception/MissingSerializerException.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/exception/PageSizeAlreadySetException.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/exception/RecordManagerException.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/exception/SerializerCreationException.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/memory/BulkDataSorter.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/persisted/BulkDataSorter.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/serializer/AbstractElementSerializer.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/serializer/BooleanSerializer.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/serializer/BufferHandler.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/serializer/ByteArraySerializer.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/serializer/ByteSerializer.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/serializer/CharArraySerializer.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/serializer/CharSerializer.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/serializer/ElementSerializer.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/serializer/IntSerializer.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/serializer/LongArraySerializer.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/serializer/LongSerializer.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/serializer/Serializer.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/serializer/ShortSerializer.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/serializer/StringSerializer.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/util/IntTupleReaderWriter.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/util/Strings.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/main/java/org/apache/directory/mavibot/btree/util/TupleReaderWriter.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/test/java/org/apache/directory/mavibot/btree/BulkLoaderTest.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/test/java/org/apache/directory/mavibot/btree/InMemoryBTreeBuilderTest.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/test/java/org/apache/directory/mavibot/btree/InMemoryBTreeConfigurationTest.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/test/java/org/apache/directory/mavibot/btree/InMemoryBTreeDuplicateKeyTest.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/test/java/org/apache/directory/mavibot/btree/InMemoryBTreeFlushTest.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/test/java/org/apache/directory/mavibot/btree/InMemoryBTreeTest.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/test/java/org/apache/directory/mavibot/btree/InMemoryBTreeTestOps.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/test/java/org/apache/directory/mavibot/btree/InMemoryBulkDataSorterTest.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/test/java/org/apache/directory/mavibot/btree/InMemoryLeafTest.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/test/java/org/apache/directory/mavibot/btree/MultiThreadedInMemoryBtreeTest.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/test/java/org/apache/directory/mavibot/btree/PageReclaimerTest.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/test/java/org/apache/directory/mavibot/btree/PersistedBTreeBrowseTest.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/test/java/org/apache/directory/mavibot/btree/PersistedBTreeBuilderTest.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/test/java/org/apache/directory/mavibot/btree/PersistedBTreeDuplicateKeyTest.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/test/java/org/apache/directory/mavibot/btree/PersistedBTreeTransactionTest.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/test/java/org/apache/directory/mavibot/btree/PersistedReadTest.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/test/java/org/apache/directory/mavibot/btree/PersistedStoreTest.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/test/java/org/apache/directory/mavibot/btree/PersistedSubBtreeKeyCursorTest.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/test/java/org/apache/directory/mavibot/btree/RecordManagerFreePageTest.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/test/java/org/apache/directory/mavibot/btree/RecordManagerPrivateMethodTest.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/test/java/org/apache/directory/mavibot/btree/RecordManagerTest.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/test/java/org/apache/directory/mavibot/btree/RecordManagerWithDuplicatesTest.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/test/java/org/apache/directory/mavibot/btree/RevisionNameComparatorTest.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/test/java/org/apache/directory/mavibot/btree/RevisionNameSerializerTest.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/test/java/org/apache/directory/mavibot/btree/comparator/BooleanArrayComparatorTest.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/test/java/org/apache/directory/mavibot/btree/comparator/BooleanComparatorTest.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/test/java/org/apache/directory/mavibot/btree/comparator/ByteArrayComparatorTest.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/test/java/org/apache/directory/mavibot/btree/comparator/ByteComparatorTest.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/test/java/org/apache/directory/mavibot/btree/comparator/CharArrayComparatorTest.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/test/java/org/apache/directory/mavibot/btree/comparator/CharComparatorTest.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/test/java/org/apache/directory/mavibot/btree/comparator/IntArrayComparatorTest.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/test/java/org/apache/directory/mavibot/btree/comparator/IntComparatorTest.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/test/java/org/apache/directory/mavibot/btree/comparator/LongArrayComparatorTest.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/test/java/org/apache/directory/mavibot/btree/comparator/LongComparatorTest.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/test/java/org/apache/directory/mavibot/btree/comparator/ShortArrayComparatorTest.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/test/java/org/apache/directory/mavibot/btree/comparator/ShortComparatorTest.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/test/java/org/apache/directory/mavibot/btree/comparator/StringComparatorTest.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/test/java/org/apache/directory/mavibot/btree/serializer/BooleanSerializerTest.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/test/java/org/apache/directory/mavibot/btree/serializer/ByteArraySerializerTest.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/test/java/org/apache/directory/mavibot/btree/serializer/ByteSerializerTest.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/test/java/org/apache/directory/mavibot/btree/serializer/CharSerializerTest.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/test/java/org/apache/directory/mavibot/btree/serializer/IntSerializerTest.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/test/java/org/apache/directory/mavibot/btree/serializer/LongArraySerializerTest.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/test/java/org/apache/directory/mavibot/btree/serializer/LongSerializerTest.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/test/java/org/apache/directory/mavibot/btree/serializer/ShortSerializerTest.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/test/java/org/apache/directory/mavibot/btree/serializer/StringSerializerTest.java
create mode 100644 Java-base/directory-mavibot/src/mavibot/src/test/resources/log4j.properties
create mode 100644 Java-base/directory-mavibot/src/pom.xml
create mode 100644 Java-base/geronimo-jcache-simple/Dockerfile
create mode 100755 Java-base/geronimo-jcache-simple/build.sh
create mode 100644 Java-base/geronimo-jcache-simple/src/README.adoc
create mode 100644 Java-base/geronimo-jcache-simple/src/pom.xml
create mode 100644 Java-base/geronimo-jcache-simple/src/src/main/java/org/apache/geronimo/jcache/simple/Asserts.java
create mode 100644 Java-base/geronimo-jcache-simple/src/src/main/java/org/apache/geronimo/jcache/simple/ClassLoaderAwareCache.java
create mode 100644 Java-base/geronimo-jcache-simple/src/src/main/java/org/apache/geronimo/jcache/simple/ConfigurableMBeanServerIdBuilder.java
create mode 100644 Java-base/geronimo-jcache-simple/src/src/main/java/org/apache/geronimo/jcache/simple/ExceptionWrapperHandler.java
create mode 100644 Java-base/geronimo-jcache-simple/src/src/main/java/org/apache/geronimo/jcache/simple/JMXs.java
create mode 100644 Java-base/geronimo-jcache-simple/src/src/main/java/org/apache/geronimo/jcache/simple/NoLoader.java
create mode 100644 Java-base/geronimo-jcache-simple/src/src/main/java/org/apache/geronimo/jcache/simple/NoWriter.java
create mode 100644 Java-base/geronimo-jcache-simple/src/src/main/java/org/apache/geronimo/jcache/simple/Serializations.java
create mode 100644 Java-base/geronimo-jcache-simple/src/src/main/java/org/apache/geronimo/jcache/simple/SimpleCache.java
create mode 100644 Java-base/geronimo-jcache-simple/src/src/main/java/org/apache/geronimo/jcache/simple/SimpleCacheMXBean.java
create mode 100644 Java-base/geronimo-jcache-simple/src/src/main/java/org/apache/geronimo/jcache/simple/SimpleCacheStatisticsMXBean.java
create mode 100644 Java-base/geronimo-jcache-simple/src/src/main/java/org/apache/geronimo/jcache/simple/SimpleConfiguration.java
create mode 100644 Java-base/geronimo-jcache-simple/src/src/main/java/org/apache/geronimo/jcache/simple/SimpleElement.java
create mode 100644 Java-base/geronimo-jcache-simple/src/src/main/java/org/apache/geronimo/jcache/simple/SimpleEntry.java
create mode 100644 Java-base/geronimo-jcache-simple/src/src/main/java/org/apache/geronimo/jcache/simple/SimpleEvent.java
create mode 100644 Java-base/geronimo-jcache-simple/src/src/main/java/org/apache/geronimo/jcache/simple/SimpleKey.java
create mode 100644 Java-base/geronimo-jcache-simple/src/src/main/java/org/apache/geronimo/jcache/simple/SimpleListener.java
create mode 100644 Java-base/geronimo-jcache-simple/src/src/main/java/org/apache/geronimo/jcache/simple/SimpleManager.java
create mode 100644 Java-base/geronimo-jcache-simple/src/src/main/java/org/apache/geronimo/jcache/simple/SimpleMutableEntry.java
create mode 100644 Java-base/geronimo-jcache-simple/src/src/main/java/org/apache/geronimo/jcache/simple/SimpleProvider.java
create mode 100644 Java-base/geronimo-jcache-simple/src/src/main/java/org/apache/geronimo/jcache/simple/SimpleThreadFactory.java
create mode 100644 Java-base/geronimo-jcache-simple/src/src/main/java/org/apache/geronimo/jcache/simple/Statistics.java
create mode 100644 Java-base/geronimo-jcache-simple/src/src/main/java/org/apache/geronimo/jcache/simple/TempStateCacheView.java
create mode 100644 Java-base/geronimo-jcache-simple/src/src/main/java/org/apache/geronimo/jcache/simple/Times.java
create mode 100644 Java-base/geronimo-jcache-simple/src/src/main/java/org/apache/geronimo/jcache/simple/cdi/CDIJCacheHelper.java
create mode 100644 Java-base/geronimo-jcache-simple/src/src/main/java/org/apache/geronimo/jcache/simple/cdi/CacheInvocationContextImpl.java
create mode 100644 Java-base/geronimo-jcache-simple/src/src/main/java/org/apache/geronimo/jcache/simple/cdi/CacheInvocationParameterImpl.java
create mode 100644 Java-base/geronimo-jcache-simple/src/src/main/java/org/apache/geronimo/jcache/simple/cdi/CacheKeyGeneratorImpl.java
create mode 100644 Java-base/geronimo-jcache-simple/src/src/main/java/org/apache/geronimo/jcache/simple/cdi/CacheKeyInvocationContextImpl.java
create mode 100644 Java-base/geronimo-jcache-simple/src/src/main/java/org/apache/geronimo/jcache/simple/cdi/CacheMethodDetailsImpl.java
create mode 100644 Java-base/geronimo-jcache-simple/src/src/main/java/org/apache/geronimo/jcache/simple/cdi/CachePutInterceptor.java
create mode 100644 Java-base/geronimo-jcache-simple/src/src/main/java/org/apache/geronimo/jcache/simple/cdi/CacheRemoveAllInterceptor.java
create mode 100644 Java-base/geronimo-jcache-simple/src/src/main/java/org/apache/geronimo/jcache/simple/cdi/CacheRemoveInterceptor.java
create mode 100644 Java-base/geronimo-jcache-simple/src/src/main/java/org/apache/geronimo/jcache/simple/cdi/CacheResolverFactoryImpl.java
create mode 100644 Java-base/geronimo-jcache-simple/src/src/main/java/org/apache/geronimo/jcache/simple/cdi/CacheResolverImpl.java
create mode 100644 Java-base/geronimo-jcache-simple/src/src/main/java/org/apache/geronimo/jcache/simple/cdi/CacheResultInterceptor.java
create mode 100644 Java-base/geronimo-jcache-simple/src/src/main/java/org/apache/geronimo/jcache/simple/cdi/GeneratedCacheKeyImpl.java
create mode 100644 Java-base/geronimo-jcache-simple/src/src/main/java/org/apache/geronimo/jcache/simple/cdi/MakeJCacheCDIInterceptorFriendly.java
create mode 100644 Java-base/geronimo-jcache-simple/src/src/main/java/org/apache/geronimo/jcache/simple/osgi/JCacheActivator.java
create mode 100644 Java-base/geronimo-jcache-simple/src/src/main/java/org/apache/geronimo/jcache/simple/osgi/package-info.java
create mode 100644 Java-base/geronimo-jcache-simple/src/src/main/resources/META-INF/services/javax.cache.spi.CachingProvider
create mode 100644 Java-base/geronimo-jcache-simple/src/src/main/resources/META-INF/services/javax.enterprise.inject.spi.Extension
create mode 100644 Java-base/geronimo-jcache-simple/src/src/test/java/org/apache/geronimo/jcache/simple/tck/CacheResultCompletionStageTest.java
create mode 100644 Java-base/geronimo-jcache-simple/src/src/test/java/org/apache/geronimo/jcache/simple/tck/ExpiryListenerTest.java
create mode 100644 Java-base/geronimo-jcache-simple/src/src/test/java/org/apache/geronimo/jcache/simple/tck/OWBBeanProvider.java
create mode 100644 Java-base/geronimo-jcache-simple/src/src/test/resources/ExcludeList
create mode 100644 Java-base/geronimo-jcache-simple/src/src/test/resources/META-INF/services/javax.cache.annotation.BeanProvider
diff --git a/Java-base/commons-validator/Dockerfile b/Java-base/commons-validator/Dockerfile
new file mode 100644
index 000000000..e208c4890
--- /dev/null
+++ b/Java-base/commons-validator/Dockerfile
@@ -0,0 +1,28 @@
+FROM ubuntu:22.04
+
+RUN export DEBIAN_FRONTEND=noninteractive \
+ && apt-get update \
+ && apt-get install -y software-properties-common \
+ && add-apt-repository ppa:deadsnakes/ppa \
+ && apt-get update \
+ && apt-get install -y \
+ build-essential \
+ git \
+ vim \
+ jq \
+ && apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/list/*
+
+RUN apt-get -y install sudo \
+ openjdk-8-jdk \
+ maven
+
+RUN bash -c "echo 2 | update-alternatives --config java"
+
+COPY src /workspace
+WORKDIR /workspace
+
+RUN mvn install -V -B -Denforcer.skip=true -Dcheckstyle.skip=true -Dcobertura.skip=true -Drat.skip=true -Dlicense.skip=true -Dfindbugs.skip=true -Dgpg.skip=true -Dskip.npm=true -Dskip.gulp=true -Dskip.bower=true -Drat.numUnapprovedLicenses=100 -DskipTests=true -DskipITs=true -Dtest=None -DfailIfNoTests=false
+
+RUN mvn test -V -B -Denforcer.skip=true -Dcheckstyle.skip=true -Dcobertura.skip=true -Drat.skip=true -Dlicense.skip=true -Dfindbugs.skip=true -Dgpg.skip=true -Dskip.npm=true -Dskip.gulp=true -Dskip.bower=true -Drat.numUnapprovedLicenses=100
+
+ENV TZ=Asia/Seoul
diff --git a/Java-base/commons-validator/src/BUILDING.txt b/Java-base/commons-validator/src/BUILDING.txt
new file mode 100644
index 000000000..6101a0856
--- /dev/null
+++ b/Java-base/commons-validator/src/BUILDING.txt
@@ -0,0 +1,29 @@
+The code requires at least Java 1.6 to build.
+
+However, current versions of Maven tend to require at least Java 7.
+
+If you want to build and test the code using Java 1.6, use the profile -Pjava-1.6, e.g.
+
+mvn clean test -Pjava-1.6
+
+For setting up your Maven installation to enable the use of the profile, please see:
+
+http://commons.apache.org/commons-parent-pom.html#Testing_with_different_Java_versions
+
+Building the site will also generally require at least Java 7 to run Maven.
+To build the site from scratch, you can use:
+
+mvn clean site [-Pjava-1.6]
+
+Also, ensure Maven has enough memory when using Java 7:
+
+export MAVEN_OPTS="-Xmx512m -XX:MaxPermSize=128m" # Unix
+set MAVEN_OPTS="-Xmx512m -XX:MaxPermSize=128m" # Windows
+
+For Java 8+, the MaxPermSize option should be removed:
+
+export MAVEN_OPTS="-Xmx512m" # Unix
+set MAVEN_OPTS="-Xmx512m" # Windows
+
+There can be problems building the site using Maven 3.0.5 or earlier;
+if so please use a later version.
diff --git a/Java-base/commons-validator/src/CONTRIBUTING.md b/Java-base/commons-validator/src/CONTRIBUTING.md
new file mode 100644
index 000000000..461f0313b
--- /dev/null
+++ b/Java-base/commons-validator/src/CONTRIBUTING.md
@@ -0,0 +1,97 @@
+
+
+Contributing to Apache Commons Validator
+======================
+
+You have found a bug or you have an idea for a cool new feature? Contributing code is a great way to give something back to
+the open source community. Before you dig right into the code there are a few guidelines that we need contributors to
+follow so that we can have a chance of keeping on top of things.
+
+Getting Started
+---------------
+
++ Make sure you have a [JIRA account](https://issues.apache.org/jira/).
++ Make sure you have a [GitHub account](https://github.com/signup/free).
++ If you're planning to implement a new feature it makes sense to discuss your changes on the [dev list](https://commons.apache.org/mail-lists.html) first. This way you can make sure you're not wasting your time on something that isn't considered to be in Apache Commons Validator's scope.
++ Submit a ticket for your issue, assuming one does not already exist.
+ + Clearly describe the issue including steps to reproduce when it is a bug.
+ + Make sure you fill in the earliest version that you know has the issue.
++ Fork the repository on GitHub.
+
+Making Changes
+--------------
+
++ Create a topic branch from where you want to base your work (this is usually the master/trunk branch).
++ Make commits of logical units.
++ Respect the original code style:
+ + Only use spaces for indentation.
+ + Create minimal diffs - disable on save actions like reformat source code or organize imports. If you feel the source code should be reformatted create a separate PR for this change.
+ + Check for unnecessary whitespace with git diff --check before committing.
++ Make sure your commit messages are in the proper format. Your commit message should contain the key of the JIRA issue.
++ Make sure you have added the necessary tests for your changes.
++ Run all the tests with `mvn clean verify` to assure nothing else was accidentally broken.
+
+Making Trivial Changes
+----------------------
+
+For changes of a trivial nature to comments and documentation, it is not always necessary to create a new ticket in JIRA.
+In this case, it is appropriate to start the first line of a commit with '(doc)' instead of a ticket number.
+
+Submitting Changes
+------------------
+
++ Sign the [Contributor License Agreement][cla] if you haven't already.
++ Push your changes to a topic branch in your fork of the repository.
++ Submit a pull request to the repository in the apache organization.
++ Update your JIRA ticket and include a link to the pull request in the ticket.
+
+Additional Resources
+--------------------
+
++ [Contributing patches](https://commons.apache.org/patches.html)
++ [Apache Commons Validator JIRA project page](https://issues.apache.org/jira/browse/VALIDATOR)
++ [Contributor License Agreement][cla]
++ [General GitHub documentation](https://help.github.com/)
++ [GitHub pull request documentation](https://help.github.com/send-pull-requests/)
++ [Apache Commons Twitter Account](https://twitter.com/ApacheCommons)
++ #apachecommons IRC channel on freenode.org
+
+[cla]:https://www.apache.org/licenses/#clas
diff --git a/Java-base/commons-validator/src/LICENSE.txt b/Java-base/commons-validator/src/LICENSE.txt
new file mode 100644
index 000000000..d64569567
--- /dev/null
+++ b/Java-base/commons-validator/src/LICENSE.txt
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/Java-base/commons-validator/src/NOTICE.txt b/Java-base/commons-validator/src/NOTICE.txt
new file mode 100644
index 000000000..e8e528be6
--- /dev/null
+++ b/Java-base/commons-validator/src/NOTICE.txt
@@ -0,0 +1,5 @@
+Apache Commons Validator
+Copyright 2001-2020 The Apache Software Foundation
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
diff --git a/Java-base/commons-validator/src/PROPOSAL.html b/Java-base/commons-validator/src/PROPOSAL.html
new file mode 100644
index 000000000..e7abce042
--- /dev/null
+++ b/Java-base/commons-validator/src/PROPOSAL.html
@@ -0,0 +1,112 @@
+
+
+
+Proposal for Validator Library Package
+
+
+
+
+
Proposal for Validator Package
+
+
+
(0) Rationale
+
+
There is a need for the validation of JavaBeans to validate
+user input from forms and validate business rules. There is also a
+need to define different validation rules and error messages based on
+the user's locale.
+
+
+
The Validator package will provide the capability to configure
+validators (validation methods) with different method signatures.
+So the basic framework can have an interface built on it to deal
+with validations on web layers, ejb layers, etc.
+
+
+
(1) Scope of the Package
+
+
The package shall create and maintain a package that provides
+basic validation functionality.
+
+
+
+The package should :
+
+
Provide in an easy way to define validations for fields
+
Provide internationalization support for validation rules and error messages.
+
Provide an easy way to define validators
+
Provide a way to store information in a validator definition so JavaScript client
+ side validation can be auto-generated matching the server side validation.
+
+
+
+
+Non-goals:
+
+
This package does not auto-generate JavaScript client side code.
+
+
+
+
(1.5) Interaction With Other Packages
+
+
Validator relies on:
+
+
+
+
Jakarta Regexp
+
+
+
(2) Required Jakarta-Commons Resources
+
+
+
Commons BeanUtils
+
Commons Collections
+
Commons Digester
+
+
+
+
CVS Repository - New directory validator in the
+jakarta-commons CVS repository.
+
+
Initial Committers - The list is provided below.
+
+
Mailing List - Discussions will take place on the general
+dev@commons.apache.org mailing list. To help list
+subscribers identify messages of interest, it is suggested that the
+message subject of messages about this component be prefixed with
+[Validator].
+
+
Bugzilla - New component "Validator" under the "Commons" product
+category, with appropriate version identifiers as needed.
+
+
Jyve FAQ - New category "commons-validator" (when available).
+
+
+
+
(4) Initial Committers
+
+
The initial committers on the Validator component shall be:
+
+
+
diff --git a/Java-base/commons-validator/src/README.md b/Java-base/commons-validator/src/README.md
new file mode 100644
index 000000000..7e78cc50e
--- /dev/null
+++ b/Java-base/commons-validator/src/README.md
@@ -0,0 +1,104 @@
+
+
+Apache Commons Validator
+===================
+
+[![Build Status](https://travis-ci.org/apache/commons-validator.svg?branch=trunk)](https://travis-ci.org/apache/commons-validator)
+[![Maven Central](https://maven-badges.herokuapp.com/maven-central/commons-validator/commons-validator/badge.svg)](https://maven-badges.herokuapp.com/maven-central/commons-validator/commons-validator/)
+
+Apache Commons Validator provides the building blocks for both client side validation and server side data validation.
+ It may be used standalone or with a framework like Struts.
+
+Documentation
+-------------
+
+More information can be found on the [Apache Commons Validator homepage](https://commons.apache.org/proper/commons-validator).
+The [Javadoc](https://commons.apache.org/proper/commons-validator/javadocs/api-release) can be browsed.
+Questions related to the usage of Apache Commons Validator should be posted to the [user mailing list][ml].
+
+Where can I get the latest release?
+-----------------------------------
+You can download source and binaries from our [download page](https://commons.apache.org/proper/commons-validator/download_validator.cgi).
+
+Alternatively you can pull it from the central Maven repositories:
+
+```xml
+
+ commons-validator
+ commons-validator
+ 1.6
+
+```
+
+Contributing
+------------
+
+We accept Pull Requests via GitHub. The [developer mailing list][ml] is the main channel of communication for contributors.
+There are some guidelines which will make applying PRs easier for us:
++ No tabs! Please use spaces for indentation.
++ Respect the code style.
++ Create minimal diffs - disable on save actions like reformat source code or organize imports. If you feel the source code should be reformatted create a separate PR for this change.
++ Provide JUnit tests for your changes and make sure your changes don't break any existing tests by running ```mvn clean test```.
+
+If you plan to contribute on a regular basis, please consider filing a [contributor license agreement](https://www.apache.org/licenses/#clas).
+You can learn more about contributing via GitHub in our [contribution guidelines](CONTRIBUTING.md).
+
+License
+-------
+This code is under the [Apache Licence v2](https://www.apache.org/licenses/LICENSE-2.0).
+
+See the `NOTICE.txt` file for required notices and attributions.
+
+Donations
+---------
+You like Apache Commons Validator? Then [donate back to the ASF](https://www.apache.org/foundation/contributing.html) to support the development.
+
+Additional Resources
+--------------------
+
++ [Apache Commons Homepage](https://commons.apache.org/)
++ [Apache Issue Tracker (JIRA)](https://issues.apache.org/jira/browse/VALIDATOR)
++ [Apache Commons Twitter Account](https://twitter.com/ApacheCommons)
++ `#apache-commons` IRC channel on `irc.freenode.org`
+
+[ml]:https://commons.apache.org/mail-lists.html
diff --git a/Java-base/commons-validator/src/RELEASE-NOTES.txt b/Java-base/commons-validator/src/RELEASE-NOTES.txt
new file mode 100644
index 000000000..267620be7
--- /dev/null
+++ b/Java-base/commons-validator/src/RELEASE-NOTES.txt
@@ -0,0 +1,63 @@
+ Apache Commons Validator 1.6
+ RELEASE NOTES
+
+The Apache Commons Validator team is pleased to announce the release of Apache Commons Validator 1.6
+
+Apache Commons Validator provides the building blocks for both client side validation and server side data validation.
+It may be used standalone or with a framework like Struts.
+
+This is primarily a maintenance release.
+All projects are encouraged to update to this release of Apache Commons Validator.
+
+Commons Validator requires Java 1.6 or later.
+
+Main enhancements
+=================
+
+* Modulus Ten Check Digit Implementation
+* Generic CreditCard validation (syntax and checkdigit only; does not check IIN)
+* CreditCard validation specification by numeric range
+
+IMPORTANT NOTES
+===============
+
+BREAKING CHANGES:
+
+ * NONE.
+
+DEPENDENCIES
+============
+The dependencies for Validator have not changed since the 1.4 release.
+For the current list of dependencies, please see http://commons.apache.org/validator/dependencies.html
+
+Changes in this version include:
+
+New features:
+o VALIDATOR-415: Simplify building new CreditCard validators
+o VALIDATOR-413: Generic CreditCard validation
+o VALIDATOR-394: General Modulus Ten Check Digit Implementation Thanks to Niall Pemberton.
+
+Fixed Bugs:
+o VALIDATOR-420: Query params validator shouldn't accept whitespaces Thanks to Marcin Gasior.
+o VALIDATOR-419: Invalid IPv6 addresses that are IPv4-mapped pass InetAddressValidator validation Thanks to Denis Iskhakov.
+o VALIDATOR-418: UrlValidatorTest: testIsValid() does not run all tests Thanks to Robert McGuigan.
+o VALIDATOR-379: CodeValidator unconditionally trim()s the input string - document the behavior
+o VALIDATOR-387: Userinfo without colon should be valid in UrlValidator Thanks to Shumpei Akai.
+o VALIDATOR-411: UrlValidator accepts ports above max limit of 16-bit unsigned integer
+o VALIDATOR-407: Generic .shop top level domain is considered invalid
+o VALIDATOR-405: IBANValidator - Costa Rica entry has been updated in SWIFT docs
+o VALIDATOR-401: IBANValidator fails for Seychelles and Ukraine
+o VALIDATOR-391: UrlValidator.isValid throws exception for FILEURLs
+ Fixed code so it handles URLs with no authority field Thanks to Mark E. Scott, Jr. & Jason Loomis.
+
+Changes:
+o IANA TLD lists: Updated to Version 2017020400, Last Updated Sat Feb 4 07:07:01 2017 UTC
+o Update to version 73 of SWIFT IBAN list: added BY (Belarus) and IQ (Iraq); fixed Santa Lucia format
+
+
+Historical list of changes: http://commons.apache.org/proper/commons-validator/changes-report.html
+
+For complete information on Apache Commons Validator, including instructions on how to submit bug reports,
+patches, or suggestions for improvement, see the Apache Apache Commons Validator website:
+
+http://commons.apache.org/proper/commons-validator/
diff --git a/Java-base/commons-validator/src/checkstyle-suppressions.xml b/Java-base/commons-validator/src/checkstyle-suppressions.xml
new file mode 100644
index 000000000..163ba11a0
--- /dev/null
+++ b/Java-base/commons-validator/src/checkstyle-suppressions.xml
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Java-base/commons-validator/src/checkstyle.xml b/Java-base/commons-validator/src/checkstyle.xml
new file mode 100644
index 000000000..a776bf072
--- /dev/null
+++ b/Java-base/commons-validator/src/checkstyle.xml
@@ -0,0 +1,169 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Java-base/commons-validator/src/pom.xml b/Java-base/commons-validator/src/pom.xml
new file mode 100644
index 000000000..802a64395
--- /dev/null
+++ b/Java-base/commons-validator/src/pom.xml
@@ -0,0 +1,411 @@
+
+
+
+
+ 4.0.0
+
+
+ org.apache.commons
+ commons-parent
+ 51
+
+
+ commons-validator
+ commons-validator
+ 1.7-SNAPSHOT
+ Apache Commons Validator
+
+ Apache Commons Validator provides the building blocks for both client side validation and server side data validation.
+ It may be used standalone or with a framework like Struts.
+
+ http://commons.apache.org/proper/commons-validator/
+ 2002
+
+
+ validator
+ org.apache.commons.validator
+
+ 1.7
+ RC1
+ (requires JDK ${maven.compiler.target})
+ VALIDATOR
+ 12310494
+ UTF-8
+
+ site-content
+ https://svn.apache.org/repos/infra/websites/production/commons/content/proper/commons-validator
+
+ 1.7
+ 1.7
+ UTF-8
+ UTF-8
+
+
+
+ scm:git:https://gitbox.apache.org/repos/asf/commons-validator
+ scm:git:https://gitbox.apache.org/repos/asf/commons-validator
+ https://gitbox.apache.org/repos/asf/commons-validator
+
+
+
+ jira
+ http://issues.apache.org/jira/browse/VALIDATOR
+
+
+
+
+ apache.website
+ Apache Commons Site
+ scm:svn:https://svn.apache.org/repos/infra/websites/production/commons/content/proper/commons-validator/
+
+
+
+
+ clean verify apache-rat:check clirr:check checkstyle:check javadoc:javadoc
+
+
+ ${basedir}
+ META-INF
+
+ NOTICE.txt
+ LICENSE.txt
+
+
+
+ ${basedir}/src/main/resources
+
+
+
+
+ maven-assembly-plugin
+
+
+ ${basedir}/src/assembly/bin.xml
+ ${basedir}/src/assembly/src.xml
+
+ gnu
+
+
+
+ org.apache.maven.plugins
+ maven-scm-publish-plugin
+
+
+ javadocs
+
+
+
+
+ org.apache.maven.plugins
+ maven-checkstyle-plugin
+ ${commons.checkstyle-plugin.version}
+
+ ${basedir}/checkstyle.xml
+
+ config_loc=${basedir}
+ false
+
+
+
+ com.github.spotbugs
+ spotbugs-maven-plugin
+ ${commons.spotbugs.version}
+
+
+
+
+
+
+
+ commons-beanutils
+ commons-beanutils
+ 1.9.4
+
+
+
+ commons-digester
+ commons-digester
+ 2.1
+
+
+
+ commons-beanutils
+ commons-beanutils
+
+
+ commons-logging
+ commons-logging
+
+
+
+
+
+ commons-logging
+ commons-logging
+ 1.2
+
+
+
+ commons-collections
+ commons-collections
+ 3.2.2
+
+
+
+
+ org.apache.commons
+ commons-csv
+
+ 1.6
+ test
+
+
+
+ junit
+ junit
+ 4.12
+ test
+
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-checkstyle-plugin
+ ${commons.checkstyle-plugin.version}
+
+ ${basedir}/checkstyle.xml
+
+ config_loc=${basedir}
+ false
+
+
+
+
+ checkstyle
+
+
+
+
+
+ org.codehaus.mojo
+ cobertura-maven-plugin
+ ${commons.cobertura.version}
+
+
+ org.codehaus.mojo
+ clirr-maven-plugin
+
+
+ maven-pmd-plugin
+ 3.7
+
+ ${maven.compiler.target}
+
+
+
+
+ pmd
+ cpd
+
+
+
+
+
+ org.codehaus.mojo
+ findbugs-maven-plugin
+ ${commons.findbugs.version}
+
+ Normal
+ Default
+
+
+
+
+ org.apache.rat
+ apache-rat-plugin
+
+
+ site-content/**
+
+
+
+
+
+
+
+
+ setup-checkout
+
+
+ site-content
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-antrun-plugin
+ 1.8
+
+
+ prepare-checkout
+ pre-site
+
+ run
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ jdk9-cldr
+
+ [1.9,)
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-surefire-plugin
+
+
+ COMPAT,CLDR
+
+
+
+
+
+
+
+
+
+
+ Don Brown
+ mrdon
+ mrdon@apache.org
+
+
+ Martin Cooper
+ martinc
+ martinc@apache.org
+
+
+ David Graham
+ dgraham
+ dgraham@apache.org
+
+
+ Ted Husted
+ husted
+ husted@apache.org
+
+
+ Rob Leland
+ rleland
+ rleland at apache.org
+
+
+ Craig McClanahan
+ craigmcc
+ craigmcc@apache.org
+
+
+ James Mitchell
+ jmitchell
+ jmitchell NOSPAM apache.org
+ EdgeTech, Inc
+
+
+ Niall Pemberton
+ niallp
+
+
+ James Turner
+ turner
+ turner@apache.org
+
+
+ David Winterfeldt
+ dwinterfeldt
+ dwinterfeldt@apache.org
+
+
+ Henri Yandell
+ bayard
+
+
+ Ben Speakmon
+ bspeakmon
+
+
+ Nick Burch
+ nick
+
+
+ SimoneTripodi
+ simonetripodi
+
+
+ Benedikt Ritter
+ britter
+
+
+ Gary Gregory
+ ggregory
+ ggregory@apache.org
+ http://www.garygregory.com
+ -5
+
+
+
+
+ Makoto Uchino
+
+
+
+
diff --git a/Java-base/commons-validator/src/src/assembly/bin.xml b/Java-base/commons-validator/src/src/assembly/bin.xml
new file mode 100644
index 000000000..b57a51355
--- /dev/null
+++ b/Java-base/commons-validator/src/src/assembly/bin.xml
@@ -0,0 +1,46 @@
+
+
+ bin
+
+ tar.gz
+ zip
+
+ false
+
+
+
+ LICENSE.txt
+ NOTICE.txt
+ RELEASE-NOTES.txt
+ README.md
+
+
+
+ target
+
+
+ *.jar
+ *.js
+
+
+
+ target/site/apidocs
+ apidocs
+
+
+
diff --git a/Java-base/commons-validator/src/src/assembly/src.xml b/Java-base/commons-validator/src/src/assembly/src.xml
new file mode 100644
index 000000000..04a4b96d2
--- /dev/null
+++ b/Java-base/commons-validator/src/src/assembly/src.xml
@@ -0,0 +1,47 @@
+
+
+ src
+
+ tar.gz
+ zip
+
+ ${artifactId}-${version}-src
+
+
+
+ BUILDING.txt
+ build.properties.sample
+ build.xml
+ checkstyle*.xml
+ CONTRIBUTING.md
+ LICENSE.txt
+ license-header.txt
+ NOTICE.txt
+ pom.xml
+ RELEASE-NOTES.txt
+ README.md
+
+
+
+ etc
+
+
+ src
+
+
+
diff --git a/Java-base/commons-validator/src/src/changes/changes.xml b/Java-base/commons-validator/src/src/changes/changes.xml
new file mode 100644
index 000000000..b42fc9d85
--- /dev/null
+++ b/Java-base/commons-validator/src/src/changes/changes.xml
@@ -0,0 +1,1143 @@
+
+
+
+
+
+
+
+ Release Notes
+
+
+
+
+
+
+
+ IBANValidator fails for El Salvador
+ Add definition
+
+
+ IANA TLD lists: Updated to Version 2018092800, Last Updated Fri Sep 28 07:07:02 2018 UTC
+
+
+ Add ISINValidator
+
+
+ Update commons digester to 2.1
+
+
+ Field does not synchronize iteration on synchronized list
+
+
+ Update Apache Commons BeanUtils dependency from 1.9.2 to 1.9.3.
+ This picks up BEANUTILS-482: Update commons-collections from 3.2.1 to 3.2.2 (CVE-2015-4852).
+
+
+ Update Apache Commons BeanUtils dependency from 1.9.3 to 1.9.4
+ This picks up BEANUTILS-520: Mitigate CVE-2014-0114.
+
+
+ Add IBAN validator for VA – Vatican City State
+
+
+ Generic .gmbh top level domain is considered invalid
+
+
+ LongValidator: numbers bigger than the maxvalue are Valid
+
+
+ CreditCardValidator default ctor disagrees with Javadoc
+
+
+ ISSN Validator extract ISSN from EAN-13
+
+
+ URL validator fails if path starts with double slash and has underscores
+
+
+ UrlValidator says "file://bad ^ domain.com/label/test" is valid
+
+
+ Leading and trailing spaces in EmailValidator should not be valid
+
+
+ EMailValidator: Addresses with leading spaces must not be accepted
+
+
+ DomainValidator.getTLDArray does not synch mutable arrays
+
+
+
+
+
+ Query params validator shouldn't accept whitespaces
+
+
+ Invalid IPv6 addresses that are IPv4-mapped pass InetAddressValidator validation
+
+
+ UrlValidatorTest: testIsValid() does not run all tests
+
+
+ Simplify building new CreditCard validators
+
+
+ Generic CreditCard validation
+
+
+ CodeValidator unconditionally trim()s the input string - document the behavior
+
+
+ Userinfo without colon should be valid in UrlValidator
+
+
+ General Modulus Ten Check Digit Implementation
+
+
+ UrlValidator accepts ports above max limit of 16-bit unsigned integer
+
+
+ IANA TLD lists: Updated to Version 2017020400, Last Updated Sat Feb 4 07:07:01 2017 UTC
+
+
+ Update to version 73 of SWIFT IBAN list: added BY (Belarus) and IQ (Iraq); fixed Santa Lucia format
+
+
+ Generic .shop top level domain is considered invalid
+
+
+ IBANValidator - Costa Rica entry has been updated in SWIFT docs
+
+
+ IBANValidator fails for Seychelles and Ukraine
+
+
+ UrlValidator.isValid throws exception for FILEURLs
+ Fixed code so it handles URLs with no authority field
+
+
+
+
+ Mastercard Series 2 BIN ranges (active from October 2016) added to CreditCardValidator
+ To disable the new ranges, use option MASTERCARD_PRE_OCT2016 or validator MASTERCARD_VALIDATOR_PRE_OCT2016
+
+
+ org.apache.commons.validator.routines.DomainValidator.ArrayType is not public
+
+
+ EmailValidator does not catch invalid email address like dora@.com
+
+
+ EmailValidator does not support escaped quotes in a quoted string
+
+
+ DomainValidator - allow access to internal arrays
+
+
+ Updated to TLD list Version 2016042500, Last Updated Mon Apr 25 07:07:01 2016 UTC
+
+
+
+
+ Email Validator does not support quoted/escaped character in the local part of the email address
+
+
+ Update commons-collections from 3.2.1 to 3.2.2.
+
+
+ UrlValidator rejects path having two or more successive dots
+
+
+ IBANCheckDigit.isValid() returns True for some invalid IBANs
+
+
+ UrlValidator does not allow for optional port digits
+
+
+ IIBANCheckDigit.calculate does not enforce initial checksum value
+ Checkdigit field is now unconditionally set to "00" to ensure correct generation
+
+
+ UrlValidator does not allow for optional userinfo in the authority
+
+
+ ISSN validator and converter to EAN-13
+
+
+ Improve IBAN validation with format checks
+
+
+ DateValidatorTest.testCompare() fails with GMT-12
+
+
+ Validate 19 digit VPay (VISA)
+
+
+ UrlValidator fails on IPv6 URL
+
+
+ UrlValidator rejects new gTLDs with more than 4 characters
+ Added unit test to show that this has been fixed
+
+
+ Make TLD list configurable;
+ both generic and country-code now support addition and removal
+
+
+ Email Validator : .school domain is being rejected
+ Add Unit test to show it has been fixed
+
+
+ Revert EmailValidator to handle top level domains to the behavior prior to VALIDATOR-273. Allow an optional
+ behavior to allow the behavior VALIDATOR-273 implemented. Note that this is a behavioral change for users
+ of version 1.4.1, but not for anyone upgrading from a release prior to that.
+
+ Drop the Javascript code entirely
+
+ Local part of the email address should not be longer than 64 bytes
+
+
+ IDN.toASCII drops trailing dot in Java 6 & 7
+
+
+ Update to Java 6
+
+
+
+
+
+ URLValidator returns false for http://example.rocks
+
+
+ UrlValidator rejects url with Unicode characters in domain label or TLD
+
+
+ URLValidator fails validating domain names with a trailing period, which are valid.
+
+
+ DomainValidator accepts labels longer than 63 chars and domain name lengths exceeding 255 chars
+
+
+ TLD tables should be pre-sorted
+
+
+ Create new url validation using rfc3986 and IDN - added new test
+
+
+ Should "x.root" validate as a domain name?
+ Removed "root" from TLD list.
+ Also "um" and "yu" as they are currently "Not assigned"
+
+
+ Logical errors in util.Flags affecting check of multiple flags as well as flag 64
+
+
+ AbstractCheckDigit class does not fully test invalid strings
+ Fix up the testCalculateInvalid() invalid method to allow for
+ either invalid checksum or syntax (CheckDigitException) error
+ when testing the entries in the invalid array.
+
+
+ Punycode url is not valid
+ Top-level domain regex matching was wrong; did not allow embedded "-" as per RFC2396
+
+
+ UrlValidator: isValidAuthority() returning true when supplied authority validator fails
+
+
+ UrlValidator does not validate uppercase URL schemes
+
+
+ Doc URL update for broken link
+
+
+ SedolCheckDigit fails to reject invalid (non-numeric) check digits
+
+
+ ISINCheckDigit fails to reject invalid (non-numeric) check digits
+
+
+ CUSIPCheckDigit thinks invalid CUSIP is valid
+
+
+ Update TLD list to latest version (Version 2014123000)
+
+
+ toLowerCase() method is Locale-sensitive and should not be used
+ Fixed 4 instances in DomainValidator
+
+
+ isValid checks if the given address is only IPV4 address and not IPV6
+
+
+ Deprecate the JS part of commons validator
+
+
+ DomainValidator uses an O(n) method where an O(1) would be more appropriate
+
+
+ EmailValidator does not support mailboxes at TLDs
+
+
+ DomainValidator missing sTLD - "xxx"
+
+
+ Missing sx tld.
+
+
+ Some TLDs are missing from DomainValidator
+
+
+ IBANCheckDigitTest.createInvalidCodes(String[] codes) uses wrong values
+
+
+
+
+
+ CheckStyle and FindBug Issues - inner classes and key sets
+
+
+ Email validation fails with dash or hyphen at end of local address
+
+
+ @localhost and @localhost.localdomain email addresses aren't correctly detected as valid
+
+
+ UrlValidator.isValid does not properly validate *.travel domains
+
+
+ UrlValidator does not validate URL with simple domains (eg: http://hostname )
+
+
+ isValid method for EmailValidator should return false for domain with special characters only
+
+
+ formatDate(String value, Locale locale) in GenericTypeValidator uses DateFormat.SHORT instead of DateFormat.DEFAULT
+
+
+ isValidURL call returns false for file scheme/protocol when URL is correct
+
+
+ gmail testing addresses do not validate
+
+
+ EmailValidator.isValid(String) follows RFC822 but violates RFC1034
+
+
+ Performance improvement of DomainValidator by change the regular expression
+
+
+ url with brackets is not validated thru URLvalidator class.
+
+
+ Banking CheckDigit implementations: ABA, CUSIP, IBAN, ISIN and Sedol
+
+
+ Add Diners card validation to CreditCardValidator
+
+
+ Add an option to allow 'localhost' as a valid hostname part in the URL
+
+
+ Move CreditCardValidator to routines package and refactor to use new CodeValidator
+
+
+ Move EmailValidator to routines package
+
+
+ New InetAdress Validator implementation
+
+
+ Support the 65 prefix for Discover Card
+
+
+ Create 1.4 DTD
+
+
+ Switch to using Version 0.4.3 of the Dojo Compressor from the maven repo
+
+
+ Add script attribute to control script generation
+
+
+ clirr Report - EmailValidator.isValidIpAddress() argument type change
+
+
+ Null-Stream input to ValidatorResources leads to MalformedURLExceptions
+
+
+ validatorUtilities.js - replace colon characters in the function name (JSF/Shale)
+
+
+ Move the trim() function from validateRequired.js to validateUtilities.js
+
+
+ EmailValidator fails with ArrayIndexOutOfBoundsException on domain names longer than 10 segments
+
+
+ UrlValidator fail when path contains "(" / ")"
+
+
+ UrlValidator rejects top-level domains (TLDs) with more than 4 characters
+
+
+ New generic CodeValidator that validates format, length and Check Digit for a code
+
+
+ New Regular Expression validator using JDK 1.4's Regex
+
+
+ Factor out Check Digit logic into separate implementations
+
+
+ Upgrade to Digester 1.8
+
+
+ Refactor UrlValidator - especially the line 370-ish.
+
+
+ Copy remaining Validation Routines to the new routines package
+
+
+ Removing ORO dep. from GenericValidator
+
+
+ Adding ISBNValidator to GenericValidator
+
+
+ Remove the dependency on Jakarta ORO (move to JDK 1.4 regular expression support)
+
+
+ Extend ISBN validator to support smooth transition to ISBN-13 / EAN-13 standard
+
+
+ JDK 1.4 - change minimum dependency for validator to be JDK 1.4 (was 1.3). Primary reason
+ for this is to use JDK 1.4+ built in regular expression support and remove the dependency
+ on Jakarta ORO.
+
+
+
+
+
+ Dependencies for Validator 1.3.1 are unchanged since the 1.3.0 release.
+ N.B. Jakarta ORO has now been marked as an optional dependency
+ in the project.xml as it is only required by the Email, URL and Regular Expression validations.
+
+
+ JavaScript function jcv_isFieldPresent() causes error in IE5 using "undefined".
+
+
+ EmailValidator allows control characters (ASCII 0-31 and 127).
+
+
+
+
+ JavaScript Causes HTML Page to Contain Illegal HTML.
+
+
+ Additional constructor for ValidatorResources that takes URL["> instead of String[">.
+
+
+ Fix loading of Digester rules for custom ValidatorResources implementations.
+
+
+ Validator incorrectly storing itself under the FORM_PARAM key rather than
+ the Form.
+
+
+ Urlvalidator returns false for a valid URL containing an underscore.
+
+
+ Urlvalidator fails with an ArrayIndexOutOfBoundsException.
+
+
+ The ant build.xml doesn't include validator_1_1_3.dtd in the jar.
+
+
+ Example does not compile using ant build script.
+
+
+ Validating indexed properties fails when null.
+
+
+ Fix a thread safety issue in parameter initialization.
+
+
+
+
+
+ ValidatorResult only contains last run dependency for the field.
+
+
+ Validator argument - resource="false" ignored for arg0 - arg3.
+
+
+ Change JavaScript validators to cater for disabled being undefined (an issue in Netscape 4.7).
+
+
+
Add new routines package containing standard validations - first
+ step in the process of clearly separating standard validation
+ functions which can be used independantly, from the framework
+ aspect of Commons Validator.
+
New validators added for Date, Time, Calendar, Byte, Short,
+ Integer, Long, Float, Double, BigInteger, BigDecimal,
+ Currency and Percent.
+
+
+ Deprecate ValidatorResult's getActionMap() and add getActions()
+ method to provide an Iterator of the set of action names.
+
+
+ Use the Dojo/Rhino JavaScript compressor to created compressed
+ versions of the static JavaScript files. Additionally create single
+ file distros of all the static JavaScript in un-compressed and compressed
+ format. See Dojo/Rhino Compressor.
+
+
+ Prefix remaining JavaScript utility methods with "jcv_" to reduce
+ the likelihood of clashes with other libraries - validator still
+ needs to be properly namespaced (as per Bug 38184).
+
+
+ Change JavaScript validators so that they don't fail when the
+ field is not present on the form.
+
+
+
+
+ Fix min/max length validation for different line endings.
+
+
+ Fix email validator to not allow spaces at the end of the user
+ component or start of the domain component.
+
+
+ Added validator_1_3_0.dtd and changed form rules so that a minimum
+ of one field is no longer required (i.e. changed (field+) to (field*)
+ for a form).
+
+
+ Resolve issue in JavaScript validation when the prototype library
+ is used.
+
+
+ Re-factor JavaScript error handling into a common method and only
+ set focus on fields which are not 'hidden' type or hidden by CSS.
+
+
+
+
+
+
+ Remove static Log instances to avoid problems if deployed via a shared
+ classloader in a container. See
+ here
+ for more details.
+
+
+ Reverse change for to Credit Card Validator for visa card blue in France.
+
+
+ Fix JavaScript validation for Internet Explorer 5.0.
+
+
+
+
+
+ Added ISBNValidator for validating book numbers.
+
+
+ Upgrade dependency versions to
+ Commons BeanUtils 1.7.0,
+ Commons Digester 1.6
+ and Commons Logging 1.0.4.
+ Remove dependency on
+ Commons Collections
+ (BeanUtils 1.7.0 has removed its dependency on Collections by including the
+ few Collections classes required in its distribution).
+
+
+ Add support for min or max numeric values.
+
+
+ Allow validators to register errors for multiple fields.
+
+
+ Fixed EmailValidator failing on valid email addresses.
+
+
+ Allow forms to inherit validation rules from other forms.
+
+
+ Remove the need to specify an Arguement's position.
+
+
+ Deprecated all FastHashMap usage and provided protected get
+ methods that return generic Maps to be used by subclasses.
+
+
+ Handling of float and double should use the locale object.
+ Fixes 21282
+
+
+
+ More informative Exception message when validation method not found.
+
+
+ Client-side required validation inconsistent with server-side.
+
+
+ EmailValidator allows apostrophes in domain name.
+
+
+ Changing the strategy for locating form name/id, now use a common utility
+ function which works in both IE and Firefox.
+ Fixes 35127
+ and 32760
+
+
+ Validation fails when "name" attribute in form not specified.
+
+
+
+
+ UrlValidator fails http://www.google.com.
+
+
+ Email: inexisting dashes and TLD erroneously accepted.
+
+
+
+
+ Float validator can't validate the string with several dot.
+
+
+ CreditValidator does not handle Visa correctly.
+
+
+ datePattern not supported by JavaScript.
+
+
+ validateRequired on a single radio button.
+
+
+ Field.validate() cannot be invoked from user-defined code.
+
+
+ Locale validation doesn't validate all fields.
+
+
+
+
+ XML file included into validation.xml via entity reference not found.
+
+
+ Update maven build to Include DTDs and xdocs in the source distribution.
+
+
+ Remove logging of exceptions when the Date validation fails (correctly) with
+ an invalid date.
+
+
+ Add version 1.1.3 of the DTD from the VALIDATOR_1_1_2_BRANCH and change
+ digester rules so that the old arg0-arg3 values are not ignored for
+ versions of the DTD prior to 1.2.0.
+
+
+ Add 'resource' and 'bundle' elements to the 1.2.0 DTD.
+
+
+ Provide access to the result object in ValidatorResult.
+
+
+ Validation breaks on multiple validation.xml (eg. with Struts 1.3).
+
+
+ GenericTypeValidator does not accept negative Floats/Doubles.
+
+
+ correct UrlValidator Javadoc.
+
+
+ Search the locale 'hierarchy' of formsets for a Form.
+
+
+ Int validation in Java and Javascript have different semantics.
+
+
+ Javascript Validation currently uses unsupported DOM method getAttributeNode().
+
+
+
+
+
+ Added getMessage(key) and getMessages() methods to Field
+
+
+ Added resource property (including getter/setter) to Msg to support
+ the 'resource' attribute specified in the DTD.
+
+
+
+
+
+ Fixed javascript file reading in Java WebStart environment.
+
+
+ Fixed javascript email domain length limited to 2 or 3 chars.
+
+
+
+
+
+ Javascript validation doesn't work if a form field is
+ called "name".
+
+
+ Allow multiple forms to be on the same page by
+ generating a unique variable name based on form name.
+ Fixes 17667
+
+
+ Validate file extensions for file uploads.
+
+
+ Add Support for hidden fields in javascript
+ validations.
+
+
+ The framework will convert checked exceptions into
+ ValidatorExceptions so any ValidatorException thrown out
+ of the framework indicates a 'system' exception that
+ stops validation processing. If a pluggable validation
+ method throws a ValidatorException it will be rethrown
+ and passed out of the framework. Any other exception from
+ a pluggable validation method is still considered a validation
+ failure rather than a system exception to maintain backwards
+ compatibility.
+
+
+ Added a more flexible card validation system that doesn't
+ require CreditCardValidator to support every brand of
+ credit card.
+
+
+ Throw RuntimeException if clone fails instead of InternalError.
+
+
+ Added Flags.clear().
+
+
+
+
+
+ Add javadoc to javascript, and use
+ jsdoc to process it.
+
+
+ Ignore validation criteria when field is disabled for all field types.
+
+
+ Add required check for single checkbox.
+
+
+ Let max/min length also cover passwords fields. Don't use
+ these for checking login pages, only when the user is
+ modifying the password.
+
+
+ Added Field.getArgs(String) to make it easier to retrieve
+ all of the Args for a given validator.
+
+
+ Modify javascript to honor datapattern option.
+
+
+ Add ability of required to handle checkboxes, radio, select-one,
+ and select-multiple field types.
+
+
+ Add ability to use required condition on array types like checkboxes.
+
+
+
+
+
+ Move Digester rule configuration to XML file and remove
+ ValidatorResourcesInitializer. ValidatorResources now
+ knows how to initialize itself.
+
+
+ Clean up scopes of methods and variables.
+
+
+ Make Arg system more flexible to allow any number of
+ args in a message.
+
+
+ Validate validation.xml files while initializing a Validator
+ to alert developers to configuration errors.
+
+
+ Refactored GenericValidator methods into reusable
+ objects. These include: CreditCardValidator, EmailValidator,
+ DateValidator, and UrlValidator.
+
+
+
Backwards Incompatible Changes
+
+
+ <msg>'s name and key attributes are now required. The Validator code was
+ enforcing this constraint so now it's formally defined in the DTD.
+
+
+
+
+
Deprecated items; see the javadoc for details and replacements.
+
+
+ The <arg0-3> elements have been replaced with a single <arg> element
+ with a new position attribute. Setting position to 0 is the equivalent
+ of an <arg0> element.
+
+
+
+
+
+
+ GenericValidaor.isEmail bug.
+
+
+ NPE in Validator.java after upgrading to Struts 1.1b3.
+
+
+ i18n issue, variant not being picked up by Validator.
+
+
+ isEmail accepts Umlauts and other non-ASCII characters.
+
+
+ Email address validation incorrectly accepts commas.
+
+
+ unknown host when loading app.
+
+
+
+
+
+ Serialization problem with org.apache.commons.validator.ValidatorResult$ResultStatus.
+
+
+ ValidatorResources.get-method not working properly.
+
+
+
+
+
+ First Release.
+
+
+
+
+
diff --git a/Java-base/commons-validator/src/src/changes/release-notes.vm b/Java-base/commons-validator/src/src/changes/release-notes.vm
new file mode 100644
index 000000000..e0589caa9
--- /dev/null
+++ b/Java-base/commons-validator/src/src/changes/release-notes.vm
@@ -0,0 +1,122 @@
+## Licensed to the Apache Software Foundation (ASF) under one
+## or more contributor license agreements. See the NOTICE file
+## distributed with this work for additional information
+## regarding copyright ownership. The ASF licenses this file
+## to you under the Apache License, Version 2.0 (the
+## "License"); you may not use this file except in compliance
+## with the License. You may obtain a copy of the License at
+##
+## http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing,
+## software distributed under the License is distributed on an
+## "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+## KIND, either express or implied. See the License for the
+## specific language governing permissions and limitations
+## under the License.
+##
+ ${project.name} ${version}
+ RELEASE NOTES
+
+The ${developmentTeam} is pleased to announce the release of ${project.name} ${version}
+
+$introduction.replaceAll("(?A simple example of setting up and using the Validator.
+ *
+ * This simple example shows all the steps needed to set up and use
+ * the Validator. Note that in most cases, some kind of framework
+ * would be wrapped around the Validator, such as is the case with
+ * the Struts Validator Framework. However, should you wish to use
+ * the Validator against raw Beans in a pure Java application, you
+ * can see everything you need to know to get it working here.
+ *
+ * @version $Revision$
+ */
+public class ValidateExample {
+
+ /**
+ * We need a resource bundle to get our field names and errors messages
+ * from. Note that this is not strictly required to make the Validator
+ * work, but is a good coding practice.
+ */
+ private static ResourceBundle apps =
+ ResourceBundle.getBundle(
+ "org.apache.commons.validator.example.applicationResources");
+
+ /**
+ * This is the main method that will be called to initialize the Validator, create some sample beans, and
+ * run the Validator against them.
+ */
+ public static void main(String[] args)
+ throws ValidatorException, IOException, SAXException {
+
+ InputStream in = null;
+ ValidatorResources resources = null;
+
+ try {
+
+ // Create a new instance of a ValidatorResource, then get a stream
+ // handle on the XML file with the actions in it, and initialize the
+ // resources from it. This would normally be done by a servlet
+ // run during JSP initialization or some other application-startup
+ // routine.
+ in = ValidateExample.class.getResourceAsStream("validator-example.xml");
+ resources = new ValidatorResources(in);
+
+ } finally {
+ // Make sure we close the input stream.
+ if (in != null) {
+ in.close();
+ }
+ }
+
+ // Create a test bean to validate against.
+ ValidateBean bean = new ValidateBean();
+
+ // Create a validator with the ValidateBean actions for the bean
+ // we're interested in.
+ Validator validator = new Validator(resources, "ValidateBean");
+
+ // Tell the validator which bean to validate against.
+ validator.setParameter(Validator.BEAN_PARAM, bean);
+
+ ValidatorResults results = null;
+
+ // Run the validation actions against the bean. Since all of the properties
+ // are null, we expect them all to error out except for street2, which has
+ // no validations (it's an optional property)
+
+ results = validator.validate();
+ printResults(bean, results, resources);
+
+ // Now set all the required properties, but make the age a non-integer.
+ // You'll notice that age will pass the required test, but fail the int
+ // test.
+ bean.setLastName("Tester");
+ bean.setFirstName("John");
+ bean.setStreet1("1 Test Street");
+ bean.setCity("Testville");
+ bean.setState("TE");
+ bean.setPostalCode("12345");
+ bean.setAge("Too Old");
+ results = validator.validate();
+ printResults(bean, results, resources);
+
+ // Now only report failed fields
+ validator.setOnlyReturnErrors(true);
+ results = validator.validate();
+ printResults(bean, results, resources);
+
+ // Now everything should pass.
+ validator.setOnlyReturnErrors(false);
+ bean.setAge("123");
+ results = validator.validate();
+ printResults(bean, results, resources);
+ }
+
+ /**
+ * Dumps out the Bean in question and the results of validating it.
+ */
+ public static void printResults(
+ ValidateBean bean,
+ ValidatorResults results,
+ ValidatorResources resources) {
+
+ boolean success = true;
+
+ // Start by getting the form for the current locale and Bean.
+ Form form = resources.getForm(Locale.getDefault(), "ValidateBean");
+
+ System.out.println("\n\nValidating:");
+ System.out.println(bean);
+
+ // Iterate over each of the properties of the Bean which had messages.
+ Iterator propertyNames = results.getPropertyNames().iterator();
+ while (propertyNames.hasNext()) {
+ String propertyName = propertyNames.next();
+
+ // Get the Field associated with that property in the Form
+ Field field = form.getField(propertyName);
+
+ // Look up the formatted name of the field from the Field arg0
+ String prettyFieldName = apps.getString(field.getArg(0).getKey());
+
+ // Get the result of validating the property.
+ ValidatorResult result = results.getValidatorResult(propertyName);
+
+ // Get all the actions run against the property, and iterate over their names.
+ Iterator keys = result.getActions();
+ while (keys.hasNext()) {
+ String actName = keys.next();
+
+ // Get the Action for that name.
+ ValidatorAction action = resources.getValidatorAction(actName);
+
+ // If the result is valid, print PASSED, otherwise print FAILED
+ System.out.println(
+ propertyName
+ + "["
+ + actName
+ + "] ("
+ + (result.isValid(actName) ? "PASSED" : "FAILED")
+ + ")");
+
+ //If the result failed, format the Action's message against the formatted field name
+ if (!result.isValid(actName)) {
+ success = false;
+ String message = apps.getString(action.getMsg());
+ Object[] args = { prettyFieldName };
+ System.out.println(
+ " Error message will be: "
+ + MessageFormat.format(message, args));
+
+ }
+ }
+ }
+ if (success) {
+ System.out.println("FORM VALIDATION PASSED");
+ } else {
+ System.out.println("FORM VALIDATION FAILED");
+ }
+
+ }
+
+}
diff --git a/Java-base/commons-validator/src/src/example/org/apache/commons/validator/example/applicationResources.properties b/Java-base/commons-validator/src/src/example/org/apache/commons/validator/example/applicationResources.properties
new file mode 100644
index 000000000..907fec7ff
--- /dev/null
+++ b/Java-base/commons-validator/src/src/example/org/apache/commons/validator/example/applicationResources.properties
@@ -0,0 +1,28 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# The error messages for the Validation Actions
+errors.required=The {0} field is required.
+errors.int=The {0} field is not an integer.
+
+# The formatted names of the properties
+nameForm.age.displayname=Age
+nameForm.lastname.displayname=Last Name
+nameForm.firstname.displayname=First Name
+nameForm.city.displayname=City
+nameForm.state.displayname=State
+nameForm.postalCode.displayname=Postal Code
+nameForm.street1.displayname=Street Address
+
diff --git a/Java-base/commons-validator/src/src/example/org/apache/commons/validator/example/validator-example.xml b/Java-base/commons-validator/src/src/example/org/apache/commons/validator/example/validator-example.xml
new file mode 100644
index 000000000..80ab2ee8f
--- /dev/null
+++ b/Java-base/commons-validator/src/src/example/org/apache/commons/validator/example/validator-example.xml
@@ -0,0 +1,61 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Java-base/commons-validator/src/src/main/java/org/apache/commons/validator/Arg.java b/Java-base/commons-validator/src/src/main/java/org/apache/commons/validator/Arg.java
new file mode 100644
index 000000000..e3ce7de6a
--- /dev/null
+++ b/Java-base/commons-validator/src/src/main/java/org/apache/commons/validator/Arg.java
@@ -0,0 +1,193 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.validator;
+
+import java.io.Serializable;
+
+/**
+ *
+ * A default argument or an argument for a
+ * specific validator definition (ex: required)
+ * can be stored to pass into a message as parameters. This can be used in a
+ * pluggable validator for constructing locale
+ * sensitive messages by using java.text.MessageFormat
+ * or an equivalent class. The resource field can be
+ * used to determine if the value stored in the argument
+ * is a value to be retrieved from a locale sensitive
+ * message retrieval system like java.util.PropertyResourceBundle.
+ * The resource field defaults to 'true'.
+ *
+ *
Instances of this class are configured with an <arg> xml element.
+ *
+ * @version $Revision$
+ */
+//TODO mutable non-private fields
+public class Arg implements Cloneable, Serializable {
+
+ private static final long serialVersionUID = -8922606779669839294L;
+
+ /**
+ * The resource bundle name that this Arg's key should be
+ * resolved in (optional).
+ * @since Validator 1.1
+ */
+ protected String bundle = null;
+
+ /**
+ * The key or value of the argument.
+ */
+ protected String key = null;
+
+ /**
+ * The name dependency that this argument goes with (optional).
+ */
+ protected String name = null;
+
+ /**
+ * This argument's position in the message. Set postion=0 to
+ * make a replacement in this string: "some msg {0}".
+ * @since Validator 1.1
+ */
+ protected int position = -1;
+
+ /**
+ * Whether or not the key is a message resource (optional). Defaults to
+ * true. If it is 'true', the value will try to be resolved as a message
+ * resource.
+ */
+ protected boolean resource = true;
+
+ /**
+ * Creates and returns a copy of this object.
+ * @return A copy of this object.
+ */
+ @Override
+ public Object clone() {
+ try {
+ return super.clone();
+
+ } catch(CloneNotSupportedException e) {
+ throw new RuntimeException(e.toString());
+ }
+ }
+
+ /**
+ * Returns the resource bundle name.
+ * @return the bundle name.
+ * @since Validator 1.1
+ */
+ public String getBundle() {
+ return this.bundle;
+ }
+
+ /**
+ * Gets the key/value.
+ * @return the key value.
+ */
+ public String getKey() {
+ return this.key;
+ }
+
+ /**
+ * Gets the name of the dependency.
+ * @return the name of the dependency.
+ */
+ public String getName() {
+ return this.name;
+ }
+
+ /**
+ * Argument's replacement position.
+ * @return This argument's replacement position.
+ */
+ public int getPosition() {
+ return this.position;
+ }
+
+ /**
+ * Tests whether or not the key is a resource key or literal value.
+ * @return true if key is a resource key.
+ */
+ public boolean isResource() {
+ return this.resource;
+ }
+
+ /**
+ * Sets the resource bundle name.
+ * @param bundle The new bundle name.
+ * @since Validator 1.1
+ */
+ public void setBundle(String bundle) {
+ this.bundle = bundle;
+ }
+
+ /**
+ * Sets the key/value.
+ * @param key They to access the argument.
+ */
+ public void setKey(String key) {
+ this.key = key;
+ }
+
+ /**
+ * Sets the name of the dependency.
+ * @param name the name of the dependency.
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ /**
+ * Set this argument's replacement position.
+ * @param position set this argument's replacement position.
+ */
+ public void setPosition(int position) {
+ this.position = position;
+ }
+
+ /**
+ * Sets whether or not the key is a resource.
+ * @param resource If true indicates the key is a resource.
+ */
+ public void setResource(boolean resource) {
+ this.resource = resource;
+ }
+
+ /**
+ * Returns a string representation of the object.
+ * @return a string representation of the object.
+ */
+ @Override
+ public String toString() {
+ StringBuilder results = new StringBuilder();
+
+ results.append("Arg: name=");
+ results.append(name);
+ results.append(" key=");
+ results.append(key);
+ results.append(" position=");
+ results.append(position);
+ results.append(" bundle=");
+ results.append(bundle);
+ results.append(" resource=");
+ results.append(resource);
+ results.append("\n");
+
+ return results.toString();
+ }
+
+}
\ No newline at end of file
diff --git a/Java-base/commons-validator/src/src/main/java/org/apache/commons/validator/CreditCardValidator.java b/Java-base/commons-validator/src/src/main/java/org/apache/commons/validator/CreditCardValidator.java
new file mode 100644
index 000000000..29a700e93
--- /dev/null
+++ b/Java-base/commons-validator/src/src/main/java/org/apache/commons/validator/CreditCardValidator.java
@@ -0,0 +1,260 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.validator;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.apache.commons.validator.util.Flags;
+
+/**
+ * Perform credit card validations.
+ *
+ *
+ * By default, all supported card types are allowed. You can specify which
+ * cards should pass validation by configuring the validation options. For
+ * example,
+ *
+ * configures the validator to only pass American Express and Visa cards.
+ * If a card type is not directly supported by this class, you can implement
+ * the CreditCardType interface and pass an instance into the
+ * addAllowedCardType method.
+ *
+ *
+ *
+ * For a similar implementation in Perl, reference Sean M. Burke's
+ * script.
+ * More information is also available
+ * here.
+ *
+ *
+ * @version $Revision$
+ * @since Validator 1.1
+ * @deprecated Use the new CreditCardValidator in the routines package. This class
+ * will be removed in a future release.
+ */
+// CHECKSTYLE:OFF (deprecated code)
+@Deprecated
+public class CreditCardValidator {
+
+ /**
+ * Option specifying that no cards are allowed. This is useful if
+ * you want only custom card types to validate so you turn off the
+ * default cards with this option.
+ *
+ *
+ * CreditCardValidator v = new CreditCardValidator(CreditCardValidator.NONE);
+ * v.addAllowedCardType(customType);
+ * v.isValid(aCardNumber);
+ *
+ *
+ * @since Validator 1.1.2
+ */
+ public static final int NONE = 0;
+
+ /**
+ * Option specifying that American Express cards are allowed.
+ */
+ public static final int AMEX = 1 << 0;
+
+ /**
+ * Option specifying that Visa cards are allowed.
+ */
+ public static final int VISA = 1 << 1;
+
+ /**
+ * Option specifying that Mastercard cards are allowed.
+ */
+ public static final int MASTERCARD = 1 << 2;
+
+ /**
+ * Option specifying that Discover cards are allowed.
+ */
+ public static final int DISCOVER = 1 << 3;
+
+ /**
+ * The CreditCardTypes that are allowed to pass validation.
+ */
+ private final Collection cardTypes = new ArrayList();
+
+ /**
+ * Create a new CreditCardValidator with default options.
+ */
+ public CreditCardValidator() {
+ this(AMEX + VISA + MASTERCARD + DISCOVER);
+ }
+
+ /**
+ * Creates a new CreditCardValidator with the specified options.
+ * @param options Pass in
+ * CreditCardValidator.VISA + CreditCardValidator.AMEX to specify that
+ * those are the only valid card types.
+ */
+ public CreditCardValidator(int options) {
+ super();
+
+ Flags f = new Flags(options);
+ if (f.isOn(VISA)) {
+ this.cardTypes.add(new Visa());
+ }
+
+ if (f.isOn(AMEX)) {
+ this.cardTypes.add(new Amex());
+ }
+
+ if (f.isOn(MASTERCARD)) {
+ this.cardTypes.add(new Mastercard());
+ }
+
+ if (f.isOn(DISCOVER)) {
+ this.cardTypes.add(new Discover());
+ }
+ }
+
+ /**
+ * Checks if the field is a valid credit card number.
+ * @param card The card number to validate.
+ * @return Whether the card number is valid.
+ */
+ public boolean isValid(String card) {
+ if ((card == null) || (card.length() < 13) || (card.length() > 19)) {
+ return false;
+ }
+
+ if (!this.luhnCheck(card)) {
+ return false;
+ }
+
+ for (Object cardType : this.cardTypes) {
+ CreditCardType type = (CreditCardType) cardType;
+ if (type.matches(card)) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Adds an allowed CreditCardType that participates in the card
+ * validation algorithm.
+ * @param type The type that is now allowed to pass validation.
+ * @since Validator 1.1.2
+ */
+ public void addAllowedCardType(CreditCardType type){
+ this.cardTypes.add(type);
+ }
+
+ /**
+ * Checks for a valid credit card number.
+ * @param cardNumber Credit Card Number.
+ * @return Whether the card number passes the luhnCheck.
+ */
+ protected boolean luhnCheck(String cardNumber) {
+ // number must be validated as 0..9 numeric first!!
+ int digits = cardNumber.length();
+ int oddOrEven = digits & 1;
+ long sum = 0;
+ for (int count = 0; count < digits; count++) {
+ int digit = 0;
+ try {
+ digit = Integer.parseInt(cardNumber.charAt(count) + "");
+ } catch(NumberFormatException e) {
+ return false;
+ }
+
+ if (((count & 1) ^ oddOrEven) == 0) { // not
+ digit *= 2;
+ if (digit > 9) {
+ digit -= 9;
+ }
+ }
+ sum += digit;
+ }
+
+ return (sum == 0) ? false : (sum % 10 == 0);
+ }
+
+ /**
+ * CreditCardType implementations define how validation is performed
+ * for one type/brand of credit card.
+ * @since Validator 1.1.2
+ */
+ public interface CreditCardType {
+
+ /**
+ * Returns true if the card number matches this type of credit
+ * card. Note that this method is not responsible
+ * for analyzing the general form of the card number because
+ * CreditCardValidator performs those checks before
+ * calling this method. It is generally only required to valid the
+ * length and prefix of the number to determine if it's the correct
+ * type.
+ * @param card The card number, never null.
+ * @return true if the number matches.
+ */
+ boolean matches(String card);
+
+ }
+
+ /**
+ * Change to support Visa Carte Blue used in France
+ * has been removed - see Bug 35926
+ */
+ private static class Visa implements CreditCardType {
+ private static final String PREFIX = "4";
+ @Override
+ public boolean matches(String card) {
+ return (
+ card.substring(0, 1).equals(PREFIX)
+ && (card.length() == 13 || card.length() == 16));
+ }
+ }
+
+ private static class Amex implements CreditCardType {
+ private static final String PREFIX = "34,37,";
+ @Override
+ public boolean matches(String card) {
+ String prefix2 = card.substring(0, 2) + ",";
+ return ((PREFIX.contains(prefix2)) && (card.length() == 15));
+ }
+ }
+
+ private static class Discover implements CreditCardType {
+ private static final String PREFIX = "6011";
+ @Override
+ public boolean matches(String card) {
+ return (card.substring(0, 4).equals(PREFIX) && (card.length() == 16));
+ }
+ }
+
+ private static class Mastercard implements CreditCardType {
+ private static final String PREFIX = "51,52,53,54,55,";
+ @Override
+ public boolean matches(String card) {
+ String prefix2 = card.substring(0, 2) + ",";
+ return ((PREFIX.contains(prefix2)) && (card.length() == 16));
+ }
+ }
+
+}
diff --git a/Java-base/commons-validator/src/src/main/java/org/apache/commons/validator/DateValidator.java b/Java-base/commons-validator/src/src/main/java/org/apache/commons/validator/DateValidator.java
new file mode 100644
index 000000000..aee5be048
--- /dev/null
+++ b/Java-base/commons-validator/src/src/main/java/org/apache/commons/validator/DateValidator.java
@@ -0,0 +1,133 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.validator;
+
+import java.text.DateFormat;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Locale;
+
+/**
+ *
Perform date validations.
+ *
+ * This class is a Singleton; you can retrieve the instance via the
+ * getInstance() method.
+ *
+ *
+ * @version $Revision$
+ * @since Validator 1.1
+ * @deprecated Use the new DateValidator, CalendarValidator or TimeValidator in the
+ * routines package. This class will be removed in a future release.
+ */
+@Deprecated
+public class DateValidator {
+
+ /**
+ * Singleton instance of this class.
+ */
+ private static final DateValidator DATE_VALIDATOR = new DateValidator();
+
+ /**
+ * Returns the Singleton instance of this validator.
+ * @return A singleton instance of the DateValidator.
+ */
+ public static DateValidator getInstance() {
+ return DATE_VALIDATOR;
+ }
+
+ /**
+ * Protected constructor for subclasses to use.
+ */
+ protected DateValidator() {
+ super();
+ }
+
+ /**
+ *
Checks if the field is a valid date. The pattern is used with
+ * java.text.SimpleDateFormat. If strict is true, then the
+ * length will be checked so '2/12/1999' will not pass validation with
+ * the format 'MM/dd/yyyy' because the month isn't two digits.
+ * The setLenient method is set to false for all.
+ *
+ * @param value The value validation is being performed on.
+ * @param datePattern The pattern passed to SimpleDateFormat.
+ * @param strict Whether or not to have an exact match of the datePattern.
+ * @return true if the date is valid.
+ */
+ public boolean isValid(String value, String datePattern, boolean strict) {
+
+ if (value == null
+ || datePattern == null
+ || datePattern.length() <= 0) {
+
+ return false;
+ }
+
+ SimpleDateFormat formatter = new SimpleDateFormat(datePattern);
+ formatter.setLenient(false);
+
+ try {
+ formatter.parse(value);
+ } catch(ParseException e) {
+ return false;
+ }
+
+ if (strict && (datePattern.length() != value.length())) {
+ return false;
+ }
+
+ return true;
+ }
+
+ /**
+ *
Checks if the field is a valid date. The Locale is
+ * used with java.text.DateFormat. The setLenient method
+ * is set to false for all.
+ *
+ * @param value The value validation is being performed on.
+ * @param locale The locale to use for the date format, defaults to the default
+ * system default if null.
+ * @return true if the date is valid.
+ */
+ public boolean isValid(String value, Locale locale) {
+
+ if (value == null) {
+ return false;
+ }
+
+ DateFormat formatter = null;
+ if (locale != null) {
+ formatter = DateFormat.getDateInstance(DateFormat.SHORT, locale);
+ } else {
+ formatter =
+ DateFormat.getDateInstance(
+ DateFormat.SHORT,
+ Locale.getDefault());
+ }
+
+ formatter.setLenient(false);
+
+ try {
+ formatter.parse(value);
+ } catch(ParseException e) {
+ return false;
+ }
+
+ return true;
+ }
+
+}
diff --git a/Java-base/commons-validator/src/src/main/java/org/apache/commons/validator/EmailValidator.java b/Java-base/commons-validator/src/src/main/java/org/apache/commons/validator/EmailValidator.java
new file mode 100644
index 000000000..f82a4c341
--- /dev/null
+++ b/Java-base/commons-validator/src/src/main/java/org/apache/commons/validator/EmailValidator.java
@@ -0,0 +1,224 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.validator;
+
+import org.apache.commons.validator.routines.InetAddressValidator;
+
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ *
Perform email validations.
+ *
+ * This class is a Singleton; you can retrieve the instance via the getInstance() method.
+ *
+ *
+ * Based on a script by Sandeep V. Tamhankar
+ * http://javascript.internet.com
+ *
+ *
+ * This implementation is not guaranteed to catch all possible errors in an email address.
+ * For example, an address like nobody@noplace.somedog will pass validator, even though there
+ * is no TLD "somedog"
+ *
.
+ *
+ * @version $Revision$
+ * @since Validator 1.1
+ * @deprecated Use the new EmailValidator in the routines package. This class
+ * will be removed in a future release.
+ */
+@Deprecated
+public class EmailValidator {
+
+ private static final String SPECIAL_CHARS = "\\p{Cntrl}\\(\\)<>@,;:'\\\\\\\"\\.\\[\\]";
+ private static final String VALID_CHARS = "[^\\s" + SPECIAL_CHARS + "]";
+ private static final String QUOTED_USER = "(\"[^\"]*\")";
+ private static final String ATOM = VALID_CHARS + '+';
+ private static final String WORD = "((" + VALID_CHARS + "|')+|" + QUOTED_USER + ")";
+
+// NOT USED private static final Pattern LEGAL_ASCII_PATTERN = Pattern.compile("^\\p{ASCII}+$");
+// NOT USED private static final Pattern EMAIL_PATTERN = Pattern.compile("^(.+)@(.+)$");
+ private static final Pattern IP_DOMAIN_PATTERN = Pattern.compile("^\\[(.*)\\]$");
+ private static final Pattern TLD_PATTERN = Pattern.compile("^([a-zA-Z]+)$");
+
+ private static final Pattern USER_PATTERN = Pattern.compile("^\\s*" + WORD + "(\\." + WORD + ")*$");
+ private static final Pattern DOMAIN_PATTERN = Pattern.compile("^" + ATOM + "(\\." + ATOM + ")*\\s*$");
+ private static final Pattern ATOM_PATTERN = Pattern.compile("(" + ATOM + ")");
+
+ /**
+ * Singleton instance of this class.
+ */
+ private static final EmailValidator EMAIL_VALIDATOR = new EmailValidator();
+
+ /**
+ * Returns the Singleton instance of this validator.
+ * @return singleton instance of this validator.
+ */
+ public static EmailValidator getInstance() {
+ return EMAIL_VALIDATOR;
+ }
+
+ /**
+ * Protected constructor for subclasses to use.
+ */
+ protected EmailValidator() {
+ super();
+ }
+
+ /**
+ *
Checks if a field has a valid e-mail address.
+ *
+ * @param email The value validation is being performed on. A null
+ * value is considered invalid.
+ * @return true if the email address is valid.
+ */
+ public boolean isValid(String email) {
+ return org.apache.commons.validator.routines.EmailValidator.getInstance().isValid(email);
+ }
+
+ /**
+ * Returns true if the domain component of an email address is valid.
+ * @param domain being validated.
+ * @return true if the email address's domain is valid.
+ */
+ protected boolean isValidDomain(String domain) {
+ boolean symbolic = false;
+
+ // see if domain is an IP address in brackets
+ Matcher ipDomainMatcher = IP_DOMAIN_PATTERN.matcher(domain);
+
+ if (ipDomainMatcher.matches()) {
+ InetAddressValidator inetAddressValidator =
+ InetAddressValidator.getInstance();
+ if (inetAddressValidator.isValid(ipDomainMatcher.group(1))) {
+ return true;
+ }
+ } else {
+ // Domain is symbolic name
+ symbolic = DOMAIN_PATTERN.matcher(domain).matches();
+ }
+
+ if (symbolic) {
+ if (!isValidSymbolicDomain(domain)) {
+ return false;
+ }
+ } else {
+ return false;
+ }
+
+ return true;
+ }
+
+ /**
+ * Returns true if the user component of an email address is valid.
+ * @param user being validated
+ * @return true if the user name is valid.
+ */
+ protected boolean isValidUser(String user) {
+ return USER_PATTERN.matcher(user).matches();
+ }
+
+ /**
+ * Validates an IP address. Returns true if valid.
+ * @param ipAddress IP address
+ * @return true if the ip address is valid.
+ */
+ protected boolean isValidIpAddress(String ipAddress) {
+ Matcher ipAddressMatcher = IP_DOMAIN_PATTERN.matcher(ipAddress);
+ for (int i = 1; i <= 4; i++) { // CHECKSTYLE IGNORE MagicNumber
+ String ipSegment = ipAddressMatcher.group(i);
+ if (ipSegment == null || ipSegment.length() <= 0) {
+ return false;
+ }
+
+ int iIpSegment = 0;
+
+ try {
+ iIpSegment = Integer.parseInt(ipSegment);
+ } catch(NumberFormatException e) {
+ return false;
+ }
+
+ if (iIpSegment > 255) { // CHECKSTYLE IGNORE MagicNumber
+ return false;
+ }
+
+ }
+ return true;
+ }
+
+ /**
+ * Validates a symbolic domain name. Returns true if it's valid.
+ * @param domain symbolic domain name
+ * @return true if the symbolic domain name is valid.
+ */
+ protected boolean isValidSymbolicDomain(String domain) {
+ String[] domainSegment = new String[10]; // CHECKSTYLE IGNORE MagicNumber
+ boolean match = true;
+ int i = 0;
+ Matcher atomMatcher = ATOM_PATTERN.matcher(domain);
+ while (match) {
+ match = atomMatcher.matches();
+ if (match) {
+ domainSegment[i] = atomMatcher.group(1);
+ int l = domainSegment[i].length() + 1;
+ domain =
+ (l >= domain.length())
+ ? ""
+ : domain.substring(l);
+
+ i++;
+ }
+ }
+
+ int len = i;
+
+ // Make sure there's a host name preceding the domain.
+ if (len < 2) {
+ return false;
+ }
+
+ String tld = domainSegment[len - 1];
+ if (tld.length() > 1) {
+ if (! TLD_PATTERN.matcher(tld).matches()) {
+ return false;
+ }
+ } else {
+ return false;
+ }
+
+ return true;
+ }
+ /**
+ * Recursively remove comments, and replace with a single space. The simpler
+ * regexps in the Email Addressing FAQ are imperfect - they will miss escaped
+ * chars in atoms, for example.
+ * Derived From Mail::RFC822::Address
+ * @param emailStr The email address
+ * @return address with comments removed.
+ */
+ protected String stripComments(String emailStr) {
+ String result = emailStr;
+ String commentPat = "^((?:[^\"\\\\]|\\\\.)*(?:\"(?:[^\"\\\\]|\\\\.)*\"(?:[^\"\\\\]|\111111\\\\.)*)*)\\((?:[^()\\\\]|\\\\.)*\\)/";
+ Pattern commentMatcher = Pattern.compile(commentPat);
+
+ while (commentMatcher.matcher(result).matches()) {
+ result = result.replaceFirst(commentPat, "\1 ");
+ }
+ return result;
+ }
+}
diff --git a/Java-base/commons-validator/src/src/main/java/org/apache/commons/validator/Field.java b/Java-base/commons-validator/src/src/main/java/org/apache/commons/validator/Field.java
new file mode 100644
index 000000000..6d1c575ae
--- /dev/null
+++ b/Java-base/commons-validator/src/src/main/java/org/apache/commons/validator/Field.java
@@ -0,0 +1,958 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.validator;
+
+import java.io.Serializable;
+import java.lang.reflect.InvocationTargetException;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.StringTokenizer;
+
+import org.apache.commons.beanutils.PropertyUtils;
+import org.apache.commons.collections.FastHashMap; // DEPRECATED
+import org.apache.commons.validator.util.ValidatorUtils;
+
+/**
+ * This contains the list of pluggable validators to run on a field and any
+ * message information and variables to perform the validations and generate
+ * error messages. Instances of this class are configured with a
+ * <field> xml element.
+ *
+ * The use of FastHashMap is deprecated and will be replaced in a future
+ * release.
+ *
+ *
+ * @version $Revision$
+ * @see org.apache.commons.validator.Form
+ */
+// TODO mutable non-private fields
+public class Field implements Cloneable, Serializable {
+
+ private static final long serialVersionUID = -8502647722530192185L;
+
+ /**
+ * This is the value that will be used as a key if the Arg
+ * name field has no value.
+ */
+ private static final String DEFAULT_ARG =
+ "org.apache.commons.validator.Field.DEFAULT";
+
+ /**
+ * This indicates an indexed property is being referenced.
+ */
+ public static final String TOKEN_INDEXED = "[]";
+
+ /**
+ * The start of a token.
+ */
+ protected static final String TOKEN_START = "${";
+
+ /**
+ * The end of a token.
+ */
+ protected static final String TOKEN_END = "}";
+
+ /**
+ * A Vriable token.
+ */
+ protected static final String TOKEN_VAR = "var:";
+
+ /**
+ * The Field's property name.
+ */
+ protected String property = null;
+
+ /**
+ * The Field's indexed property name.
+ */
+ protected String indexedProperty = null;
+
+ /**
+ * The Field's indexed list property name.
+ */
+ protected String indexedListProperty = null;
+
+ /**
+ * The Field's unique key.
+ */
+ protected String key = null;
+
+ /**
+ * A comma separated list of validator's this field depends on.
+ */
+ protected String depends = null;
+
+ /**
+ * The Page Number
+ */
+ protected int page = 0;
+
+ /**
+ * The flag that indicates whether scripting should be generated
+ * by the client for client-side validation.
+ * @since Validator 1.4
+ */
+ protected boolean clientValidation = true;
+
+ /**
+ * The order of the Field in the Form.
+ */
+ protected int fieldOrder = 0;
+
+ /**
+ * Internal representation of this.depends String as a List. This List
+ * gets updated whenever setDepends() gets called. This List is
+ * synchronized so a call to setDepends() (which clears the List) won't
+ * interfere with a call to isDependency().
+ */
+ private final List dependencyList = Collections.synchronizedList(new ArrayList());
+
+ /**
+ * @deprecated Subclasses should use getVarMap() instead.
+ */
+ @Deprecated
+ protected FastHashMap hVars = new FastHashMap(); //
+
+ /**
+ * @deprecated Subclasses should use getMsgMap() instead.
+ */
+ @Deprecated
+ protected FastHashMap hMsgs = new FastHashMap(); //
+
+ /**
+ * Holds Maps of arguments. args[0] returns the Map for the first
+ * replacement argument. Start with a 0 length array so that it will
+ * only grow to the size of the highest argument position.
+ * @since Validator 1.1
+ */
+ @SuppressWarnings("unchecked") // cannot instantiate generic array, so have to assume this is OK
+ protected Map[] args = new Map[0];
+
+ /**
+ * Gets the page value that the Field is associated with for
+ * validation.
+ * @return The page number.
+ */
+ public int getPage() {
+ return this.page;
+ }
+
+ /**
+ * Sets the page value that the Field is associated with for
+ * validation.
+ * @param page The page number.
+ */
+ public void setPage(int page) {
+ this.page = page;
+ }
+
+ /**
+ * Gets the position of the Field in the validation list.
+ * @return The field position.
+ */
+ public int getFieldOrder() {
+ return this.fieldOrder;
+ }
+
+ /**
+ * Sets the position of the Field in the validation list.
+ * @param fieldOrder The field position.
+ */
+ public void setFieldOrder(int fieldOrder) {
+ this.fieldOrder = fieldOrder;
+ }
+
+ /**
+ * Gets the property name of the field.
+ * @return The field's property name.
+ */
+ public String getProperty() {
+ return this.property;
+ }
+
+ /**
+ * Sets the property name of the field.
+ * @param property The field's property name.
+ */
+ public void setProperty(String property) {
+ this.property = property;
+ }
+
+ /**
+ * Gets the indexed property name of the field. This
+ * is the method name that can take an int as
+ * a parameter for indexed property value retrieval.
+ * @return The field's indexed property name.
+ */
+ public String getIndexedProperty() {
+ return this.indexedProperty;
+ }
+
+ /**
+ * Sets the indexed property name of the field.
+ * @param indexedProperty The field's indexed property name.
+ */
+ public void setIndexedProperty(String indexedProperty) {
+ this.indexedProperty = indexedProperty;
+ }
+
+ /**
+ * Gets the indexed property name of the field. This
+ * is the method name that will return an array or a
+ * Collection used to retrieve the
+ * list and then loop through the list performing the specified
+ * validations.
+ * @return The field's indexed List property name.
+ */
+ public String getIndexedListProperty() {
+ return this.indexedListProperty;
+ }
+
+ /**
+ * Sets the indexed property name of the field.
+ * @param indexedListProperty The field's indexed List property name.
+ */
+ public void setIndexedListProperty(String indexedListProperty) {
+ this.indexedListProperty = indexedListProperty;
+ }
+
+ /**
+ * Gets the validation rules for this field as a comma separated list.
+ * @return A comma separated list of validator names.
+ */
+ public String getDepends() {
+ return this.depends;
+ }
+
+ /**
+ * Sets the validation rules for this field as a comma separated list.
+ * @param depends A comma separated list of validator names.
+ */
+ public void setDepends(String depends) {
+ this.depends = depends;
+
+ this.dependencyList.clear();
+
+ StringTokenizer st = new StringTokenizer(depends, ",");
+ while (st.hasMoreTokens()) {
+ String depend = st.nextToken().trim();
+
+ if (depend != null && depend.length() > 0) {
+ this.dependencyList.add(depend);
+ }
+ }
+ }
+
+ /**
+ * Add a Msg to the Field.
+ * @param msg A validation message.
+ */
+ public void addMsg(Msg msg) {
+ getMsgMap().put(msg.getName(), msg);
+ }
+
+ /**
+ * Retrieve a message value.
+ * @param key Validation key.
+ * @return A validation message for a specified validator.
+ */
+ public String getMsg(String key) {
+ Msg msg = getMessage(key);
+ return (msg == null) ? null : msg.getKey();
+ }
+
+ /**
+ * Retrieve a message object.
+ * @since Validator 1.1.4
+ * @param key Validation key.
+ * @return A validation message for a specified validator.
+ */
+ public Msg getMessage(String key) {
+ return getMsgMap().get(key);
+ }
+
+ /**
+ * The Field's messages are returned as an
+ * unmodifiable Map.
+ * @since Validator 1.1.4
+ * @return Map of validation messages for the field.
+ */
+ public Map getMessages() {
+ return Collections.unmodifiableMap(getMsgMap());
+ }
+
+ /**
+ * Determines whether client-side scripting should be generated
+ * for this field. The default is true
+ * @return true for scripting; otherwise false
+ * @see #setClientValidation(boolean)
+ * @since Validator 1.4
+ */
+ public boolean isClientValidation() {
+ return this.clientValidation;
+ }
+
+ /**
+ * Sets the flag that determines whether client-side scripting should
+ * be generated for this field.
+ * @param clientValidation the scripting flag
+ * @see #isClientValidation()
+ * @since Validator 1.4
+ */
+ public void setClientValidation(boolean clientValidation) {
+ this.clientValidation = clientValidation;
+ }
+
+ /**
+ * Add an Arg to the replacement argument list.
+ * @since Validator 1.1
+ * @param arg Validation message's argument.
+ */
+ public void addArg(Arg arg) {
+ // TODO this first if check can go away after arg0, etc. are removed from dtd
+ if (arg == null || arg.getKey() == null || arg.getKey().length() == 0) {
+ return;
+ }
+
+ determineArgPosition(arg);
+ ensureArgsCapacity(arg);
+
+ Map argMap = this.args[arg.getPosition()];
+ if (argMap == null) {
+ argMap = new HashMap<>();
+ this.args[arg.getPosition()] = argMap;
+ }
+
+ if (arg.getName() == null) {
+ argMap.put(DEFAULT_ARG, arg);
+ } else {
+ argMap.put(arg.getName(), arg);
+ }
+
+ }
+
+ /**
+ * Calculate the position of the Arg
+ */
+ private void determineArgPosition(Arg arg) {
+
+ int position = arg.getPosition();
+
+ // position has been explicity set
+ if (position >= 0) {
+ return;
+ }
+
+ // first arg to be added
+ if (args == null || args.length == 0) {
+ arg.setPosition(0);
+ return;
+ }
+
+ // determine the position of the last argument with
+ // the same name or the last default argument
+ String keyName = arg.getName() == null ? DEFAULT_ARG : arg.getName();
+ int lastPosition = -1;
+ int lastDefault = -1;
+ for (int i = 0; i < args.length; i++) {
+ if (args[i] != null && args[i].containsKey(keyName)) {
+ lastPosition = i;
+ }
+ if (args[i] != null && args[i].containsKey(DEFAULT_ARG)) {
+ lastDefault = i;
+ }
+ }
+
+ if (lastPosition < 0) {
+ lastPosition = lastDefault;
+ }
+
+ // allocate the next position
+ arg.setPosition(++lastPosition);
+
+ }
+
+ /**
+ * Ensures that the args array can hold the given arg. Resizes the array as
+ * necessary.
+ * @param arg Determine if the args array is long enough to store this arg's
+ * position.
+ */
+ private void ensureArgsCapacity(Arg arg) {
+ if (arg.getPosition() >= this.args.length) {
+ @SuppressWarnings("unchecked") // cannot check this at compile time, but it is OK
+ Map[] newArgs = new Map[arg.getPosition() + 1];
+ System.arraycopy(this.args, 0, newArgs, 0, this.args.length);
+ this.args = newArgs;
+ }
+ }
+
+ /**
+ * Gets the default Arg object at the given position.
+ * @param position Validation message argument's position.
+ * @return The default Arg or null if not found.
+ * @since Validator 1.1
+ */
+ public Arg getArg(int position) {
+ return this.getArg(DEFAULT_ARG, position);
+ }
+
+ /**
+ * Gets the Arg object at the given position. If the key
+ * finds a null value then the default value will be
+ * retrieved.
+ * @param key The name the Arg is stored under. If not found, the default
+ * Arg for the given position (if any) will be retrieved.
+ * @param position The Arg number to find.
+ * @return The Arg with the given name and position or null if not found.
+ * @since Validator 1.1
+ */
+ public Arg getArg(String key, int position) {
+ if ((position >= this.args.length) || (this.args[position] == null)) {
+ return null;
+ }
+
+ Arg arg = args[position].get(key);
+
+ // Didn't find default arg so exit, otherwise we would get into
+ // infinite recursion
+ if ((arg == null) && key.equals(DEFAULT_ARG)) {
+ return null;
+ }
+
+ return (arg == null) ? this.getArg(position) : arg;
+ }
+
+ /**
+ * Retrieves the Args for the given validator name.
+ * @param key The validator's args to retrieve.
+ * @return An Arg[] sorted by the Args' positions (i.e. the Arg at index 0
+ * has a position of 0).
+ * @since Validator 1.1.1
+ */
+ public Arg[] getArgs(String key){
+ Arg[] argList = new Arg[this.args.length];
+
+ for (int i = 0; i < this.args.length; i++) {
+ argList[i] = this.getArg(key, i);
+ }
+
+ return argList;
+ }
+
+ /**
+ * Add a Var to the Field.
+ * @param v The Validator Argument.
+ */
+ public void addVar(Var v) {
+ this.getVarMap().put(v.getName(), v);
+ }
+
+ /**
+ * Add a Var, based on the values passed in, to the
+ * Field.
+ * @param name Name of the validation.
+ * @param value The Argument's value.
+ * @param jsType The Javascript type.
+ */
+ public void addVar(String name, String value, String jsType) {
+ this.addVar(new Var(name, value, jsType));
+ }
+
+ /**
+ * Retrieve a variable.
+ * @param mainKey The Variable's key
+ * @return the Variable
+ */
+ public Var getVar(String mainKey) {
+ return getVarMap().get(mainKey);
+ }
+
+ /**
+ * Retrieve a variable's value.
+ * @param mainKey The Variable's key
+ * @return the Variable's value
+ */
+ public String getVarValue(String mainKey) {
+ String value = null;
+
+ Var v = getVarMap().get(mainKey);
+ if (v != null) {
+ value = v.getValue();
+ }
+
+ return value;
+ }
+
+ /**
+ * The Field's variables are returned as an
+ * unmodifiable Map.
+ * @return the Map of Variable's for a Field.
+ */
+ public Map getVars() {
+ return Collections.unmodifiableMap(getVarMap());
+ }
+
+ /**
+ * Gets a unique key based on the property and indexedProperty fields.
+ * @return a unique key for the field.
+ */
+ public String getKey() {
+ if (this.key == null) {
+ this.generateKey();
+ }
+
+ return this.key;
+ }
+
+ /**
+ * Sets a unique key for the field. This can be used to change
+ * the key temporarily to have a unique key for an indexed field.
+ * @param key a unique key for the field
+ */
+ public void setKey(String key) {
+ this.key = key;
+ }
+
+ /**
+ * If there is a value specified for the indexedProperty field then
+ * true will be returned. Otherwise it will be
+ * false.
+ * @return Whether the Field is indexed.
+ */
+ public boolean isIndexed() {
+ return (indexedListProperty != null && indexedListProperty.length() > 0);
+ }
+
+ /**
+ * Generate correct key value.
+ */
+ public void generateKey() {
+ if (this.isIndexed()) {
+ this.key = this.indexedListProperty + TOKEN_INDEXED + "." + this.property;
+ } else {
+ this.key = this.property;
+ }
+ }
+
+ /**
+ * Replace constants with values in fields and process the depends field
+ * to create the dependency Map.
+ */
+ void process(Map globalConstants, Map constants) {
+ this.hMsgs.setFast(false);
+ this.hVars.setFast(true);
+
+ this.generateKey();
+
+ // Process FormSet Constants
+ for (Iterator> i = constants.entrySet().iterator(); i.hasNext();) {
+ Entry entry = i.next();
+ String key1 = entry.getKey();
+ String key2 = TOKEN_START + key1 + TOKEN_END;
+ String replaceValue = entry.getValue();
+
+ property = ValidatorUtils.replace(property, key2, replaceValue);
+
+ processVars(key2, replaceValue);
+
+ this.processMessageComponents(key2, replaceValue);
+ }
+
+ // Process Global Constants
+ for (Iterator> i = globalConstants.entrySet().iterator(); i.hasNext();) {
+ Entry entry = i.next();
+ String key1 = entry.getKey();
+ String key2 = TOKEN_START + key1 + TOKEN_END;
+ String replaceValue = entry.getValue();
+
+ property = ValidatorUtils.replace(property, key2, replaceValue);
+
+ processVars(key2, replaceValue);
+
+ this.processMessageComponents(key2, replaceValue);
+ }
+
+ // Process Var Constant Replacement
+ for (Iterator i = getVarMap().keySet().iterator(); i.hasNext();) {
+ String key1 = i.next();
+ String key2 = TOKEN_START + TOKEN_VAR + key1 + TOKEN_END;
+ Var var = this.getVar(key1);
+ String replaceValue = var.getValue();
+
+ this.processMessageComponents(key2, replaceValue);
+ }
+
+ hMsgs.setFast(true);
+ }
+
+ /**
+ * Replace the vars value with the key/value pairs passed in.
+ */
+ private void processVars(String key, String replaceValue) {
+ Iterator i = getVarMap().keySet().iterator();
+ while (i.hasNext()) {
+ String varKey = i.next();
+ Var var = this.getVar(varKey);
+
+ var.setValue(ValidatorUtils.replace(var.getValue(), key, replaceValue));
+ }
+
+ }
+
+ /**
+ * Replace the args key value with the key/value pairs passed in.
+ */
+ private void processMessageComponents(String key, String replaceValue) {
+ String varKey = TOKEN_START + TOKEN_VAR;
+ // Process Messages
+ if (key != null && !key.startsWith(varKey)) {
+ for (Iterator i = getMsgMap().values().iterator(); i.hasNext();) {
+ Msg msg = i.next();
+ msg.setKey(ValidatorUtils.replace(msg.getKey(), key, replaceValue));
+ }
+ }
+
+ this.processArg(key, replaceValue);
+ }
+
+ /**
+ * Replace the arg Collection key value with the key/value
+ * pairs passed in.
+ */
+ private void processArg(String key, String replaceValue) {
+ for (int i = 0; i < this.args.length; i++) {
+
+ Map argMap = this.args[i];
+ if (argMap == null) {
+ continue;
+ }
+
+ Iterator iter = argMap.values().iterator();
+ while (iter.hasNext()) {
+ Arg arg = iter.next();
+
+ if (arg != null) {
+ arg.setKey(
+ ValidatorUtils.replace(arg.getKey(), key, replaceValue));
+ }
+ }
+ }
+ }
+
+ /**
+ * Checks if the validator is listed as a dependency.
+ * @param validatorName Name of the validator to check.
+ * @return Whether the field is dependant on a validator.
+ */
+ public boolean isDependency(String validatorName) {
+ return this.dependencyList.contains(validatorName);
+ }
+
+ /**
+ * Gets an unmodifiable List of the dependencies in the same
+ * order they were defined in parameter passed to the setDepends() method.
+ * @return A list of the Field's dependancies.
+ */
+ public List getDependencyList() {
+ return Collections.unmodifiableList(this.dependencyList);
+ }
+
+ /**
+ * Creates and returns a copy of this object.
+ * @return A copy of the Field.
+ */
+ @Override
+ public Object clone() {
+ Field field = null;
+ try {
+ field = (Field) super.clone();
+ } catch(CloneNotSupportedException e) {
+ throw new RuntimeException(e.toString());
+ }
+
+ @SuppressWarnings("unchecked") // empty array always OK; cannot check this at compile time
+ final Map[] tempMap = new Map[this.args.length];
+ field.args = tempMap;
+ for (int i = 0; i < this.args.length; i++) {
+ if (this.args[i] == null) {
+ continue;
+ }
+
+ Map argMap = new HashMap<>(this.args[i]);
+ Iterator> iter = argMap.entrySet().iterator();
+ while (iter.hasNext()) {
+ Entry entry = iter.next();
+ String validatorName = entry.getKey();
+ Arg arg = entry.getValue();
+ argMap.put(validatorName, (Arg) arg.clone());
+ }
+ field.args[i] = argMap;
+ }
+
+ field.hVars = ValidatorUtils.copyFastHashMap(hVars);
+ field.hMsgs = ValidatorUtils.copyFastHashMap(hMsgs);
+
+ return field;
+ }
+
+ /**
+ * Returns a string representation of the object.
+ * @return A string representation of the object.
+ */
+ @Override
+ public String toString() {
+ StringBuilder results = new StringBuilder();
+
+ results.append("\t\tkey = " + key + "\n");
+ results.append("\t\tproperty = " + property + "\n");
+ results.append("\t\tindexedProperty = " + indexedProperty + "\n");
+ results.append("\t\tindexedListProperty = " + indexedListProperty + "\n");
+ results.append("\t\tdepends = " + depends + "\n");
+ results.append("\t\tpage = " + page + "\n");
+ results.append("\t\tfieldOrder = " + fieldOrder + "\n");
+
+ if (hVars != null) {
+ results.append("\t\tVars:\n");
+ for (Iterator> i = getVarMap().keySet().iterator(); i.hasNext();) {
+ Object key1 = i.next();
+ results.append("\t\t\t");
+ results.append(key1);
+ results.append("=");
+ results.append(getVarMap().get(key1));
+ results.append("\n");
+ }
+ }
+
+ return results.toString();
+ }
+
+ /**
+ * Returns an indexed property from the object we're validating.
+ *
+ * @param bean The bean to extract the indexed values from.
+ * @throws ValidatorException If there's an error looking up the property
+ * or, the property found is not indexed.
+ */
+ Object[] getIndexedProperty(Object bean) throws ValidatorException {
+ Object indexProp = null;
+
+ try {
+ indexProp =
+ PropertyUtils.getProperty(bean, this.getIndexedListProperty());
+
+ } catch(IllegalAccessException|InvocationTargetException|NoSuchMethodException e) {
+ throw new ValidatorException(e.getMessage());
+ }
+
+ if (indexProp instanceof Collection) {
+ return ((Collection>) indexProp).toArray();
+
+ } else if (indexProp.getClass().isArray()) {
+ return (Object[]) indexProp;
+
+ } else {
+ throw new ValidatorException(this.getKey() + " is not indexed");
+ }
+
+ }
+ /**
+ * Returns the size of an indexed property from the object we're validating.
+ *
+ * @param bean The bean to extract the indexed values from.
+ * @throws ValidatorException If there's an error looking up the property
+ * or, the property found is not indexed.
+ */
+ private int getIndexedPropertySize(Object bean) throws ValidatorException {
+ Object indexProp = null;
+
+ try {
+ indexProp =
+ PropertyUtils.getProperty(bean, this.getIndexedListProperty());
+
+ } catch(IllegalAccessException|InvocationTargetException|NoSuchMethodException e) {
+ throw new ValidatorException(e.getMessage());
+ }
+
+ if (indexProp == null) {
+ return 0;
+ } else if (indexProp instanceof Collection) {
+ return ((Collection>)indexProp).size();
+ } else if (indexProp.getClass().isArray()) {
+ return ((Object[])indexProp).length;
+ } else {
+ throw new ValidatorException(this.getKey() + " is not indexed");
+ }
+
+ }
+
+ /**
+ * Executes the given ValidatorAction and all ValidatorActions that it
+ * depends on.
+ * @return true if the validation succeeded.
+ */
+ private boolean validateForRule(
+ ValidatorAction va,
+ ValidatorResults results,
+ Map actions,
+ Map params,
+ int pos)
+ throws ValidatorException {
+
+ ValidatorResult result = results.getValidatorResult(this.getKey());
+ if (result != null && result.containsAction(va.getName())) {
+ return result.isValid(va.getName());
+ }
+
+ if (!this.runDependentValidators(va, results, actions, params, pos)) {
+ return false;
+ }
+
+ return va.executeValidationMethod(this, params, results, pos);
+ }
+
+ /**
+ * Calls all of the validators that this validator depends on.
+ * TODO ValidatorAction should know how to run its own dependencies.
+ * @param va Run dependent validators for this action.
+ * @param results
+ * @param actions
+ * @param pos
+ * @return true if all of the dependent validations passed.
+ * @throws ValidatorException If there's an error running a validator
+ */
+ private boolean runDependentValidators(
+ ValidatorAction va,
+ ValidatorResults results,
+ Map actions,
+ Map params,
+ int pos)
+ throws ValidatorException {
+
+ List dependentValidators = va.getDependencyList();
+
+ if (dependentValidators.isEmpty()) {
+ return true;
+ }
+
+ Iterator iter = dependentValidators.iterator();
+ while (iter.hasNext()) {
+ String depend = iter.next();
+
+ ValidatorAction action = actions.get(depend);
+ if (action == null) {
+ this.handleMissingAction(depend);
+ }
+
+ if (!this.validateForRule(action, results, actions, params, pos)) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ /**
+ * Run the configured validations on this field. Run all validations
+ * in the depends clause over each item in turn, returning when the first
+ * one fails.
+ * @param params A Map of parameter class names to parameter values to pass
+ * into validation methods.
+ * @param actions A Map of validator names to ValidatorAction objects.
+ * @return A ValidatorResults object containing validation messages for
+ * this field.
+ * @throws ValidatorException If an error occurs during validation.
+ */
+ public ValidatorResults validate(Map params, Map actions)
+ throws ValidatorException {
+
+ if (this.getDepends() == null) {
+ return new ValidatorResults();
+ }
+
+ ValidatorResults allResults = new ValidatorResults();
+
+ Object bean = params.get(Validator.BEAN_PARAM);
+ int numberOfFieldsToValidate =
+ this.isIndexed() ? this.getIndexedPropertySize(bean) : 1;
+
+ for (int fieldNumber = 0; fieldNumber < numberOfFieldsToValidate; fieldNumber++) {
+
+ ValidatorResults results = new ValidatorResults();
+ synchronized(dependencyList) {
+ Iterator dependencies = this.dependencyList.iterator();
+ while (dependencies.hasNext()) {
+ String depend = dependencies.next();
+
+ ValidatorAction action = actions.get(depend);
+ if (action == null) {
+ this.handleMissingAction(depend);
+ }
+
+ boolean good =
+ validateForRule(action, results, actions, params, fieldNumber);
+
+ if (!good) {
+ allResults.merge(results);
+ return allResults;
+ }
+ }
+ }
+ allResults.merge(results);
+ }
+
+ return allResults;
+ }
+
+ /**
+ * Called when a validator name is used in a depends clause but there is
+ * no know ValidatorAction configured for that name.
+ * @param name The name of the validator in the depends list.
+ * @throws ValidatorException
+ */
+ private void handleMissingAction(String name) throws ValidatorException {
+ throw new ValidatorException("No ValidatorAction named " + name
+ + " found for field " + this.getProperty());
+ }
+
+ /**
+ * Returns a Map of String Msg names to Msg objects.
+ * @since Validator 1.2.0
+ * @return A Map of the Field's messages.
+ */
+ @SuppressWarnings("unchecked") // FastHashMap does not support generics
+ protected Map getMsgMap() {
+ return hMsgs;
+ }
+
+ /**
+ * Returns a Map of String Var names to Var objects.
+ * @since Validator 1.2.0
+ * @return A Map of the Field's variables.
+ */
+ @SuppressWarnings("unchecked") // FastHashMap does not support generics
+ protected Map getVarMap() {
+ return hVars;
+ }
+}
+
diff --git a/Java-base/commons-validator/src/src/main/java/org/apache/commons/validator/Form.java b/Java-base/commons-validator/src/src/main/java/org/apache/commons/validator/Form.java
new file mode 100644
index 000000000..68488bbba
--- /dev/null
+++ b/Java-base/commons-validator/src/src/main/java/org/apache/commons/validator/Form.java
@@ -0,0 +1,352 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.validator;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.commons.collections.FastHashMap;// DEPRECATED
+
+/**
+ *
+ *
+ * This contains a set of validation rules for a form/JavaBean. The information
+ * is contained in a list of Field objects. Instances of this class
+ * are configured with a <form> xml element.
+ *
+ * The use of FastHashMap is deprecated and will be replaced in a future
+ * release.
+ *
+ * @version $Revision$
+ */
+//TODO mutable non-private fields
+public class Form implements Serializable {
+
+ private static final long serialVersionUID = 6445211789563796371L;
+
+ /** The name/key the set of validation rules is stored under. */
+ protected String name = null;
+
+ /**
+ * List of Fields. Used to maintain the order they were added
+ * in although individual Fields can be retrieved using Map
+ * of Fields.
+ */
+ protected List lFields = new ArrayList();
+
+ /**
+ * Map of Fields keyed on their property value.
+ *
+ * @deprecated Subclasses should use getFieldMap() instead.
+ */
+ @Deprecated
+ protected FastHashMap hFields = new FastHashMap(); //
+
+ /**
+ * The name/key of the form which this form extends from.
+ *
+ * @since Validator 1.2.0
+ */
+ protected String inherit = null;
+
+ /**
+ * Whether or not the this Form was processed for replacing
+ * variables in strings with their values.
+ */
+ private boolean processed = false;
+
+ /**
+ * Gets the name/key of the set of validation rules.
+ *
+ * @return The name value
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * Sets the name/key of the set of validation rules.
+ *
+ * @param name The new name value
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ /**
+ * Add a Field to the Form.
+ *
+ * @param f The field
+ */
+ public void addField(Field f) {
+ this.lFields.add(f);
+ getFieldMap().put(f.getKey(), f);
+ }
+
+ /**
+ * A List of Fields is returned as an unmodifiable
+ * List.
+ *
+ * @return The fields value
+ */
+ public List getFields() {
+ return Collections.unmodifiableList(lFields);
+ }
+
+ /**
+ * Returns the Field with the given name or null if this Form has no such
+ * field.
+ *
+ * @param fieldName The field name
+ * @return The field value
+ * @since Validator 1.1
+ */
+ public Field getField(String fieldName) {
+ return getFieldMap().get(fieldName);
+ }
+
+ /**
+ * Returns true if this Form contains a Field with the given name.
+ *
+ * @param fieldName The field name
+ * @return True if this form contains the field by the given name
+ * @since Validator 1.1
+ */
+ public boolean containsField(String fieldName) {
+ return getFieldMap().containsKey(fieldName);
+ }
+
+ /**
+ * Merges the given form into this one. For any field in depends
+ * not present in this form, include it. depends has precedence
+ * in the way the fields are ordered.
+ *
+ * @param depends the form we want to merge
+ * @since Validator 1.2.0
+ */
+ protected void merge(Form depends) {
+
+ List templFields = new ArrayList();
+ @SuppressWarnings("unchecked") // FastHashMap is not generic
+ Map temphFields = new FastHashMap();
+ Iterator dependsIt = depends.getFields().iterator();
+ while (dependsIt.hasNext()) {
+ Field defaultField = dependsIt.next();
+ if (defaultField != null) {
+ String fieldKey = defaultField.getKey();
+ if (!this.containsField(fieldKey)) {
+ templFields.add(defaultField);
+ temphFields.put(fieldKey, defaultField);
+ }
+ else {
+ Field old = getField(fieldKey);
+ getFieldMap().remove(fieldKey);
+ lFields.remove(old);
+ templFields.add(old);
+ temphFields.put(fieldKey, old);
+ }
+ }
+ }
+ lFields.addAll(0, templFields);
+ getFieldMap().putAll(temphFields);
+ }
+
+ /**
+ * Processes all of the Form's Fields.
+ *
+ * @param globalConstants A map of global constants
+ * @param constants Local constants
+ * @param forms Map of forms
+ * @since Validator 1.2.0
+ */
+ protected void process(Map globalConstants, Map constants, Map forms) {
+ if (isProcessed()) {
+ return;
+ }
+
+ int n = 0;//we want the fields from its parent first
+ if (isExtending()) {
+ Form parent = forms.get(inherit);
+ if (parent != null) {
+ if (!parent.isProcessed()) {
+ //we want to go all the way up the tree
+ parent.process(constants, globalConstants, forms);
+ }
+ for (Iterator i = parent.getFields().iterator(); i.hasNext(); ) {
+ Field f = i.next();
+ //we want to be able to override any fields we like
+ if (getFieldMap().get(f.getKey()) == null) {
+ lFields.add(n, f);
+ getFieldMap().put(f.getKey(), f);
+ n++;
+ }
+ }
+ }
+ }
+ hFields.setFast(true);
+ //no need to reprocess parent's fields, we iterate from 'n'
+ for (Iterator i = lFields.listIterator(n); i.hasNext(); ) {
+ Field f = i.next();
+ f.process(globalConstants, constants);
+ }
+
+ processed = true;
+ }
+
+ /**
+ * Returns a string representation of the object.
+ *
+ * @return string representation
+ */
+ @Override
+ public String toString() {
+ StringBuilder results = new StringBuilder();
+
+ results.append("Form: ");
+ results.append(name);
+ results.append("\n");
+
+ for (Iterator i = lFields.iterator(); i.hasNext(); ) {
+ results.append("\tField: \n");
+ results.append(i.next());
+ results.append("\n");
+ }
+
+ return results.toString();
+ }
+
+ /**
+ * Validate all Fields in this Form on the given page and below.
+ *
+ * @param params A Map of parameter class names to parameter
+ * values to pass into validation methods.
+ * @param actions A Map of validator names to ValidatorAction
+ * objects.
+ * @param page Fields on pages higher than this will not be
+ * validated.
+ * @return A ValidatorResults object containing all
+ * validation messages.
+ * @throws ValidatorException
+ */
+ ValidatorResults validate(Map params, Map actions, int page)
+ throws ValidatorException {
+ return validate(params, actions, page, null);
+ }
+
+ /**
+ * Validate all Fields in this Form on the given page and below.
+ *
+ * @param params A Map of parameter class names to parameter
+ * values to pass into validation methods.
+ * @param actions A Map of validator names to ValidatorAction
+ * objects.
+ * @param page Fields on pages higher than this will not be
+ * validated.
+ * @return A ValidatorResults object containing all
+ * validation messages.
+ * @throws ValidatorException
+ * @since 1.2.0
+ */
+ ValidatorResults validate(Map params, Map actions, int page, String fieldName)
+ throws ValidatorException {
+ ValidatorResults results = new ValidatorResults();
+ params.put(Validator.VALIDATOR_RESULTS_PARAM, results);
+
+ // Only validate a single field if specified
+ if (fieldName != null) {
+ Field field = getFieldMap().get(fieldName);
+
+ if (field == null) {
+ throw new ValidatorException("Unknown field "+fieldName+" in form "+getName());
+ }
+ params.put(Validator.FIELD_PARAM, field);
+
+ if (field.getPage() <= page) {
+ results.merge(field.validate(params, actions));
+ }
+ } else {
+ Iterator fields = this.lFields.iterator();
+ while (fields.hasNext()) {
+ Field field = fields.next();
+
+ params.put(Validator.FIELD_PARAM, field);
+
+ if (field.getPage() <= page) {
+ results.merge(field.validate(params, actions));
+ }
+ }
+ }
+
+ return results;
+ }
+
+ /**
+ * Whether or not the this Form was processed for replacing
+ * variables in strings with their values.
+ *
+ * @return The processed value
+ * @since Validator 1.2.0
+ */
+ public boolean isProcessed() {
+ return processed;
+ }
+
+ /**
+ * Gets the name/key of the parent set of validation rules.
+ *
+ * @return The extends value
+ * @since Validator 1.2.0
+ */
+ public String getExtends() {
+ return inherit;
+ }
+
+ /**
+ * Sets the name/key of the parent set of validation rules.
+ *
+ * @param inherit The new extends value
+ * @since Validator 1.2.0
+ */
+ public void setExtends(String inherit) {
+ this.inherit = inherit;
+ }
+
+ /**
+ * Get extends flag.
+ *
+ * @return The extending value
+ * @since Validator 1.2.0
+ */
+ public boolean isExtending() {
+ return inherit != null;
+ }
+
+ /**
+ * Returns a Map of String field keys to Field objects.
+ *
+ * @return The fieldMap value
+ * @since Validator 1.2.0
+ */
+ @SuppressWarnings("unchecked") // FastHashMap is not generic
+ protected Map getFieldMap() {
+ return hFields;
+ }
+}
diff --git a/Java-base/commons-validator/src/src/main/java/org/apache/commons/validator/FormSet.java b/Java-base/commons-validator/src/src/main/java/org/apache/commons/validator/FormSet.java
new file mode 100644
index 000000000..5767c529d
--- /dev/null
+++ b/Java-base/commons-validator/src/src/main/java/org/apache/commons/validator/FormSet.java
@@ -0,0 +1,378 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.validator;
+
+import java.io.Serializable;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Map.Entry;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * Holds a set of Forms stored associated with a Locale
+ * based on the country, language, and variant specified. Instances of this
+ * class are configured with a <formset> xml element.
+ *
+ * @version $Revision$
+ */
+public class FormSet implements Serializable {
+
+ private static final long serialVersionUID = -8936513232763306055L;
+
+ /** Logging */
+ private transient Log log = LogFactory.getLog(FormSet.class);
+
+ /**
+ * Whether or not the this FormSet was processed for replacing
+ * variables in strings with their values.
+ */
+ private boolean processed = false;
+
+ /** Language component of Locale (required). */
+ private String language = null;
+
+ /** Country component of Locale (optional). */
+ private String country = null;
+
+ /** Variant component of Locale (optional). */
+ private String variant = null;
+
+ /**
+ * A Map of Forms using the name field of the
+ * Form as the key.
+ */
+ private final Map forms = new HashMap();
+
+ /**
+ * A Map of Constants using the name field of the
+ * Constant as the key.
+ */
+ private final Map constants = new HashMap();
+
+ /**
+ * This is the type of FormSets where no locale is specified.
+ */
+ protected final static int GLOBAL_FORMSET = 1;
+
+ /**
+ * This is the type of FormSets where only language locale is
+ * specified.
+ */
+ protected final static int LANGUAGE_FORMSET = 2;
+
+ /**
+ * This is the type of FormSets where only language and country
+ * locale are specified.
+ */
+ protected final static int COUNTRY_FORMSET = 3;
+
+ /**
+ * This is the type of FormSets where full locale has been set.
+ */
+ protected final static int VARIANT_FORMSET = 4;
+
+ /**
+ * Flag indicating if this formSet has been merged with its parent (higher
+ * rank in Locale hierarchy).
+ */
+ private boolean merged;
+
+ /**
+ * Has this formSet been merged?
+ *
+ * @return true if it has been merged
+ * @since Validator 1.2.0
+ */
+ protected boolean isMerged() {
+ return merged;
+ }
+
+ /**
+ * Returns the type of FormSet:GLOBAL_FORMSET,
+ * LANGUAGE_FORMSET,COUNTRY_FORMSET or VARIANT_FORMSET
+ * .
+ *
+ * @return The type value
+ * @since Validator 1.2.0
+ * @throws NullPointerException if there is inconsistency in the locale
+ * definition (not sure about this)
+ */
+ protected int getType() {
+ if (getVariant() != null) {
+ if (getLanguage() == null || getCountry() == null) {
+ throw new NullPointerException(
+ "When variant is specified, country and language must be specified.");
+ }
+ return VARIANT_FORMSET;
+ }
+ else if (getCountry() != null) {
+ if (getLanguage() == null) {
+ throw new NullPointerException(
+ "When country is specified, language must be specified.");
+ }
+ return COUNTRY_FORMSET;
+ }
+ else if (getLanguage() != null) {
+ return LANGUAGE_FORMSET;
+ }
+ else {
+ return GLOBAL_FORMSET;
+ }
+ }
+
+ /**
+ * Merges the given FormSet into this one. If any of depends
+ * s Forms are not in this FormSet then, include
+ * them, else merge both Forms. Theoretically we should only
+ * merge a "parent" formSet.
+ *
+ * @param depends FormSet to be merged
+ * @since Validator 1.2.0
+ */
+ protected void merge(FormSet depends) {
+ if (depends != null) {
+ Map pForms = getForms();
+ Map dForms = depends.getForms();
+ for (Iterator> it = dForms.entrySet().iterator(); it.hasNext(); ) {
+ Entry entry = it.next();
+ String key = entry.getKey();
+ Form pForm = pForms.get(key);
+ if (pForm != null) {//merge, but principal 'rules', don't overwrite
+ // anything
+ pForm.merge(entry.getValue());
+ }
+ else {//just add
+ addForm(entry.getValue());
+ }
+ }
+ }
+ merged = true;
+ }
+
+ /**
+ * Whether or not the this FormSet was processed for replacing
+ * variables in strings with their values.
+ *
+ * @return The processed value
+ */
+ public boolean isProcessed() {
+ return processed;
+ }
+
+ /**
+ * Gets the equivalent of the language component of Locale.
+ *
+ * @return The language value
+ */
+ public String getLanguage() {
+ return language;
+ }
+
+ /**
+ * Sets the equivalent of the language component of Locale.
+ *
+ * @param language The new language value
+ */
+ public void setLanguage(String language) {
+ this.language = language;
+ }
+
+ /**
+ * Gets the equivalent of the country component of Locale.
+ *
+ * @return The country value
+ */
+ public String getCountry() {
+ return country;
+ }
+
+ /**
+ * Sets the equivalent of the country component of Locale.
+ *
+ * @param country The new country value
+ */
+ public void setCountry(String country) {
+ this.country = country;
+ }
+
+ /**
+ * Gets the equivalent of the variant component of Locale.
+ *
+ * @return The variant value
+ */
+ public String getVariant() {
+ return variant;
+ }
+
+ /**
+ * Sets the equivalent of the variant component of Locale.
+ *
+ * @param variant The new variant value
+ */
+ public void setVariant(String variant) {
+ this.variant = variant;
+ }
+
+ /**
+ * Add a Constant to the locale level.
+ *
+ * @param name The constant name
+ * @param value The constant value
+ */
+ public void addConstant(String name, String value) {
+
+ if (constants.containsKey(name)) {
+ getLog().error("Constant '" + name + "' already exists in FormSet["
+ + this.displayKey() + "] - ignoring.");
+
+ } else {
+ constants.put(name, value);
+ }
+
+ }
+
+ /**
+ * Add a Form to the FormSet.
+ *
+ * @param f The form
+ */
+ public void addForm(Form f) {
+
+ String formName = f.getName();
+ if (forms.containsKey(formName)) {
+ getLog().error("Form '" + formName + "' already exists in FormSet["
+ + this.displayKey() + "] - ignoring.");
+
+ } else {
+ forms.put(f.getName(), f);
+ }
+
+ }
+
+ /**
+ * Retrieve a Form based on the form name.
+ *
+ * @param formName The form name
+ * @return The form
+ */
+ public Form getForm(String formName) {
+ return this.forms.get(formName);
+ }
+
+ /**
+ * A Map of Forms is returned as an unmodifiable
+ * Map with the key based on the form name.
+ *
+ * @return The forms map
+ */
+ public Map getForms() {
+ return Collections.unmodifiableMap(forms);
+ }
+
+ /**
+ * Processes all of the Forms.
+ *
+ * @param globalConstants Global constants
+ */
+ synchronized void process(Map globalConstants) {
+ for (Iterator