aboutsummaryrefslogtreecommitdiffstats
path: root/policy-core/src/main/java/org/onap
AgeCommit message (Collapse)AuthorFilesLines
2018-04-03Add api-resource-locks featureJim Hahn5-0/+989
Added ResourceLockFeatureAPI, to provide an interface for PolicyGuard to use to access other locking mechanisms. Move lock API to policy-core. Changed the interface and added Callback support. Added a class to invoke the API implementers. Changed to set a future instead of expecting the callback to implement the future interface. Also refactored, creating "lock" sub-package. Add junit tests. Increase junit coverage. IsLocked & isLockedBy should check all arguments. Make ImplFuture protected instead of public. Simplify locking - move callback support to an optional feature. Move Reference class to policy-utils. Return plain Future instead of LockRequestFuture. Change-Id: I65154d33833914b4332e02d1ef2512f4c5f09b16 Issue-ID: POLICY-577 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-02-20Sonar fixes to drools-pdpJim Hahn3-13/+12
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>
2018-01-31junits+utils to generate/test rules applicationsJorge Hernandez1-0/+112
1. utilities to generate rules applications and installing in local maven repository programmatically. 2. using these utilities, use policy abstractions, ie. controllers, containers, .. to junit test it. Change-Id: I13c35e631a1120fad503feef2593d32a99e3358f Issue-ID: POLICY-583 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2017-11-29Fix Sonar issues in policy-coreCharles Cole3-22/+24
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-huawei2-2/+10
Added the diamond symbol on RHS side Issue-ID: POLICY-239 Change-Id: Ie49d64124a3d314f0747f35e3627ec329338f0ff Signed-off-by: rama-huawei <rama.subba.reddy.s@huawei.com>
2017-09-21Removed useless parenthesesrama-huawei3-60/+66
Added the "@Override" annotation Issue-ID: POLICY-239 Change-Id: I9896f3130b5f8ecaa557d5386c0118e9a09008d2 Signed-off-by: rama-huawei <rama.subba.reddy.s@huawei.com>
2017-09-14Eliminate hanging when updating Drools containersRalph Straubs1-1/+10
'PolicyContainer.updateToVersion(...)' now hangs unless the Drools session threads are stopped prior to the update. This wasn't an issue in the past, and it isn't clear what causes it to happen now. It also happened in the Junit tests I am currently working on. In any case, the 'updateToVersion' method has now been changed to stop the threads prior to an update attempt, do the update, and then restart the threads. Change-Id: I577a67c6e99a68bcbe3c2f476f93c0a72b93451a Issue-ID: POLICY-234 Signed-off-by: Ralph Straubs <rs8887@att.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 Ruijing9-0/+1898
Change-Id: I8aa8e32d3ba10f7c655b50e97aaf6865514d4777 Signed-off-by: Guo Ruijing <ruijing.guo@intel.com>