diff options
author | 2019-01-14 14:30:46 -0500 | |
---|---|---|
committer | 2019-01-14 15:12:11 -0500 | |
commit | 12fab6215a7a92b4959330ef179d38454dbb6225 (patch) | |
tree | c4edaa8ecdf3cfc59e15b20b739a481ed67f9ccd /controlloop/templates/template.demo.clc/src/main/resources/__closedLoopControlName__.drl | |
parent | dd691f02e2caa6028a868915b016a71bf6c1c876 (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/template.demo.clc/src/main/resources/__closedLoopControlName__.drl')
-rw-r--r-- | controlloop/templates/template.demo.clc/src/main/resources/__closedLoopControlName__.drl | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/controlloop/templates/template.demo.clc/src/main/resources/__closedLoopControlName__.drl b/controlloop/templates/template.demo.clc/src/main/resources/__closedLoopControlName__.drl index 1cbeac34c..f2584c063 100644 --- a/controlloop/templates/template.demo.clc/src/main/resources/__closedLoopControlName__.drl +++ b/controlloop/templates/template.demo.clc/src/main/resources/__closedLoopControlName__.drl @@ -109,7 +109,7 @@ end */ declare OperationTimer closedLoopControlName : String - requestID : String + requestId : String delay : String end @@ -118,7 +118,7 @@ end */ declare ControlLoopTimer closedLoopControlName : String - requestID : String + requestId : String delay : String end @@ -229,7 +229,7 @@ rule "${policyName}.EVENT" // ControlLoopTimer clTimer = new ControlLoopTimer(); clTimer.setClosedLoopControlName($event.getClosedLoopControlName()); - clTimer.setRequestID($event.getRequestId().toString()); + clTimer.setRequestId($event.getRequestId().toString()); clTimer.setDelay(manager.getControlLoopTimeout(1500) + "s"); // // Insert it @@ -283,7 +283,7 @@ rule "${policyName}.EVENT.MANAGER" $params : Params( getClosedLoopControlName() == "${closedLoopControlName}" ) $event : VirtualControlLoopEvent( closedLoopControlName == $params.getClosedLoopControlName() ) $manager : ControlLoopEventManager( closedLoopControlName == $event.getClosedLoopControlName(), requestId == $event.getRequestId() ) - $clTimer : ControlLoopTimer ( closedLoopControlName == $event.getClosedLoopControlName(), requestID == $event.getRequestId().toString() ) + $clTimer : ControlLoopTimer ( closedLoopControlName == $event.getClosedLoopControlName(), requestId == $event.getRequestId().toString() ) then Logger logger = LoggerFactory.getLogger(drools.getRule().getPackage()); @@ -461,7 +461,7 @@ rule "${policyName}.EVENT.MANAGER" // OperationTimer opTimer = new OperationTimer(); opTimer.setClosedLoopControlName($event.getClosedLoopControlName()); - opTimer.setRequestID($event.getRequestId().toString()); + opTimer.setRequestId($event.getRequestId().toString()); opTimer.setDelay(operation.getOperationTimeout().toString() + "s"); insert(opTimer); @@ -535,8 +535,8 @@ rule "${policyName}.EVENT.MANAGER.OPERATION.LOCKED.GUARD_PERMITTED" $event : VirtualControlLoopEvent( closedLoopControlName == $params.getClosedLoopControlName() ) $manager : ControlLoopEventManager( closedLoopControlName == $event.getClosedLoopControlName(), requestId == $event.getRequestId() ) $operation : ControlLoopOperationManager( onset.closedLoopControlName == $event.getClosedLoopControlName(), onset.getRequestId() == $event.getRequestId(), "Permit".equalsIgnoreCase(getGuardApprovalStatus()) ) - $lock : TargetLock (requestID == $event.getRequestId()) - $opTimer : OperationTimer( closedLoopControlName == $event.getClosedLoopControlName(), requestID == $event.getRequestId().toString() ) + $lock : TargetLock (requestId == $event.getRequestId()) + $opTimer : OperationTimer( closedLoopControlName == $event.getClosedLoopControlName(), requestId == $event.getRequestId().toString() ) then Logger logger = LoggerFactory.getLogger(drools.getRule().getPackage()); @@ -662,7 +662,7 @@ rule "${policyName}.EVENT.MANAGER.OPERATION.LOCKED.GUARD_NOT_YET_QUERIED" $event : VirtualControlLoopEvent( closedLoopControlName == $params.getClosedLoopControlName() ) $manager : ControlLoopEventManager( closedLoopControlName == $event.getClosedLoopControlName(), 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()); @@ -724,9 +724,9 @@ rule "${policyName}.GUARD.RESPONSE" $event : VirtualControlLoopEvent( closedLoopControlName == $params.getClosedLoopControlName(), closedLoopEventStatus == ControlLoopEventStatus.ONSET ) $manager : ControlLoopEventManager( closedLoopControlName == $event.getClosedLoopControlName(), requestId == $event.getRequestId() ) $operation : ControlLoopOperationManager( onset.closedLoopControlName == $event.getClosedLoopControlName(), onset.getRequestId() == $event.getRequestId() ) - $lock : TargetLock (requestID == $event.getRequestId()) - $opTimer : OperationTimer( closedLoopControlName == $event.getClosedLoopControlName(), requestID == $event.getRequestId().toString() ) - $guardResponse : PolicyGuardResponse(requestID == $event.getRequestId(), $operation.policy.recipe == operation) + $lock : TargetLock (requestId == $event.getRequestId()) + $opTimer : OperationTimer( closedLoopControlName == $event.getClosedLoopControlName(), requestId == $event.getRequestId().toString() ) + $guardResponse : PolicyGuardResponse(requestId == $event.getRequestId(), $operation.policy.recipe == operation) then Logger logger = LoggerFactory.getLogger(drools.getRule().getPackage()); @@ -788,8 +788,8 @@ rule "${policyName}.APPC.RESPONSE" $event : VirtualControlLoopEvent( closedLoopControlName == $params.getClosedLoopControlName(), closedLoopEventStatus == ControlLoopEventStatus.ONSET ) $manager : ControlLoopEventManager( closedLoopControlName == $event.getClosedLoopControlName(), requestId == $event.getRequestId() ) $operation : ControlLoopOperationManager( onset.closedLoopControlName == $event.getClosedLoopControlName(), onset.getRequestId() == $event.getRequestId() ) - $opTimer : OperationTimer( closedLoopControlName == $event.getClosedLoopControlName(), requestID == $event.getRequestId().toString() ) - $lock : TargetLock (requestID == $event.getRequestId()) + $opTimer : OperationTimer( closedLoopControlName == $event.getClosedLoopControlName(), requestId == $event.getRequestId().toString() ) + $lock : TargetLock (requestId == $event.getRequestId()) $response : Response( getCommonHeader().RequestId == $event.getRequestId() ) then @@ -902,8 +902,8 @@ rule "${policyName}.APPC.LCM.RESPONSE" $event : VirtualControlLoopEvent( closedLoopControlName == $params.getClosedLoopControlName(), closedLoopEventStatus == ControlLoopEventStatus.ONSET ) $manager : ControlLoopEventManager( closedLoopControlName == $event.getClosedLoopControlName(), requestId == $event.getRequestId() ) $operation : ControlLoopOperationManager( onset.closedLoopControlName == $event.getClosedLoopControlName(), onset.getRequestId() == $event.getRequestId() ) - $opTimer : OperationTimer( closedLoopControlName == $event.getClosedLoopControlName(), requestID == $event.getRequestId().toString() ) - $lock : TargetLock (requestID == $event.getRequestId()) + $opTimer : OperationTimer( closedLoopControlName == $event.getClosedLoopControlName(), requestId == $event.getRequestId().toString() ) + $lock : TargetLock (requestId == $event.getRequestId()) $response : LcmResponseWrapper( getBody().getCommonHeader().getRequestId() == $event.getRequestId() ) then @@ -1007,8 +1007,8 @@ rule "${policyName}.SO.RESPONSE" $event : VirtualControlLoopEvent( closedLoopControlName == $params.getClosedLoopControlName(), closedLoopEventStatus == ControlLoopEventStatus.ONSET ) $manager : ControlLoopEventManager( closedLoopControlName == $event.getClosedLoopControlName(), requestId == $event.getRequestId() ) $operation : ControlLoopOperationManager( onset.closedLoopControlName == $event.getClosedLoopControlName(), onset.getRequestId() == $event.getRequestId() ) - $opTimer : OperationTimer( closedLoopControlName == $event.getClosedLoopControlName(), requestID == $event.getRequestId().toString() ) - $lock : TargetLock (requestID == $event.getRequestId()) + $opTimer : OperationTimer( closedLoopControlName == $event.getClosedLoopControlName(), requestId == $event.getRequestId().toString() ) + $lock : TargetLock (requestId == $event.getRequestId()) $response : SoResponseWrapper(requestId.toString() == $event.getRequestId().toString() ) then @@ -1091,8 +1091,8 @@ rule "${policyName}.VFC.RESPONSE" $event : VirtualControlLoopEvent( closedLoopControlName == $params.getClosedLoopControlName(), closedLoopEventStatus == ControlLoopEventStatus.ONSET ) $manager : ControlLoopEventManager( closedLoopControlName == $event.getClosedLoopControlName(), requestId == $event.getRequestId() ) $operation : ControlLoopOperationManager( onset.closedLoopControlName == $event.getClosedLoopControlName(), onset.getRequestId() == $event.getRequestId() ) - $opTimer : OperationTimer( closedLoopControlName == $event.getClosedLoopControlName(), requestID == $event.getRequestId().toString() ) - $lock : TargetLock (requestID == $event.getRequestId()) + $opTimer : OperationTimer( closedLoopControlName == $event.getClosedLoopControlName(), requestId == $event.getRequestId().toString() ) + $lock : TargetLock (requestId == $event.getRequestId()) $response : VfcResponse( requestId.toString() == $event.getRequestId().toString() ) then Logger logger = LoggerFactory.getLogger(drools.getRule().getPackage()); @@ -1164,8 +1164,8 @@ rule "${policyName}.EVENT.MANAGER.OPERATION.TIMEOUT" $event : VirtualControlLoopEvent( closedLoopControlName == $params.getClosedLoopControlName() ) $manager : ControlLoopEventManager( closedLoopControlName == $event.getClosedLoopControlName(), requestId == $event.getRequestId() ) $operation : ControlLoopOperationManager( onset.closedLoopControlName == $event.getClosedLoopControlName(), onset.getRequestId() == $event.getRequestId() ) - $opTimer : OperationTimer( closedLoopControlName == $event.getClosedLoopControlName(), requestID == $event.getRequestId().toString(), $to : getDelay() ) - $lock : TargetLock (requestID == $event.getRequestId()) + $opTimer : OperationTimer( closedLoopControlName == $event.getClosedLoopControlName(), requestId == $event.getRequestId().toString(), $to : getDelay() ) + $lock : TargetLock (requestId == $event.getRequestId()) then Logger logger = LoggerFactory.getLogger(drools.getRule().getPackage()); @@ -1228,7 +1228,7 @@ rule "${policyName}.EVENT.MANAGER.TIMEOUT" $params : Params( getClosedLoopControlName() == "${closedLoopControlName}" ) $event : VirtualControlLoopEvent( closedLoopControlName == $params.getClosedLoopControlName() ) $manager : ControlLoopEventManager( closedLoopControlName == $event.getClosedLoopControlName(), requestId == $event.getRequestId() ) - $clTimer : ControlLoopTimer ( closedLoopControlName == $event.getClosedLoopControlName(), requestID == $event.getRequestId().toString(), $to : getDelay() ) + $clTimer : ControlLoopTimer ( closedLoopControlName == $event.getClosedLoopControlName(), requestId == $event.getRequestId().toString(), $to : getDelay() ) then Logger logger = LoggerFactory.getLogger(drools.getRule().getPackage()); @@ -1266,13 +1266,13 @@ end rule "${policyName}.EVENT.MANAGER.CLEANUP" when $manager : ControlLoopEventManager( $clName : getClosedLoopControlName(), $requestId : getRequestId() ) - $clTimer : ControlLoopTimer ( closedLoopControlName == $clName, requestID == $requestId.toString() ) + $clTimer : ControlLoopTimer ( closedLoopControlName == $clName, requestId == $requestId.toString() ) $operations : LinkedList() from collect( ControlLoopOperationManager( onset.closedLoopControlName == $clName, onset.getRequestId() == $requestId ) ) $opTimers : LinkedList() - from collect( OperationTimer( closedLoopControlName == $clName, requestID == $requestId.toString() ) ) + from collect( OperationTimer( closedLoopControlName == $clName, requestId == $requestId.toString() ) ) $locks : LinkedList() - from collect( TargetLock (requestID == $requestId) ) + from collect( TargetLock (requestId == $requestId) ) not( VirtualControlLoopEvent( closedLoopControlName == $clName, requestId == $requestId ) ) then |