summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2019-02-06Merge "Skip all fields in gson by default"Pamela Dragosh2-0/+306
2019-02-05Skip all fields in gson by defaultJim Hahn2-0/+306
Created an exclusion strategy that will prevent gson from serializing any fields within a class. The strategy must be registered to take effect. Uses lists to identify classes to be excluded when using gson with the jackson default behavior. Change-Id: I747fb1159846ad3000f69603f9b5d3f03bc8764f Issue-ID: POLICY-1428 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-01-31Fix potential race conditionKrzysztof Opasiak1-1/+1
init() is currently called outside of synhronized block. This is may lead to race condition as init() creates new bus consumer (this.consumer) which is the copied and nulled in stop() synchronized block. This may lead to race condition if: Thread #1 Thread #2 this.alive = true; this.alive = false consumerCopy = this.consumer; this.consumer = new Consumer(); // false if(consumerCopy != null) { consumerCopy.close(); } else { log.warn(); } As a result, new BusConsumers are being created but they are never close(). Issue-ID: POLICY-1387 Change-Id: I2eadb12ef1c4b07b9e47dc6ebc096acc713299a0 Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
2019-01-31Exteract common paramsKrzysztof Opasiak1-36/+21
Most of parameters used to initialize consumers are repeated in every branch. Instead of having 3 copies of the same code let's extract all common values and then add only those which are specific to given consumer type. Change-Id: I5884f6dd77a7e2f1a7f7614c909c1cad4826d4f1 Issue-ID: POLICY-1387 Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
2019-01-31Don't reinit allowSelfSignedCertsKrzysztof Opasiak1-8/+4
allowselfsignedcerts field is defined and initialized in BusTopicBase so there is need to overwrite it once agin with the same value. Change-Id: Id0a389921954606392eb2cb3c23cd0d8ee3dc4ae Issue-ID: POLICY-1387 Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
2019-01-31Remove constant from Topic interfaceKrzysztof Opasiak1-11/+7
Fix sonar issue: Move constants to a class or enum Issue-ID: POLICY-1486 Depends-On: I453a14c3dda337f2a4d08914ead32b37adc17353 Change-Id: I6baac1fe6e692074bca971f3c35bb2a29cb49205 Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
2019-01-31Use helper class to retrieve network loggerKrzysztof Opasiak4-18/+22
Instead of abusing constant from Topic interface use new dedicated helper class to retrive network logger. Issue-ID: POLICY-1486 Change-Id: Ia715aafb578aeb2842566de2623e8d22e42652fc Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
2019-01-30Add helper class to retrive network loggerKrzysztof Opasiak2-0/+91
Instead of defining static string variable inside Topic class let's create helper class for getting specific loggers. Issue-ID: POLICY-1486 Change-Id: Ic1f07466e1ab6abcc00098e617f0e82da19e852d Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
2019-01-24Merge "Add gson support to policy-endpoints"Liam Fallon17-117/+1041
2019-01-23Add gson support to policy-endpointsJim Hahn17-117/+1041
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-23Add gson to utils pomJim Hahn1-1/+5
Added gson dependency to utils pom in anticipation of future reviews. Change-Id: I1d0e4130083a73d250fe01f0e1a0154c608c6ce6 Issue-ID: POLICY-1428 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-01-16Add post and delete http client methodsJorge Hernandez6-98/+246
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>
2019-01-15Remove policy-endpoints checkstyle suppressionsJim Hahn14-1528/+1634
Split class files so each file only contains one class. Change-Id: Iaf94c4c079380dc7db3aff2affbe48f50e3cc0a2 Issue-ID: POLICY-1134 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-01-11Adding NOOP sources supportJorge Hernandez22-1129/+2010
In addition, Noop* classes have been refactored to increase code reuse and clean some checkstyle issues. Additional Junits have been added for existing functionality. Change-Id: I072f9ff2f415630ac82eca949a8360249f73da86 Issue-ID: POLICY-1397 Signed-off-by: Jorge Hernandez <jorge.hernandez-herrero@att.com>
2019-01-09Remove policy/common integrity-audit suppressionsJim Hahn9-133/+102
Changed "DbDAO" to "DbDao". Change-Id: I51a6706cceef6857404ae7c12ce43e553ea0da29 Issue-ID: POLICY-1133 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-01-08Replace expectException with AssertJJim Hahn8-83/+51
Change-Id: I73c186f181960ac7ac8cd985e55db1831963910f Issue-ID: POLICY-1392 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-12-19Add support for parameter inheritanceliamfallon2-64/+92
Common parameter support does not allow for inheritance of parameters from a super class. This change allows inheritance of public and protected members from a parameter superclass to a parameter subclass. Issue-ID: POLICY-1222 Change-Id: Ia4f452abab80953b41784c44e4202e8d5405a197 Signed-off-by: liamfallon <liam.fallon@est.tech>
2018-11-30Update eclipselink version in policy commonJim Hahn2-45/+2
Use eclipselink from policy parent. Change-Id: I472900a82a5c8b69e1a4a1efc4b3bcb86f3965a8 Issue-ID: POLICY-1359 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-11-27Remove Factory from IntegrityMonitorJim Hahn4-90/+48
Also removed unneeded method override in junit test. Change-Id: I7186e9f75443f7b8ba8376aa0e00a5cf4c573696 Issue-ID: POLICY-1287 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-11-27Merge "Fix checkstyle issue in policy common"Jorge Hernandez5-141/+137
2018-11-27Fix checkstyle issue in policy commonKrishnakumar Jinka5-141/+137
Move method into class it is being called. Fix minor checkstyle formatting in the class. The changes have side effects hence revert some changes. Modify the javadoc tags Issue-ID: POLICY-1251 Change-Id: Iecb513dafe3f60628664f3e60d6c49d3e4ce3148 Signed-off-by: kris.jinka <kris.jinka@samsung.com>
2018-11-26Rename test classes in policy/commonParshad Patel6-6/+6
Make test classes name consistence Issue-ID: POLICY-1281 Change-Id: I2d70eda0a2fe7dc60e020dd91c743c1708d1f11a Signed-off-by: Parshad Patel <pars.patel@samsung.com>
2018-11-06Update dmaap code for 1.1.9Pamela Dragosh4-12/+12
The new version has changed class names. Issue-ID: POLICY-1229 Change-Id: Id268b1a57667ffa3b5950dba7c10db2181586245 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2018-10-31Set new master version for Dublinliamfallon10-37/+26
Issue-ID: POLICY-1232 Change-Id: Icb6179ace3f320bdda3da2160afd2d058762ae5e Signed-off-by: liamfallon <liam.fallon@ericsson.com>
2018-10-30Remove openecomp repo from common pomJim Hahn1-7/+0
Change-Id: I7c654ef350fb1d83a4fd43c57b6b2fb960acf42e Issue-ID: POLICY-1231 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-10-26Detection of AAF enablement3.0.0-ONAPJorge Hernandez4-1/+35
Change-Id: I049e88bec2c83f6224ba1d1f24b93e0fb1aa807e Issue-ID: POLICY-1216 Signed-off-by: Jorge Hernandez <jorge.hernandez-herrero@att.com>
2018-10-24Fix refering to snapshot in policy/common1.3.1ramverma10-11/+11
Issue-ID: POLICY-1213 Change-Id: Id34f28a3f41687993009128940e9ddec69d5b88f Signed-off-by: ramverma <ram.krishna.verma@ericsson.com>
2018-10-05Merge "Remove constraints"1.3.0Jorge Hernandez1-2/+1
2018-10-05Remove constraintsPamela Dragosh1-2/+1
Sonar is flagging the null checks. Issue-ID: POLICY-1130 Change-Id: I4ab94b3db79d4089f20afaf3f80f3c925541084a Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2018-10-03Support Throwables in expectException()Jim Hahn2-18/+39
Also fixed some bugs in the junit tests. Renamed expectException() to assertThrows(). Added test cases. Change-Id: I13dff0007e35c2d2521a4ca40bb65e6820416ed1 Issue-ID: POLICY-1148 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-10-02Add expectException to policy-commonJim Hahn2-0/+128
Also fixed new checkstyle error. Change-Id: I2d2c2518f3f7da1a0ace8c32e10b4151d941bb6f Issue-ID: POLICY-1148 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-10-01Fix minor sonarPamela Dragosh7-173/+215
These are mainly duplicate strings. But also combined if statements and fixing some debug messages missing arguments or format specifiers. Some duplicates I left alone as it seemed unreadable to change them. Also moving variables to their correct place (before constructors). Issue-ID: POLICY-1130 Change-Id: I8018c676b22fe8fec635f129fa37921ad1004569 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2018-09-29Fix RestManager test issueJim Hahn3-2/+26
Apparently drools-pdp code depends on Dmaap topic factories throwing IllegalArgumentException instead of IllegalStateException (which is what the other topic factories throw) when an unknown topic name is requested. Therefore, the change to make them consistent has been backed out. Change-Id: Ia3d7e26a61027977eb626c9ddad6369982eae002 Issue-ID: POLICY-1148 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-09-28Add junit coverage to rest of policy-endpoint busJim Hahn33-648/+1637
Also extracted out common code from tests. Fix checkstyle issues. Be consistent in returning IllegalStateException when topic is not found by any Topic Factory. Added/updated some comments. Use better name for "validate" argument. Renamed test() to testDestroy(). Added NoopTopicPropertyBuilder. Renamed BusTopicTestBase to TopicTestBase. Change-Id: Id4c7ab9f2b5572dc5195b0da116e285c5e9b6f06 Issue-ID: POLICY-1148 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-09-28Merge "Add coverage for policy-endpoints bus"Jorge Hernandez9-11/+1280
2018-09-27Add coverage for policy-endpoints busJim Hahn9-11/+1280
Added license. Fix checkstyle warnings. Change-Id: I2279b8b80b3dc175583353ced3d71c3a5cc4f975 Issue-ID: POLICY-1148 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-09-27Merge "Added more coverage to policy-endpoints internal"Pamela Dragosh6-0/+873
2018-09-27Added more coverage to policy-endpoints internalJim Hahn6-0/+873
Fixed checkstyle error. Change-Id: Ie6a85633bab098a30ccb2c1c309e1640aa1c8131 Issue-ID: POLICY-1148 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-09-27Merge "Use powermock version from parent pom"Pamela Dragosh5-37/+1
2018-09-26Add junit coverage to policy-commonJim Hahn10-9/+1170
Added coverage tests for policy-endpoints. Fixed new checkstyle warnings. Use powermock version from parent pom. Replaced literals with constants in new tests. Moved test superclass higher up the class hierarchy so it can be re-used. Removed powermock version. Change-Id: I7d3d45132cd0973f4d02d3af320a1d53a1234e4d Issue-ID: POLICY-1148 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-09-26Use powermock version from parent pomJim Hahn5-37/+1
Change-Id: I84fd562e7050508a75b4192ba162a09acd938986 Issue-ID: POLICY-1148 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-09-21Fix policy/common checkstyle issuesPamela Dragosh28-334/+446
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-09-21new sonar issues in policy/commonJim Hahn2-29/+56
Only throw one type of exception in Serializer. Try to increase test coverage in Serializer. Change-Id: I170de0ab727041aa42731c08d6cc454731d29a20 Issue-ID: POLICY-1130 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-09-19tweaks from testing in auth classesJorge Hernandez3-4/+3
Change-Id: Idb1346ca645ffcc55808e25c8957e01d27a48a75 Signed-off-by: Jorge Hernandez <jh1730@att.com> Issue-ID: POLICY-1043
2018-09-19error getting aaf configuration flagJorge Hernandez2-2/+2
Change-Id: I98c3a3f4abef0f46a4cccf8e79ed58f65f328b2c Signed-off-by: Jorge Hernandez <jh1730@att.com> Issue-ID: POLICY-1043 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2018-09-19Merge "Fixes for oparent upgrade"Jorge Hernandez2-5/+5
2018-09-18Fixes for oparent upgradePamela Dragosh2-5/+5
Small code fix to support jetty upgrade within oparent 1.2.1 from 9.3.* to 9.4.* Issue-ID: POLICY-1126 Change-Id: Id2df5579d05acc738d5edfd055f42628b545dd5a Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2018-09-18Add comments and removed redundant code in FiltersJorge Hernandez2-9/+14
Change-Id: I57db9a90550e89ccf23f23de608eedb5d0b7f4ff Signed-off-by: Jorge Hernandez <jh1730@att.com> Issue-ID: POLICY-1043 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2018-09-18Support for Authorization Generic FiltersJorge Hernandez8-1/+283
These will aid applications using there own authorization system at their desired granularity. Change-Id: Iba7fca8742127bcec177b93452f111d28c7f8ec7 Signed-off-by: Jorge Hernandez <jh1730@att.com> Issue-ID: POLICY-1043
2018-09-18Remove override of parent aaf versionPamela Dragosh1-1/+0
Policy/parent now declare the aaf dependency. This change will use that change. Issue-ID: POLICY-1119 Change-Id: I41d4b6406c76c6f016eeae4871b66acfcba7329e Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>