summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2020-01-14Sonar cleanup overrides and fixesPamela Dragosh9-34/+40
Removal of UTF-8 because its already set capabilities doesn't generate any code, no need to include override false positives for passwords etc. override for logging and exception throw that we want add synchronized to overrides that are synchronized ignore checking of some conditions adding synchronized to match set* methods Issue-ID: POLICY-2321 Change-Id: I26d9ca22a0cdd67fdaae9c44b718b8dc103f190e Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2020-01-14Merge "Changed Matchers to ArgumentMatchers"Pamela Dragosh11-26/+26
2020-01-13Add method to return resource directory contentsliamfallon2-10/+144
In order to avoid hard coding the policy types and policies that are in the example directories into unit test cases, and in order to automatically pick up added and removed policy types and policies, it would be good to read the contents of resource directories at run time in unit tests. This change brings in that functionality into ResourceUtils. Issue-ID: POLICY-2315 Change-Id: I601718828aad0f065dbbaa1f5af8d0a0f133f44d Signed-off-by: liamfallon <liam.fallon@est.tech>
2020-01-13Changed Matchers to ArgumentMatchersJim Hahn11-26/+26
Issue-ID: POLICY-1406 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: I6d85bb10c15f9d82fa55d9328d18640098050dd9
2020-01-13Merge "Update sonar configuration"Ram Krishna Verma1-75/+1
2020-01-13Merge "Address items deprecated by move to java 11"Ram Krishna Verma5-32/+55
2020-01-10Fix mockito import in commonJim Hahn2-6/+11
ONAP-Logging was failing when using powermock-mockito2. This change also requires a property (version.javax.bind) to be added to the parent/integration pom. Issue-ID: POLICY-1406 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: If8813edaf86d84cff72c0e476ebf2a36bf5dcf18
2020-01-10Update sonar configurationPamela Dragosh1-75/+1
Sonarcloud upgrade resulted in new configuration property Removed deprecated properties No need for plugin configuration override of oparent Issue-ID: POLICY-2321 Change-Id: Ia294575d2ea0a589eab6797b48b8c1924f9f1b36 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2020-01-10Address items deprecated by move to java 11Jim Hahn5-32/+55
Addressed the following deprecated items: - "new Integer(xxx)" - Observable/Observer - Mockito.anyObject() Added assertion to a junit test to address a sonar issue. Did not address deprecated Nashorn javascript interpreter; that will be done in a separate review. Updated licenses. Issue-ID: POLICY-1406 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: I81fd158f831e01d5410d79898ced658285787d47
2020-01-09policy/common jdk11 upgradesHOCKLA7-17/+23
Issue-ID: POLICY-1583 Change-Id: I6bcd320a6cdedd84dad9b54fdb4fec0cb8443b44 Signed-off-by: HOCKLA <ah999m@att.com>
2019-12-16Update policy common for checkstyle 8liamfallon1-1/+0
Minor changes to clear down checkstyle warnings in policy common. Issue-ID: POLICY-206 Change-Id: Ifa6753bafdc4b2a9ee0725c4f3751c6eac03e096 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-12-16Added JDK 11 upgrades and point to parent java 11 branchHOCKLA9-97/+94
Issue-ID: POLICY-1583 Change-Id: Ic46ffcb6eb5b0d18f9cb0a6a2ec46374e523f54a Signed-off-by: HOCKLA <ah999m@att.com>
2019-12-06Merge "Minor changes for new Eclipse checkstyle checks"Pamela Dragosh14-596/+960
2019-12-06Bumped policy/common patch version to 1.6.2-SNAPSHOTHOCKLA11-11/+11
Issue-ID: POLICY-1583 Change-Id: I4a1c5848f158d10b4b6f21f048f92d69ccc90a83 Signed-off-by: HOCKLA <ah999m@att.com>
2019-12-06Release 1.6.1 policy/commonHOCKLA1-0/+4
This is a re-release, previous release wasn't pointing to an already installed release Issue-ID: POLICY-1583 Change-Id: I613dd5a78b439b60455be58b476204e422ebbf02 Signed-off-by: HOCKLA <ah999m@att.com>
2019-12-06Point to 3.1.0 policy/parent to prep for re-releaseHOCKLA1-1/+1
Issue-ID: POLICY-1583 Change-Id: I1c65a4478d1121b863d29388bd3a7047d92ff5ea Signed-off-by: HOCKLA <ah999m@att.com>
2019-12-06Minor changes for new Eclipse checkstyle checksliamfallon14-596/+960
The laest Eclipse checkstyle version 8.26.0 does more thorough checking and identified a number of small issues in the apex-pdp codebase. This review fixes those issues. logging pattern in logback.xml files amended to be less than 120 characters. Test case added for checking parameter is valid. Issue-ID: POLICY-2204 Change-Id: Id7293e44b56c225afc6290e1c599603e9ebedb19 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-12-05Changed project version to 1.6.1-SNAPSHOT to isolate for java 11 upgradesHOCKLA11-12/+12
Issue-ID: POLICY-1583 Change-Id: I805ebed75e7e0cb5109946328958341018421aad Signed-off-by: HOCKLA <ah999m@att.com>
2019-12-04Added a yaml file to release 1.6.0 policy/commonHOCKLA2-1/+5
Issue-ID: POLICY-1583 Change-Id: I20b608a6674a4496e5aa20fa3c26da2a275a289d Signed-off-by: HOCKLA <ah999m@att.com>
2019-11-04Make jersey-hk2 dependency non-testliamfallon1-2/+0
THis change will amke this dependency available to all components when using policy-endopints. Issue-ID: POLICY-2209 Change-Id: Ie3c6ca9d21327bdc54b5f14d64c41eed329941ad Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-11-01Add common Jersey versionliamfallon6-31/+28
Add a common version of Jersey for all Policy Framework components. Issue-ID: POLICY-2209 Change-Id: I8554a97e9f13887418118966bfe1043b65d9a179 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-10-29Fix new sonar issues in commonJim Hahn2-5/+5
Issue-ID: POLICY-2204 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: If0a11913f614e038ecd3e8c3f0b56d3ac78b03ec Signed-off-by: Jim Hahn <jrh3@att.com>
2019-10-29Merge "Cleanup eclipse warnings in common"Jorge Hernandez2-5/+1
2019-10-29Cleanup eclipse warnings in commonJim Hahn2-5/+1
Issue-ID: POLICY-2204 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: If55ea1a804997ab751f15813e6b643572d4f189f
2019-10-29Disable HTML escaping in gson codersJim Hahn3-6/+7
Issue-ID: POLICY-1869 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: Ic757d3a8e7e0e3537ecba979a919b9ea3c1aa797 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-10-24Integrate CryptoUtils into ONAP commonChou, Joseph (jc2555)2-0/+244
Update junit to add test cases Change-Id: If3236853138a05faac5f51a859b935265c14f0d6 Issue-ID: POLICY-1945 Signed-off-by: Chou, Joseph (jc2555) <jc2555@att.com>
2019-10-21Add CryptoCoder interfacejhh3-9/+45
This is to allow multiple supporting implementations. Issue-ID: POLICY-1945 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I42491e5671f561fe320f034bf8ffe03848dff43f Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2019-10-16Removed unthrown checked exceptions from CryptoUtils.jhh1-10/+3
additional minor javadoc clean up Issue-ID: POLICY-1945 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I23927b8c4dd63ed658e8062c87b4884ea1d31825
2019-09-16Eliminate constructors with side-effectsJim Hahn7-23/+41
Several of the Gson and Jackson handlers take a GsonBuilder, which they then configure with additional adapters prior to create a Gson object that they subsequently use. The code has been modified so that the constructors no longer take a GsonBuilder, thus eliminating the side-effects that they had on the builders. Instead, a configBuilder() method has been added to the handler classes that makes it clear tht they modify the GsonBuilder. This also has the advantage that classes that want a Gson object configured per a given handler need only call that handler's configBuilder() method; previously, they had to constructor the handler and then retrieve its gson object. Also updated a few tests to specify the HTTP "Accept" header to ensure that return results are in yaml format. Change-Id: I2ef98198041ff9f73913d01ee6ee14ecf20ba617 Issue-ID: POLICY-2081 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-09-13Extract YamlJsonTranslator from StandardYamlCoderJim Hahn17-334/+816
Refactored StandardYamlCoder, extracting a new class, YamlJsonTranslator, from it. This facilitates performing yaml translation when not using a standard "gson" coder. Added YamlJacksonHandler which supports YAML translation layered on top of a JacksonHandler instead of a GsonMessageBodyHandler. Also added junit tests to complete coverage of StandardCoder. Also added public APPLICATION_YAML to YamlMessageBodyHandler. Change-Id: Ia470fa194661fbf1aebeaf0f18b57f2a984cb64b Issue-ID: POLICY-2081 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-09-13Merge "Changes to accomodate to version of jetty"Jorge Hernandez1-6/+7
2019-09-13Merge "Remove YamlException class"Jim Hahn2-124/+0
2019-09-13Changes to accomodate to version of jettyJim Hahn1-6/+7
With a newer version of jetty being used, a couple of methods have been deprecated. Modified the code to use the facilities appropriate to the new jetty version. Change-Id: Idcaef11836841480c24b1721c06ed642d3d4394a Issue-ID: POLICY-2100 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-09-12Report bad-request for invalid YAMLJim Hahn8-61/+232
Added classes and modified code to report bad-request when a servlet attempts to read invalid YAML. Change-Id: Iacddee92a448fb69d5c778a3c3f3f2b5528983f7 Issue-ID: POLICY-2085 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-09-12Remove YamlException classJim Hahn2-124/+0
After the implementation was finalized, it turned out that YamlException was no longer needed, so it has been deleted. Change-Id: Ie895fc096787f05eff36a6127b08247a7664ff8d Issue-ID: POLICY-2065 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-09-11Create StandardYamlCoderJim Hahn14-20/+1107
Created StandardYamlCoder which is like a StandardCoder, except that the original converts to/from JSON, while the new class converts to/from YAML. Also added YamlMessageBodyHandler and incorporated it into the http server so that it supports a media type of */yaml. Change-Id: Ibd83a9f6d355a330f63e435f2bb41affcf1947c2 Issue-ID: POLICY-2065 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-09-10Update default branch in common for masterJim Hahn1-0/+1
Change-Id: I7ddce7f583575adc11db4f9cc102d474a827d488 Issue-ID: POLICY-2045 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-09-06Bump version in policy/common masterJim Hahn11-12/+12
Change-Id: If86cac60ee143b1d8ae92fd3893ea33a0d3e1b81 Issue-ID: POLICY-2045 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-09-05Upgrade to released parent 3.0.1Pamela Dragosh1-1/+1
Released Issue-ID: POLICY-2045 Change-Id: I82bf30780064ddaf26fdc6ed96a78653b1af1797 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2019-08-27Remove AlertSeverity from logback in policy/commonJim Hahn4-140/+140
Replaced AlertSeverity with severity in logback xml files, because the MDC only has severity. Change-Id: I118b195b65555c915c723faf117c4f4854e990f3 Issue-ID: POLICY-1989 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-08-23Rest servers should return 400 for bad syntax JSONJim Hahn4-2/+207
Modified common RestServer to inject an exception handler into the list of providers so that it returns 400 instead of 500 for JSON parsing errors. Change-Id: I7c77625e3531e26413d72cc386296a709946cda2 Issue-ID: POLICY-1725 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-08-21Enhance TestTimeMultiJim Hahn19-185/+2405
Enhance TestTimeMulti to support execution of tasks, whether submitted via Timers or via Executors. Change-Id: Ib5f216730b3b69028e9581052645370b827cd446 Issue-ID: POLICY-1968 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-08-14Add ApiUtils to facilitate looping over featuresJim Hahn4-24/+155
A number of places in the code (common & drools-pdp) loop over features, giving each provider a chance to act on something. Created a common method in a new ApiUtils class to faciliate it. Renamed to FeatureApiUtils per review comment. Change-Id: I0c2cf0f33854cb5b6921b394f64de498a6234909 Issue-ID: POLICY-1968 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-08-08Review maven dependency for snakeyamlBruno Sakoto2-2/+1
Remove explicit version for snakeyaml maven dependency and inherit it from integration parent artifact. Upgrade snakeyaml to latest 1.24 version. Issue-ID: POLICY-1603 Signed-off-by: Bruno Sakoto <bruno.sakoto@bell.ca> Change-Id: Id44753332f39409205d2a64f6bc5563a5869bf91
2019-08-02Bump version in policy/commonJim Hahn11-11/+11
Change-Id: I7efbdf7c36907eb10ae5ce4c9d7d4988d7e2d68a Issue-ID: POLICY-1965 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-08-01Merge "Change to fix issues in overridden validations of ParameterGroups"1.5.1Ram Krishna Verma1-1/+6
2019-07-31Remove ParameterUtilsJim Hahn4-243/+3
Removed ParameterUtils. Also made RestServer.getServerProperties() protected so it can be overridden. Also fixed issue in TopicParameterGroupTest to prevent it from validating static fields. Change-Id: Icb4580f5802b9edca489a38896d61ad24aece449 Issue-ID: POLICY-1953 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-07-31Change to fix issues in overridden validations of ParameterGroupsa.sreekumar1-1/+6
Currently, for validation of nested ParameterGroup classes, a new GroupValidationResult is directly created instead of calling the validate method of nested classes. Thus any overridden validate methods won't work. This is fixed. Change-Id: I8ee9265b295cb68d67926128b5b68c217f341034 Issue-ID: POLICY-1744 Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
2019-07-30Fix managed noop topic sourceJim Hahn4-15/+24
NOOP topic sources configured via TopicParameterGroup are left unmanaged. Removed a new override method, as it did not pass the "managed" flag down, while the method that already existed in the superclass already works correctly. Also restored "null" lists to TopicParameterGroup so-as not to break the behavior of its validate() method. Change-Id: Id392a3263c3bd1c8f278461715b441719817c47c Issue-ID: POLICY-1953 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-07-30Merge "Passing the updated topic parameters to policy-endpoints"Jorge Hernandez5-32/+127