aboutsummaryrefslogtreecommitdiffstats
path: root/policy-management/src/main/java/org/onap/policy/drools/controller/IndexedDroolsControllerFactory.java
AgeCommit message (Collapse)AuthorFilesLines
2024-04-10Dependency management updateadheli.tavares1-7/+1
- including dependencies to pom.xml files only where they are used, avoiding extra dependencies being added in all packages. Issue-ID: POLICY-4945 Change-Id: I376ea0763190d55f254dc8f88b6fa5b89354e8b9 Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
2024-02-09Removing deprecated DMAAP libraryadheli.tavares1-7/+6
Issue-ID: POLICY-4402 Change-Id: I4ce5b303cb3a775010683d3c7102b0bd065280ea Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
2023-12-14Add kafka support on drools-pdprameshiyer271-0/+6
Issue-ID: POLICY-4201 Signed-off-by: zrrmmua <ramesh.murugan.iyer@est.tech> Change-Id: I7f9ebec13cc41c214a400087f99e62bbc895abdd
2023-10-04Remove AAF from drools-pdpadheli.tavares1-5/+1
Issue-ID: POLICY-4592 Change-Id: Ibe7fb63017f862bdab4a80444a00324040b1ab87 Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
2021-06-15filter logging input data per sonar security issuejhh1-11/+6
Issue-ID: POLICY-3289 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: Iad22a581a6bd98e7e210162d30ec7741972669d2
2021-06-14Use re2j pattern for sonar vulnerabilitiesjhh1-10/+6
Issue-ID: POLICY-3289 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: Id6d58b5c8ac5f7715286f21274ccf5eea9155fd2
2020-08-31Fix more sonars in drools-pdpJim Hahn1-20/+27
Fixed more sonars in drools-pdp: - remove commented code - don't throw generic Exception - unused field (made it protected instead of private) - log conditionally - cognitive complexity - too many break/continue - return empty list instead of null - Random() is not secure Fixed more eclipse warnings: - parameterize generic types Issue-ID: POLICY-2616-sonars3 Change-Id: Ia5ad769b2ea763568cfae3d81807926d89153b09 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-07-21Support multiple Policy/Controller types using 'controller.type' propertyStraubs, Ralph (rs8887)1-6/+45
It provides a feature base to allow for custom Policy and Drools Controllers. Issue-ID: POLICY-2415 Change-Id: Ibe3f11e3ecd925537ffd03d2420bb3b8214029c9 Signed-off-by: Straubs, Ralph (rs8887) <rs8887@att.com> Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2020-04-07Address sonar issues in policy-managementJim Hahn1-2/+2
Addressed the following sonar issues: - modified code to specify the correct class name in the getLogger() call - use equals() instead of "==" for string comparison - remove deprecated code - use ',' instead of "," in indexOf - remove code that is commented out; typically bogus, so the comment was adjusted to satisfy sonar - missing assert in junits - use "{}" instead of concatenation when using logger - either log or rethrow - put arguments for assertEquals() in the correct order - remove "return" statements from the end of void methods - don't always return the same value; just disabled sonar as refactoring would have obfuscated the code - cognitive complexity; used eclipse auto-refactoring to extract out chunks of code into separate methods - don't pass array of classes to class.getDeclaredMethod(); use ellided arguments instead - fix argument count in logger calls - remove unnecessary casts - don't use "volatile" - make methods "synchronized" to match parent class definitions Issue-ID: POLICY-2305 Change-Id: Ie96418f696da4ae6c2ca8d4a914371469e695419 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-02-26Undeploy support for native rules PDP-D policies.jhh1-1/+0
Issue-ID: POLICY-2388 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: Iaaf5e13a5db286928952bcb3e4cc0f526b0b133c
2019-08-15Fix more sonar issues in drools-pdpJim Hahn1-57/+70
Addressed issues of cyclomatic complexity and deep nesting by refactoring code into separate methods. In some cases, had to refactor the code into nested classes to avoid passing too many parameters to the newly extracted methods. Addressed issue "too many conditionals" by breaking conditionals apart. Addressed issue "Remove usage of generic wildcard type" by eliminating "? extends" from return values. Addressed issue "Remove this use of 'Thread.sleep()'" in junit tests by introducing latches or using Awaitility. Note: this won't build until ApiUtils has been merged. Change-Id: I0d5596b4cb918a36bc22f426f426bd238195b458 Issue-ID: POLICY-1968 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-08-13Fix sonar issues in drools-pdpJim Hahn1-7/+7
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-11Fix checkstyle issues in policy-managementJim Hahn1-0/+359
Also deleted the checkstyle suppression file. Moved classes into their own source files per checkstyle. Change-Id: I586223aac0e5b7623cfd7b0acfceca4742ecc013 Issue-ID: POLICY-1908-mgmt-style Signed-off-by: Jim Hahn <jrh3@att.com>