aboutsummaryrefslogtreecommitdiffstats
path: root/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/http/client/internal/JerseyClient.java
AgeCommit message (Collapse)AuthorFilesLines
2023-09-21Java 17 Upgradeadheli.tavares1-14/+19
Issue-ID: POLICY-4668 Change-Id: If4e79224de61d66d7514f3abbd7b8bee1c3d5681 Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
2021-06-17Use lombok in policy-endpointsJim Hahn1-47/+2
Issue-ID: POLICY-3394 Change-Id: I8dfb0814d5cc544b2c334dc11a3e69ef407f163f Signed-off-by: Jim Hahn <jrh3@att.com>
2021-05-21Enhance toString methods in factory classesJim Hahn1-29/+2
The factory classes in policy-endpoints have toString() methods that return "[]" for their list contents. Updated the code to provide a list of the keys rather than just an empty list. Also replaced some toString() methods with lombok. Also replace StringBuilder with concatenation in some cases. Issue-ID: POLICY-3298 Change-Id: I64fca21a4b009f7e09fcc482b5d156753fb7e680 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-05-07Change java.util.regex to re2jJim Hahn1-1/+1
Sonar complains about java.util.regex. Thought I used re2j when creating all of the patterns, but apparently not. Fixed that oversight. Issue-ID: POLICY-3284 Change-Id: Idbec112ab0d4c3b477ce357f8a556d95e4dea083 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-05-06Fix sonars in policy-commonJim Hahn1-7/+9
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>
2020-07-20Remove jackson from policy-commonJim Hahn1-2/+0
Issue-ID: POLICY-1528 Change-Id: Ic4b9314a770e53cefb93776bfede35591363690e Signed-off-by: Jim Hahn <jrh3@att.com>
2020-05-27Make GSON the default serializerJim Hahn1-1/+1
The default serialization provider for HttpClient and HttpServletServer was Jackson. Modified to use GSON instead. Issue-ID: POLICY-1526 Change-Id: Ic6282d119fa63d12470903a4f1eb4da3afd6efe7 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-03-04SONAR: Resolving server hostnames should be verifiedChris Ramstad1-1/+7
Per Jorge Hernandez, we don't want to fix this as it falls under the selfSignedCert clause which is used in testing and non-production environments. Marking as //NOSONAR Issue-ID: POLICY-2389 Signed-off-by: Chris Ramstad <cramstad@ciena.com> Change-Id: Iaf47e19dc8450607b1dc3aa260370e9c0d7d491d
2020-03-02Provide access to HttpClient's WebTargetJim Hahn1-5/+11
Issue-ID: POLICY-2349 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: Iad10c3b6d77f859235c9e63f3fc0693bd9ba3c27
2020-02-08Add headers to asynchronous get in HttpClientJim Hahn1-5/+12
Issue-ID: POLICY-1625 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: I61ef2fcfde5eb361652d2d6e3f55324af7ca7b4e
2020-01-31Add async support to HttpClientJim Hahn1-1/+34
Issue-ID: POLICY-1625 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: I0123b98e89b734efd264dd62080bb23573a7a3e6
2019-11-01Add common Jersey versionliamfallon1-1/+2
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-06-26Fix some sonar issues in policy-endpointsJim Hahn1-21/+21
Refactored various classes to reduce cyclomatic complexity. Introduced some endpoint utility classes to facilitate extraction and conversion of property values, and populating of common "builder" values. Change-Id: Ie1c91cd94cb54700dc9127f72780b4d94b82ec39 Issue-ID: POLICY-1791 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-03-08Add code to allocate server portsJim Hahn1-30/+9
Added code to find available server ports. Also added a trust manager that always trusts certificates. Made trust manager private so we can allocate new ones in the future, if we decide it isn't safe to re-use the same one over and over. Modified test code to allocate a port rather than assuming 8180 was not in use. Also modified retry parameters in other tests. Added another allocPort() that takes an IP address and then modified the other two to use that so the code does not have to be duplicated, while providing more functionality. Change-Id: I08cf18d923af46b1310d8496498bb1d4a0690b6e Issue-ID: POLICY-1542 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-02-15Remove erroneous commentsJim Hahn1-4/+0
Some comments still said that including the maven artifact, jersey-media-json-jackson, could override gson behavior, but that is no longer true. The comments have been removed. Change-Id: I9b6477b76f835b96c52ccb9777b80791fc6b1d77 Issue-ID: POLICY-1428 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-02-13Add gson handler and testsJim Hahn1-0/+2
Added JacksonHandler which provides jackson behavior in gson. Also added classes to facilitate testing of gson serializations. Added compareGson(xxx, Class). Removed trailing spaces from some files. Updated license dates. Replaced incorrect constant with ${xxx} in json test file. Fixed typo in test method name. Change-Id: If05b654d76a4ffc88646f03334be82b32506f28f Issue-ID: POLICY-1428 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-01-23Add gson support to policy-endpointsJim Hahn1-6/+32
Added "provider" property to both http client and server builders. The provider defaults to jackson, to maintain backward compatibility until other policy code has been converted to gson. Removed commented item from pom. Added some comments and re-arranged a few pieces of code. Fixed a few typos and removed spacing at the end of some lines. Reordered imports. Added comments about limitations when using jersey-media-json-jackson. Address ridiculous checkstyle complaint. Support comma-separated list of serialization providers in jersey client. Disabled metainf discovery from jersey client and server so that the media-json dependencies could be re-instated in the pom. Address another ridiculous checkstyle complaint. Change-Id: Ic5a93b475d0ee9b435352b3516de6b865b00a86a Issue-ID: POLICY-1428 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-01-16Add post and delete http client methodsJorge Hernandez1-7/+25
Additional clean up for sonars have also been added for the classes that have been modified Issue-ID: POLICY-1367 Change-Id: Ie97d9057273e89850420a7c1b5b2d275709bdfd0 Signed-off-by: Jorge Hernandez <jorge.hernandez-herrero@att.com>
2018-09-21Fix policy/common checkstyle issuesPamela Dragosh1-2/+2
The root pom.xml had a syntax error in a declaration. The suppressions xml was not being found by the sub-modules. It was better to create a copy in each of the sub-modules where we will not be fixing abbreviations or the interface declarations in own java file. Added specific checkstyle files for each submodule. One interesting note for the InheritDoc tag. It seems that the mvn compile has a bug that interprets these as missing a period after the tag. Even though the parent interface has it correctly. It was easier to just remove it than duplicate. There are new JIRA's for that work to be done in Dublin. Fixed some spacing in pom's. Issue-ID: POLICY-1131 Change-Id: I5f845958ccefd50a3b7290662da43c994870f1f7 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2018-08-30Add support for http PUTmmis1-8/+15
Added support for http PUT for use by the policy forwarder in policy/distribution Issue-ID: POLICY-926 Change-Id: Ifa5c2e8be0582797936b95b772ad236f35c10f24 Signed-off-by: mmis <michael.morris@ericsson.com>
2018-08-20Use builder for http and jersey clientKrishnajinka1-23/+24
Sonar issue with more than 7 params in a method. Use builder object instead of params. Rework2 for fixing review comments. Add modifications copyright Issue-ID: POLICY-1017 Change-Id: Ib0fa692f8da770dcba06158d6e6cafbed2969c27 Signed-off-by: Krishnajinka <kris.jinka@samsung.com>
2018-08-15Fix checkstyle comments etc.Pamela Dragosh1-1/+15
Adding javadoc comments, renaming variables names, fixed whitespace and 120 length. Also some variables were made final since they were declared further from usage. Splitting out Asserts. Still remaining are the abbreviations. Issue-ID: POLICY-881 Change-Id: I31ce5a9eea02578bce023c0c607a19108bb726fa Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2018-08-13Remove simple checkstylePamela Dragosh1-1/+1
Mostly concentrated on the period at the end of summary. But I did clear a few others for longer than 120 characters and placement of methods next to each other. Possibly a few others. I did not clear everything, but will submit a few more reviews to get the others. Issue-ID: POLICY-881 Change-Id: I692a5349d686d52fee4040757cdc2ed8b5cc221b Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2018-07-25Copy policy-endpoints from drools-pdp to commonmmis1-0/+255
Issue-ID: POLICY-967 Change-Id: I374c155ee102c3e157c60d0a22d7191544abb76a Signed-off-by: mmis <michael.morris@ericsson.com>