aboutsummaryrefslogtreecommitdiffstats
path: root/controlloop/templates/archetype-cl-casablanca
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2019-01-14 14:30:46 -0500
committerJim Hahn <jrh3@att.com>2019-01-14 15:12:11 -0500
commit12fab6215a7a92b4959330ef179d38454dbb6225 (patch)
treec4edaa8ecdf3cfc59e15b20b739a481ed67f9ccd /controlloop/templates/archetype-cl-casablanca
parentdd691f02e2caa6028a868915b016a71bf6c1c876 (diff)
Remove guard checkstyle suppressions
Renamed a number of fields and methods, in the Guard classes, to conform to camel-case format. Also updated some toString() methods to return "xxxId=" instead of "xxxID=", if the corresponding field names were also xxxId. Updated license data in one changed file. Change-Id: Idac58f8744b5523d6daed7f369026495dd357bf8 Issue-ID: POLICY-1140 Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'controlloop/templates/archetype-cl-casablanca')
-rw-r--r--controlloop/templates/archetype-cl-casablanca/src/main/resources/archetype-resources/src/main/resources/__closedLoopControlName__.drl62
1 files changed, 31 insertions, 31 deletions
diff --git a/controlloop/templates/archetype-cl-casablanca/src/main/resources/archetype-resources/src/main/resources/__closedLoopControlName__.drl b/controlloop/templates/archetype-cl-casablanca/src/main/resources/archetype-resources/src/main/resources/__closedLoopControlName__.drl
index 92fa87559..b0262f989 100644
--- a/controlloop/templates/archetype-cl-casablanca/src/main/resources/archetype-resources/src/main/resources/__closedLoopControlName__.drl
+++ b/controlloop/templates/archetype-cl-casablanca/src/main/resources/archetype-resources/src/main/resources/__closedLoopControlName__.drl
@@ -81,7 +81,7 @@ import org.onap.policy.drools.system.PolicyEngine;
*/
declare ControlLoopTimer
closedLoopControlName : String
- requestID : String
+ requestId : String
delay : String
expired : boolean
//timerType is the type of timer: either "ClosedLoop" or "Operation"
@@ -134,7 +134,7 @@ rule "EVENT"
VirtualControlLoopNotification notification = new VirtualControlLoopNotification($event);
notification.setNotification(ControlLoopNotificationType.REJECTED);
notification.setFrom("policy");
- notification.setMessage("Missing requestID");
+ notification.setMessage("Missing requestId");
notification.setPolicyName($params.getPolicyName() + "." + drools.getRule().getName());
notification.setPolicyScope($params.getPolicyScope());
notification.setPolicyVersion($params.getPolicyVersion());
@@ -182,7 +182,7 @@ rule "EVENT"
ControlLoopTimer clTimer = new ControlLoopTimer();
clTimer.setTimerType("ClosedLoop");
clTimer.setClosedLoopControlName($event.getClosedLoopControlName());
- clTimer.setRequestID($event.getRequestId().toString());
+ clTimer.setRequestId($event.getRequestId().toString());
clTimer.setDelay(manager.getControlLoopTimeout(1500) + "s");
//
// Insert it
@@ -202,7 +202,7 @@ rule "EVENT"
//
// Now that the manager is inserted into Drools working memory, we'll wait for
// another rule to fire in order to continue processing. This way we can also
- // then screen for additional ONSET and ABATED events for this RequestID.
+ // then screen for additional ONSET and ABATED events for this RequestId.
//
}
} catch (Exception e) {
@@ -238,7 +238,7 @@ rule "EVENT.MANAGER"
$manager : ControlLoopEventManager( closedLoopControlName == $event.getClosedLoopControlName(),
requestId == $event.getRequestId() )
$clTimer : ControlLoopTimer( closedLoopControlName == $event.getClosedLoopControlName(),
- requestID == $event.getRequestId().toString(), timerType == "ClosedLoop", !expired )
+ requestId == $event.getRequestId().toString(), timerType == "ClosedLoop", !expired )
then
Logger logger = LoggerFactory.getLogger(drools.getRule().getPackage());
@@ -331,7 +331,7 @@ rule "EVENT.MANAGER"
// don't retract manager, etc. - a clean-up rule will do that
//
- // TODO - what if we get subsequent Events for this RequestID?
+ // TODO - what if we get subsequent Events for this RequestId?
// By default, it will all start over again. May be confusing for Ruby.
// Or, we could track this and then subsequently ignore the events
//
@@ -401,7 +401,7 @@ rule "EVENT.MANAGER"
ControlLoopTimer opTimer = new ControlLoopTimer();
opTimer.setTimerType("Operation");
opTimer.setClosedLoopControlName($event.getClosedLoopControlName());
- opTimer.setRequestID($event.getRequestId().toString());
+ opTimer.setRequestId($event.getRequestId().toString());
opTimer.setDelay(operation.getOperationTimeout().toString() + "s");
insert(opTimer);
@@ -478,9 +478,9 @@ rule "EVENT.MANAGER.OPERATION.LOCKED.GUARD_PERMITTED"
requestId == $event.getRequestId() )
$operation : ControlLoopOperationManager( onset.closedLoopControlName == $event.getClosedLoopControlName(),
onset.getRequestId() == $event.getRequestId(), "Permit".equalsIgnoreCase(getGuardApprovalStatus()) )
- $lock : TargetLock (requestID == $event.getRequestId())
+ $lock : TargetLock (requestId == $event.getRequestId())
$opTimer : ControlLoopTimer( closedLoopControlName == $event.getClosedLoopControlName(),
- requestID == $event.getRequestId().toString(), timerType == "Operation", !expired )
+ requestId == $event.getRequestId().toString(), timerType == "Operation", !expired )
then
Logger logger = LoggerFactory.getLogger(drools.getRule().getPackage());
@@ -627,7 +627,7 @@ rule "EVENT.MANAGER.OPERATION.LOCKED.GUARD_NOT_YET_QUERIED"
requestId == $event.getRequestId() )
$operation : ControlLoopOperationManager( onset.closedLoopControlName == $event.getClosedLoopControlName(),
onset.getRequestId() == $event.getRequestId(), getGuardApprovalStatus() == "NONE" )
- $lock : TargetLock (requestID == $event.getRequestId())
+ $lock : TargetLock (requestId == $event.getRequestId())
then
Logger logger = LoggerFactory.getLogger(drools.getRule().getPackage());
@@ -696,10 +696,10 @@ rule "GUARD.RESPONSE"
requestId == $event.getRequestId() )
$operation : ControlLoopOperationManager( onset.closedLoopControlName == $event.getClosedLoopControlName(),
onset.getRequestId() == $event.getRequestId() )
- $lock : TargetLock (requestID == $event.getRequestId())
+ $lock : TargetLock (requestId == $event.getRequestId())
$opTimer : ControlLoopTimer( closedLoopControlName == $event.getClosedLoopControlName(),
- requestID == $event.getRequestId().toString(), timerType == "Operation", !expired )
- $guardResponse : PolicyGuardResponse(requestID == $event.getRequestId(), $operation.policy.recipe == operation)
+ requestId == $event.getRequestId().toString(), timerType == "Operation", !expired )
+ $guardResponse : PolicyGuardResponse(requestId == $event.getRequestId(), $operation.policy.recipe == operation)
then
Logger logger = LoggerFactory.getLogger(drools.getRule().getPackage());
@@ -766,8 +766,8 @@ rule "APPC.RESPONSE"
$operation : ControlLoopOperationManager( onset.closedLoopControlName == $event.getClosedLoopControlName(),
onset.getRequestId() == $event.getRequestId() )
$opTimer : ControlLoopTimer( closedLoopControlName == $event.getClosedLoopControlName(),
- requestID == $event.getRequestId().toString(), timerType == "Operation", !expired )
- $lock : TargetLock (requestID == $event.getRequestId())
+ requestId == $event.getRequestId().toString(), timerType == "Operation", !expired )
+ $lock : TargetLock (requestId == $event.getRequestId())
$response : Response( getCommonHeader().RequestId == $event.getRequestId() )
then
@@ -846,7 +846,7 @@ end
/*
*
* The problem with Responses is that they don't have a controlLoopControlName
-* field in them, so the only way to attach them is via RequestID. If we have multiple
+* field in them, so the only way to attach them is via RequestId. If we have multiple
* control loop .drl's loaded in the same container, we need to be sure the cleanup
* rules don't remove Responses for other control loops.
*
@@ -884,8 +884,8 @@ rule "APPC.LCM.RESPONSE"
$operation : ControlLoopOperationManager( onset.closedLoopControlName == $event.getClosedLoopControlName(),
onset.getRequestId() == $event.getRequestId() )
$opTimer : ControlLoopTimer( closedLoopControlName == $event.getClosedLoopControlName(),
- requestID == $event.getRequestId().toString(), timerType == "Operation", !expired )
- $lock : TargetLock (requestID == $event.getRequestId())
+ requestId == $event.getRequestId().toString(), timerType == "Operation", !expired )
+ $lock : TargetLock (requestId == $event.getRequestId())
$response : LcmResponseWrapper( getBody().getCommonHeader().getRequestId() == $event.getRequestId() )
then
@@ -993,8 +993,8 @@ rule "SO.RESPONSE"
$operation : ControlLoopOperationManager( onset.closedLoopControlName == $event.getClosedLoopControlName(),
onset.getRequestId() == $event.getRequestId() )
$opTimer : ControlLoopTimer( closedLoopControlName == $event.getClosedLoopControlName(),
- requestID == $event.getRequestId().toString(), timerType == "Operation", !expired )
- $lock : TargetLock (requestID == $event.getRequestId())
+ requestId == $event.getRequestId().toString(), timerType == "Operation", !expired )
+ $lock : TargetLock (requestId == $event.getRequestId())
$response : SoResponseWrapper(requestId.toString() == $event.getRequestId().toString() )
then
@@ -1081,8 +1081,8 @@ rule "VFC.RESPONSE"
$operation : ControlLoopOperationManager( onset.closedLoopControlName == $event.getClosedLoopControlName(),
onset.getRequestId() == $event.getRequestId() )
$opTimer : ControlLoopTimer( closedLoopControlName == $event.getClosedLoopControlName(),
- requestID == $event.getRequestId().toString(), timerType == "Operation", !expired )
- $lock : TargetLock (requestID == $event.getRequestId())
+ requestId == $event.getRequestId().toString(), timerType == "Operation", !expired )
+ $lock : TargetLock (requestId == $event.getRequestId())
$response : VfcResponse( requestId.toString() == $event.getRequestId().toString() )
then
Logger logger = LoggerFactory.getLogger(drools.getRule().getPackage());
@@ -1154,8 +1154,8 @@ rule "SDNC.RESPONSE"
$manager : ControlLoopEventManager( closedLoopControlName == $event.getClosedLoopControlName(), requestId == $event.getRequestId() )
$operation : ControlLoopOperationManager( onset.closedLoopControlName == $event.getClosedLoopControlName(), onset.getRequestId() == $event.getRequestId() )
$opTimer : ControlLoopTimer( closedLoopControlName == $event.getClosedLoopControlName(),
- requestID == $event.getRequestId().toString(), timerType == "Operation", !expired )
- $lock : TargetLock (requestID == $event.getRequestId())
+ requestId == $event.getRequestId().toString(), timerType == "Operation", !expired )
+ $lock : TargetLock (requestId == $event.getRequestId())
$response : SdncResponse( requestId.toString() == $event.getRequestId().toString() )
then
Logger logger = LoggerFactory.getLogger(drools.getRule().getPackage());
@@ -1245,8 +1245,8 @@ rule "EVENT.MANAGER.OPERATION.TIMEOUT"
$operation : ControlLoopOperationManager( onset.closedLoopControlName == $event.getClosedLoopControlName(),
onset.getRequestId() == $event.getRequestId() )
$opTimer : ControlLoopTimer( closedLoopControlName == $event.getClosedLoopControlName(),
- requestID == $event.getRequestId().toString(), timerType == "Operation", expired )
- $lock : TargetLock (requestID == $event.getRequestId())
+ requestId == $event.getRequestId().toString(), timerType == "Operation", expired )
+ $lock : TargetLock (requestId == $event.getRequestId())
then
Logger logger = LoggerFactory.getLogger(drools.getRule().getPackage());
@@ -1310,7 +1310,7 @@ rule "EVENT.MANAGER.TIMEOUT"
$manager : ControlLoopEventManager( closedLoopControlName == $event.getClosedLoopControlName(),
requestId == $event.getRequestId() )
$clTimer : ControlLoopTimer( closedLoopControlName == $event.getClosedLoopControlName(),
- requestID == $event.getRequestId().toString(), timerType == "ClosedLoop", expired )
+ requestId == $event.getRequestId().toString(), timerType == "ClosedLoop", expired )
then
Logger logger = LoggerFactory.getLogger(drools.getRule().getPackage());
@@ -1353,9 +1353,9 @@ rule "EVENT.MANAGER.CLEANUP"
onset.getRequestId() == $requestId ) )
$timers : LinkedList()
from collect( ControlLoopTimer( closedLoopControlName == $clName,
- requestID == $requestId.toString() ) )
+ requestId == $requestId.toString() ) )
$locks : LinkedList()
- from collect( TargetLock (requestID == $requestId) )
+ from collect( TargetLock (requestId == $requestId) )
not( VirtualControlLoopEvent( closedLoopControlName == $clName, requestId == $requestId ) )
then
@@ -1422,8 +1422,8 @@ rule "SDNR.RESPONSE"
$operation : ControlLoopOperationManager( onset.closedLoopControlName == $event.getClosedLoopControlName(),
onset.getRequestId() == $event.getRequestId() )
$opTimer : ControlLoopTimer( closedLoopControlName == $event.getClosedLoopControlName(),
- requestID == $event.getRequestId().toString(), timerType == "Operation", !expired )
- $lock : TargetLock (requestID == $event.getRequestId())
+ requestId == $event.getRequestId().toString(), timerType == "Operation", !expired )
+ $lock : TargetLock (requestId == $event.getRequestId())
$response : PciResponseWrapper( getBody().getCommonHeader().getRequestId() == $event.getRequestId() )
then