summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2021-05-06Fix sonars in policy-commonJim Hahn83-452/+496
Fixed sonars: - use "var" instead of actual type name - re-interrupt threads - use rej2 split() instead of String split() Issue-ID: POLICY-3285 Change-Id: I82261e0b8a53ee5c5264556fbf5cec37454f014e Signed-off-by: Jim Hahn <jrh3@att.com>
2021-04-29Remove GroupValidationResultJim Hahn46-2552/+278
Removed GroupValidationResult, replacing it with BeanValidationResult. Modified the ParameterGroup subclasses to use BeanValidator, adding annotations where needed to trigger the validations that had been automatically performed by GroupValidationResult. Added Size annotation, used to verify minimum lengths of maps and collections. Added ClassName annotation, used to verify that a property contains the name of a class that is actually in the classpath. Added another addResult() method to make it easier when replacing calls to GroupValidationResult setResult() method with BeanValidationResult. Issue-ID: POLICY-2059 Change-Id: Id4da24886908723006624c5d53edeb034102299d Signed-off-by: Jim Hahn <jrh3@att.com>
2021-04-13Merge "Revert "Modify StandardCoder to handle empty source""Pamela Dragosh2-55/+7
2021-04-13Revert "Modify StandardCoder to handle empty source"Jim Hahn2-55/+7
This reverts commit 04623fef95f2b164d79ad48de2ef3708d02eda80. Reason for revert: prefer consistency with gson Issue-ID: POLICY-3172 Change-Id: Ic2501abcc68ec1186142a7e520e7985c43fd3315 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-04-13Add command line handleradheli.tavares8-2/+523
Added a Handler for command line classes to share common strucutures. Issue-ID: POLICY-3128 Change-Id: I662911c467faf5c39b8db018bb1a564fba7587a6 Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
2021-04-07Modify StandardCoder to handle empty sourceJim Hahn2-7/+55
Currently, if the source string or source file is empty, the StandardCoder just returns null. Modified it to throw an exception in those cases. However, if the string reference is null, it will still return null. Issue-ID: POLICY-3172 Change-Id: Ie7d5e1b0328a24d94a75af8d18a341faebbe5d5f Signed-off-by: Jim Hahn <jrh3@att.com>
2021-03-25Use self-signed-cert property for HTTP clientsJim Hahn1-5/+4
Currently, the HttpClient code sets self-signed-certs to true whenever https is specified. This is insecure. Modified the code to set the value based on the property, defaulting to false. Issue-ID: POLICY-3145 Change-Id: Ie88cf2411ae44a7c53bc8943f615a74c5b87d1aa Signed-off-by: Jim Hahn <jrh3@att.com>
2021-03-18Add utility to generate keystore for testingJim Hahn3-0/+291
Added a class that will generate a keystore containing a self-signed certificate. Issue-ID: POLICY-3147 Change-Id: I25e7307c2e73dbacae24c8fce616bf2ada93df9f Signed-off-by: Jim Hahn <jrh3@att.com>
2021-03-12Remove more unnecessary plugins from commonJim Hahn1-42/+1
Issue-ID: POLICY-3126 Change-Id: I2f39e14c9cea0ec58709e24995aab536f2df7990 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-03-12Address plugin-not-found issuesJim Hahn8-368/+6
Removed references to archetype-packaging and lifecycle-mapping, where unnecessary due to pom inheritance. Issue-ID: POLICY-3126 Change-Id: Ie31edcb7ae31e1bb495904fce2c8ed56d9bf10f5 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-03-10Bump version to 1.9.0 in commonJim Hahn11-13/+13
Issue-ID: POLICY-3105 Change-Id: I1fd654fef96a1e41f150ea13baf39acc882f6bb2 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-02-24Update info.yaml in commonRam Krishna Verma1-2/+2
Issue-ID: POLICY-3028 Change-Id: Id67f1f5205fe0522b8f909015a7cf503d82a585c Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
2021-02-23Bump version to 1.8.1-SNAPSHOT in commonJim Hahn11-11/+11
Issue-ID: POLICY-3088 Change-Id: I1cc2d1d26c337d67b0ecadd852e43b603902415e Signed-off-by: Jim Hahn <jrh3@att.com>
2021-02-22Release artifacts 1.8.0 of common8.0.0-ONAPJim Hahn1-0/+4
Issue-ID: POLICY-3088 Change-Id: I2419754fc055bb350ebb9299a69c5e2d81fac173 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-02-22Point to non-snapshots in commonJim Hahn1-1/+1
Issue-ID: POLICY-3088 Change-Id: I3b3afdc15fb006c6b5fc6b223aa4d3ff6f112f31 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-02-18Remove duplicate code from type adaptersJim Hahn11-263/+195
Extracted a common superclass, StringTypeAdapter, out of the gson type adapter classes. Issue-ID: POLICY-2914 Change-Id: I4bbd2a6e8372e7f42c4952ba9ff03eed97473fb2 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-02-18Add more java.time adaptersPamela Dragosh9-2/+560
The time extensions require these adapters for anyone using our gson adapter to serialize/deserialize the DecisionRequest. Issue-ID: POLICY-2810 Change-Id: I64a7e4a5a256c77bd67dab867664e41b61cd0050 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2021-02-12Make gson type adapters more genericJim Hahn2-10/+24
Enhanced ZonedDateTime adapter so a date format string can be provided. Simplified InstantAsMillis adapter. Issue-ID: POLICY-2905 Change-Id: Ic4ddba19391b165d6a7528ce18c22541d12324c7 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-02-11Fix sonars from depeendency upgradeJim Hahn2-7/+7
The dependency upgrades in policy-parent caused some new sonars. In particular, initMocks() has been deprecated - replaced with calls to the Mockito Runner. Issue-ID: POLICY-2914 Change-Id: Iaf10f676c380adb9785e836cb15792596b378e4e Signed-off-by: Jim Hahn <jrh3@att.com>
2021-02-10More sonar issues in commonJim Hahn11-68/+56
Addressed the issues: - use of eq() in verify() - remove @NamedQueries - use computeIfAbsent() Issue-ID: POLICY-2914 Change-Id: I265bc98f0f326e7b4ce86c25e68fc4859bd7fb02 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-02-08Remove javax.persistence dependencyJim Hahn3-14/+6
Running into a dependency collision between two eclipselink jars. Turns out, we don't actually need to include the javax.persistence dependency, so removed it altogether. Issue-ID: POLICY-3005 Change-Id: I5f09ddc27cdaa329b4604e6c715879d52335f870 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-01-16Add policy-clamp to policy Message constantsliamfallon1-0/+1
policy-clamp is now a valid component inthe policy framework and should be added to the message constants in policy common. Issue-ID: POLICY-2971 Change-Id: Iead3d4f854057c8e968d62928026b74c41bc1346 Signed-off-by: liamfallon <liam.fallon@est.tech>
2021-01-07Deprecate old validation annotationsJim Hahn11-710/+30
Removed @Items and @Entries validation annotations, as they are no longer needed. Issue-ID: POLICY-2648 Change-Id: I68b78738d520ad96175567572e3c2f4a845dae44 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-01-06Support annotations on parameterized typesJim Hahn13-18/+471
It appears that java.validation allows validation annotations to be used on the type parameters of Collection and Map classes. Updated the validation code to support that. Once policy-models has been updated to use this approach, the original @Items and @Entries annotations will be deprecated. Issue-ID: POLICY-2648 Change-Id: Ic953be485ebafc9869f72407518f6549585353c9 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-01-04Update junits for ValidationJim Hahn11-284/+946
The Validation code was previously refactored. Added/updated junits correspondingly. Issue-ID: POLICY-2648 Change-Id: I570c0ec692ecfcb6e69ada45f7997f6e63735ea0 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-12-18Make validators extensibleJim Hahn10-179/+996
Modified the validator to make it extensible. Also added annotations to: - cascade a validation to a sub-object - perform regex - examine items in a list - examine entries in a map Still need more junit tests. Issue-ID: POLICY-2648 Change-Id: I94f1b9e8fbf7a6b9b002d0b05cc9119bdfcf8bf2 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-12-14Convert YAML Double to Integer/LongJim Hahn3-3/+34
When a YAML number is decoded directly to type Object.class using the decode() or fromJson() methods of the StandardYamlCoder, the number is left as a Double. It should be converted to an Integer or Long, where possible. Issue-ID: POLICY-2900 Change-Id: I7707ac5c54167cbc3a4b23985c6e5fa1a507324e Signed-off-by: Jim Hahn <jrh3@att.com>
2020-12-04Fixing sonar issues in policy-commona.sreekumar13-153/+167
Change-Id: I4dce0dbdf71d01fbb59e9bf861d1af1ab49e5ae7 Issue-ID: POLICY-2914 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2020-11-30Generalize LocalDateTimeTypeAdapterJim Hahn1-4/+12
The GSON DateTime type adapter uses a hard-coded formatter. Generalized it to allow a different formatter to be provided to the constructor. Issue-ID: POLICY-2903 Change-Id: Icdd51190f465bc4c73cd593d6d1b2003165a4b60 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-11-06Fix upcoming checkstyle issuesPamela Dragosh2-9/+9
When we upgrade to oparent, these will fail as oparent upgrades to 8.37 of puppycrawl which fixes a few bugs that should have flagged these previously. Issue-ID: POLICY-2887 Change-Id: I5618ce67d84e94321f884ed6d929c05fc33a0b3d Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2020-10-29Remove server-side filtering from policy-endpointsJim Hahn5-163/+6
ONAP DMaaP Message Router no longer supports server-side filtering. Removed it from policy-endpoints. Issue-ID: POLICY-2881 Change-Id: I08157f7699608af63992dec78a61c5f9c55037b9 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-10-29Include jackson jar in policy-endpointsJim Hahn1-0/+6
Issue-ID: POLICY-2878 Change-Id: Ibfe4c220c7b15bb0b752537d080481350a1332e4 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-10-29Fix sonar security issue in CryptoUtilsJim Hahn3-9/+25
Sonar reports that CryptoUtils is using AES with CBC, which is known to be insecure. Switched to "AES/GCM/NoPadding". Note: values in any property files using encryption or the "enc:" prefix will have to be re-encrypted. Issue-ID: POLICY-2801 Change-Id: I41f00d4f3ee67a00b92135150120d1faa621655a Signed-off-by: Jim Hahn <jrh3@att.com>
2020-10-27Bump common master to 1.8.0 SNAPSHOTJim Hahn11-13/+13
Bumping minor version now that guilin branch has been created. Issue-ID: POLICY-2875 Change-Id: Id812dfd1406f8567a17ce4037eaa8cf8e7e4be26 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-09-30Fix more sonars in policy/commonJim Hahn1-33/+23
Addressed the following sonar issues: - extract common test methods Issue-ID: POLICY-2650 Change-Id: I0b27c83d7bbe3d5fe83859b189c37507aabe7489 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-09-30Skip sonar in common utils-testJim Hahn1-1/+1
sonar.tests didn't work, so just switching to sonar.skip, because utils-test is not used in production code. Issue-ID: POLICY-2650 Change-Id: I67bf9abda724944e080bbbf3a9bdc108dbd629c8 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-09-28New sonars in policy-commonJim Hahn6-1653/+3064
Addressed the following sonars: - too many assertions in a test case - use parameterized test method Disabled production sonars for util-test, as the entire module is only used for testing other modules. Issue-ID: POLICY-2650-sonar Change-Id: If49775a6c95855dcd9601ee0d833bb00741b1550 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-09-08Bump common to 1.7.2Jim Hahn11-11/+11
Issue-ID: POLICY-2789 Change-Id: Ia29c63d215facba9796a9dabdd4e9ea6792a852a Signed-off-by: Jim Hahn <jrh3@att.com>
2020-09-08Release common 1.7.17.0.0-ONAPJim Hahn1-0/+4
Issue-ID: POLICY-2789 Change-Id: Ifbbf7eadca68892254acabcecbb3710a0de41aff Signed-off-by: Jim Hahn <jrh3@att.com>
2020-08-14Adding common success/failure messages for policy componentsa.sreekumar1-0/+41
Change-Id: Ic1b0a3b467fd9e4f65b2e12d9f6ed33e38e4f44d Issue-ID: POLICY-2755 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2020-07-29Update INFO.yaml in policy-commonJim Hahn1-12/+16
Verified with Jessica W that the "type" should still be "Addition", even when updating the PTL. Updated to Mature, per TSC. Issue-ID: POLICY-2738 Change-Id: I9fd1adf4986edfe0b87b337a3e913608084da04d Signed-off-by: Jim Hahn <jrh3@att.com>
2020-07-23Add Ajith to policy-common infoJim Hahn1-17/+11
Issue-ID: POLICY-2738 Change-Id: I368308548f5f7d97db774ea27677171181d217b5 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-07-20Remove jackson from policy-commonJim Hahn9-251/+2
Issue-ID: POLICY-1528 Change-Id: Ic4b9314a770e53cefb93776bfede35591363690e Signed-off-by: Jim Hahn <jrh3@att.com>
2020-07-09Bump policy/common to 1.7.1-SNAPSHOTRam Krishna Verma11-11/+11
Issue-ID: POLICY-2695 Change-Id: I75fef54eb4bad2cb4b1430618d0ac3de4ecb9493 Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
2020-07-09Release policy/common 1.7.0Ram Krishna Verma1-0/+4
Issue-ID: POLICY-2695 Change-Id: I3605de083efbaeae276a09da409ce44c982bc173 Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
2020-07-09Refer to released parent in policy/commonRam Krishna Verma1-1/+1
Issue-ID: POLICY-2695 Change-Id: Ife7a14cbc1197dd45281f1e846a906310496bf3a Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
2020-07-02Merge "Removing hamcrest and openpojo from utils pom"Jorge Hernandez1-10/+0
2020-07-02Removing hamcrest and openpojo from utils pomRossC1-10/+0
Issue-ID: POLICY-2387 Change-Id: I43916ce97c43892fed4ed3a78f972f6b97e3237f Signed-off-by: RossC <ross.carter@est.tech>
2020-07-02Merge "Updating common dependencies"Jorge Hernandez4-6/+6
2020-07-01Updating common dependenciesRossC5-7/+6
Issue-ID: POLICY-2387 Change-Id: Ib2b14f66f6416ca3b8d6353bb6aa19fa2f41ebbb Signed-off-by: RossC <ross.carter@est.tech>