aboutsummaryrefslogtreecommitdiffstats
path: root/policy-core/src/main/java/org/onap/policy/drools/core/PolicySession.java
AgeCommit message (Collapse)AuthorFilesLines
2024-04-24Fix topic configurations.adheli.tavares1-1/+1
- adjust kafka configurations - remove UEB references Issue-ID: POLICY-4955 Change-Id: Ie3ff62a0ba5531ae4c0d123f214a50bb7f721807 Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
2024-02-09Removing deprecated DMAAP libraryadheli.tavares1-6/+5
Issue-ID: POLICY-4402 Change-Id: I4ce5b303cb3a775010683d3c7102b0bd065280ea Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
2021-08-05Use lombok in drools-pdp #2Jim Hahn1-33/+9
Updated feature-session-persistence thru drools-domains. Issue-ID: POLICY-3397 Change-Id: I0b1c6da8b2301c00dd792675e8cf1f49888edb9f Signed-off-by: Jim Hahn <jrh3@att.com>
2021-05-10interrupted exception and var usage sonarsjhh1-4/+5
Issue-ID: POLICY-3230 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I50a4ee81f0a1c97df25732a4e4507e8b7f8c8e4d
2020-08-25Address more sonars in drools-pdpJim Hahn1-0/+12
Addressed the following sonars: - either log or rethrow - call "remove()" for thread-local-storage - use assertEquals - only one method call in exception test - swap arguments in assertEquals - add assertion to assertThatThrownBy() - explain @Ignore Also addressed eclipse warnings: - unused fields and methods Issue-ID: POLICY-2616 Change-Id: I6590c0d2b103885bc933014d48bf5fd92401cd80 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-06-19Address checkstyle version issues in drools-pdpJim Hahn1-1/+0
Also added serializationId to several classes to address eclipse warnings. Issue-ID: POLICY-2188 Change-Id: I3df5e8abaad8da9261c0d5cd19a93ed68dceb870 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-04-06Address sonar issues in drools-pdpJim Hahn1-4/+3
Addressed the following sonar issues: - add "final" to public static fields - commented code; some were bogus - just updated the comments so sonar is happy - use "{}" instead of string concatenation - junit should assert something - when using logger, invoke compute-intensive tasks conditionally - use superclass name instead of subclass name to access static fields - don't always return the same value - remove "transient" from fields of classes that aren't Serializable - don't nest try/catch blocks - use appropriate class name in Logger.getLogger() - use Predicate<T> instead of Function<T,Boolean> - remove unused parameters from private methods - either log or throw - remove duplicate methods - use remove() TLS instead of set(null) - null check is implicit in instanceof check - do something with return value - don't use volatile - don't return "null" list; used Optional instead - add no-arg constructor to non-Serializable superclass - add callSuper=true for EqualsAndHashCode - don't declare "throws XXX" where XXX is a subclass of RuntimeException - remove serialVersionUID field if the class isn't Serializable Also addressed some eclipse warnings: - unused fields - suppress generic typic cast warnings Issue-ID: POLICY-2305 Change-Id: I906d5bf71c1f86531423e23b3667a585cdba45e1 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-11-08Miscellaneous code clean upjhh1-3/+3
Issue-ID: POLICY-2203 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I5731d4636bd2aaecbc486406298bcba1b19e8f4d Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2019-10-15Add 'PolicySession.insertDrools' methodStraubs, Ralph (rs8887)1-0/+23
This change includes feature hooks, so a "smart insert" could forward the object to a remote host, and do the insert there. The methods 'insert' and 'insertAll' in 'PolicyContainer' now make use of this smart insert. Change-Id: I69f0e874b6fda09d1f457e4353e4b30d63696210 Issue-ID: POLICY-2160 Signed-off-by: Straubs, Ralph (rs8887) <rs8887@att.com>
2019-08-13Fix sonar issues in drools-pdpJim Hahn1-1/+1
Address sonar issue, "Move constants to a class or enum", by moving them from interfaces to classes: ActiveStandbyFeatureApi StateManagementFeatureApi PolicyResourceLockFeatureApi PolicySessionFeatureApi DroolsController DroolsControllerFeatureApi PolicyControllerFeatureApi PolicyEngineFeatureApi HealthCheck SystemPersistence EventProtocolCoder PolicyController PolicyEngine TestTransaction MdcTransaction Address sonar issue, "Move constants to a class or enum", by change the interface to a class: DroolsProperties Address sonar issue, "Override the "equals" method in this class", by adding equals & hashCode to: DroolsPdpEntity DroolsPdpImpl Use lombok for a number of getters & setters. Address sonar issue, "Define a constant instead of duplicating this literal" in: DroolsPdpsElectionHandler JpaDroolsPdpsConnector MavenDroolsController GenericEventProtocolCoder GsonProtocolCoderToolset RestManager Address sonar issue, "Remove the parentheses around the parameter" in: MavenDroolsController Address sonar issue, "Replace this lambda with a method reference" in: LifecycleFsm Address sonar issue, "Move this constructor to comply with Java Code Conventions" in: LifecycleStateRunning Address sonar issue, "Replace this 'switch' statement by 'if' statements to increase readability", as specified in: PolicyEngineManager Address sonar issue, "Rename field to prevent any misunderstanding/clash with field" in: MdcTransactionImpl Address sonar issue, "Either log or rethrow this exception", in: RestManager Address sonar issue, "Rename this constant name to" uppercase, by replacing enums with static lists in: RestManager Addressed review comments: Fixed license dates. Renamed getSiteName/setSiteName methods to getSite/setSite in the interface to match the field names in the implementation classes. Renamed *Instance classes to *Constants. Next round of review comments. Change-Id: I1c26af9f194833dd773f2b25dc5f60cde163201c Issue-ID: POLICY-1968 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-07-16Fix checkstyle issues in policy-coreJim Hahn1-3/+3
Also deleted the checkstyle suppression file. Change-Id: I93e9f9154b614b56f7826ec978e1a99bd9369348 Issue-ID: POLICY-1907 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-10-05Add coverage to policy-coreJim Hahn1-69/+27
Added easy junit test coverage cases. Fixed sonar issue: removed sleep from DroolsContainerTest. Fixed sonar bug in ClassExtractors. Change-Id: I942badf17c42346c1735bc3951450fc31c02a769 Issue-ID: POLICY-1148 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-10-01Set drools-pdp checkstyle configPamela Dragosh1-26/+26
Fixed last remaining checkstyle issues along with setting the pom.xml to the correct path setting. Fixed forbidden summary fragments, not allowed to prepend summary with "This method returns" Issue-ID: POLICY-1153 Change-Id: I267842080494132a7b5507731e14f027a3f6fe44 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2018-09-10Fix checkstyle policy-corePamela Dragosh1-22/+32
Working on the policy-core submodule in drools pdp. Issue-ID: POLICY-882 Change-Id: I58d418110fe0fda90f97117ef17edfc13d648ccc Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2018-08-20Fix sonar issues in drools-pdpKrishnajinka1-527/+466
Fix sonar issues about nested control loops in drools-pdp. Rework1 build failed due to incorrect condition. fixing it Fix checkstyle. Add modified copyright notice Issue-ID: POLICY-1017 Change-Id: I21a4ad9399b1d234b8d5416ab0d595302a441f10 Signed-off-by: Krishnajinka <kris.jinka@samsung.com>
2018-02-20Sonar fixes to drools-pdpJim Hahn1-5/+5
Fixed most of the instances of the following sonar issues: Moved array designator Used diamond operator Changed System.out/err to use a logger Changed several Thread.sleep() in test code to a single sleep() Useless assignments Replaced comparison with "" to string.isEmpty() Merged if's Replaced ArrayList with List in method returns Reordered type modifiers Reordered constructor methods Defined constants for literals, or replaced them with method calls Removed "throws Xxx" for subclasses of RuntimeException Combined identical "catch" blocks Re-interrupted the current thread after catching an InterruptedException Removed tests against the literal "false" Fix indentation of new makeTopicOperError() method. Fix exception variable name in new methods, logNoUebEncoder() and logNoDmaapEncoder(). Change-Id: Iddae5210553662f733b67333b372dec8c3fe2c94 Issue-ID: POLICY-336 Signed-off-by: Jim Hahn <jrh3@att.com>
2017-11-29Fix Sonar issues in policy-coreCharles Cole1-3/+3
Fixed the Sonar issues in policy-core that required minimal refactoring of the code. Issue-ID: POLICY-461 Change-Id: I3d0f7c4411855b2c75d5ae6968665753b50bde75 Signed-off-by: Charles Cole <cc847m@att.com>
2017-09-21Removed useless parenthesesrama-huawei1-12/+12
Added the "@Override" annotation Issue-ID: POLICY-239 Change-Id: I9896f3130b5f8ecaa557d5386c0118e9a09008d2 Signed-off-by: rama-huawei <rama.subba.reddy.s@huawei.com>
2017-08-16Fix "critical" Sonar issueRalph Straubs1-1/+1
Change-Id: I46e59d9a017722370cff4112250bcdfa0f0d0b23 Issue-ID: POLICY-160 Signed-off-by: Ralph Straubs <rs8887@att.com>
2017-07-28[POLICY-72] replace openecomp for drools-pdpGuo Ruijing1-0/+576
Change-Id: I8aa8e32d3ba10f7c655b50e97aaf6865514d4777 Signed-off-by: Guo Ruijing <ruijing.guo@intel.com>