summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
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
2019-07-30Passing the updated topic parameters to policy-endpointsa.sreekumar5-32/+127
Changes to pass the updated parameters from BusTopicParams to PolicyEndpoints. Change-Id: I49d3b9d30a2a4c6b2337d0ab76a61583eb9ef04a Issue-ID: POLICY-1744 Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
2019-07-29Add addTopic(List<TopicParams>)Jim Hahn14-45/+370
New services are typically configured using TopicParameters. These are converted into Properties before being passed to TopicEndpoint.addTopic(), which then converts them into BusTopicParams before configuring a given topic. Added TopicEndpoint.addTopic(List<TopicParams>), which makes it possible to configure the topics without going into the intermediate Properties. Furthermore, because TopicParams is a subclass of BusTopicParams, no conversion is needed for that either, so the TopicParams can be passed directly into the configuration classes. Incorporated changes from review. Change-Id: Id87e2c6812e36ae1a3ac680e6b35208667971782 Issue-ID: POLICY-1953 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-07-27Default TopicParams.isManaged to trueJim Hahn2-2/+15
Modified TopicParams to set "managed" to true by default. Change-Id: Ia21caba2b882199f1a63d40b0fed1167ccb93142 Issue-ID: POLICY-1744 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-07-25Changes to add missing topic parametersa.sreekumar7-107/+162
Changes to support parameters which would be critical to run in a secure environment. Change-Id: Ia7df174261041b35e57b9f1f2be7552e5dcd2cec Issue-ID: POLICY-1744 Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
2019-07-18Merge "Convert double to int when decoding via gson"Ram Krishna Verma6-100/+354
2019-07-17Convert double to int when decoding via gsonJim Hahn6-100/+354
Refactored MapDoubleAdapterFactory, extracting DoubleConverter to be used by code needing to convert Double to Integer/Long after being decoded by GSON. Enhanced StandardCoder to automatically use the above converter if the desired class is a generic Object. Change-Id: I1d4e83910de41ceda383f257bfea706db2b8fbbe Issue-ID: POLICY-1919 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-07-17Copy PapRestServer to policy/commonJim Hahn3-0/+369
Copied and renamed the class to RestServer. Also modified it to derive from ServiceManagerContainer. Added getName() method to HttpServletServer, which facilitated the refactoring. Renamed "controllers" to "providers". Change-Id: I905166e41063e3fe84e356fd6c4a91ca9d4cb8a6 Issue-ID: POLICY-1652 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-07-15Combine lines in IM state transition tableJim Hahn2-727/+172
Rewrote the code to generate the Integrity Monitor state transition table, eliminating duplicate lines. Output the table, before and after the change, and verified that they were identical, with one exception: there were two places where the original code had "StandbyStateException", while all of the others had "StandbyStatusException". Guessing that the original code was incorrect in these two cases, I changed the new code to always use "StandbyStatusException" instead. Change-Id: Ibe3044eb1ac398a0bc8f328f4e14305d4bdeb380 Issue-ID: POLICY-1791 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-07-11Fix checkstyle issues in common/gsonJim Hahn6-68/+107
Also deleted the checkstyle suppression file. Change-Id: I6d310af32d6d4be9633a8f88745447f40a566af7 Issue-ID: POLICY-1074 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-07-08Merge "Fix sonar issues in Integrity Monitor"Jorge Hernandez5-303/+337
2019-07-08Merge "Replace ONAP-logging getters/setters with lombok"Jim Hahn1-24/+0