Interface IEventRepository
public interface IEventRepository
-
Method Summary
Modifier and TypeMethodDescriptionvoiddeleteEventOccurrenceByActionId(ActionId actionId) voiddeleteValueChangeBlock(PolicyId policyId, Map<String, String> variableValueChangeBlock) Provide concrete implementation for deletion of value changed .findAll()findByActionId(ActionId actionId) findByActionIdAndHistoricEventParametersAndOccurredAtMsBetween(ActionId actionId, List<HistoricEventParameter> hep, long start, long end) findByActionIdAndMode(ActionId actionId, String mode, List<HistoricEventParameter> policyEventParameters) findByActionIdAndOccurredAtMsBetweenParamIndependant(ActionId actionId, long start, long end) longfindByOccurredAtMsAfterAndActionId(long start, ActionId actionId) longfindByOccurredAtMsBeforeAndActionId(long end, ActionId actionId) findByOccurredAtMsBetweenAndActionId(long start, long end, ActionId actionId) Returns Map<ActionId, List>, Events with ActionId are to be stored. Returns Map<ActionId, List>, The parameters to save for that event getValueChanged(String blockId, Policy policy) voidWhen PDP is notified via event then same call is passed to EventRepository.voidpolicyDeployed(Policy policy) When policy is deployed call this method to update event storing map.voidpolicyRevoked(Policy policy) When policy is revoked, this method needs to be called to update Map used to filter policy.voidpolicyUpdate(Policy policy) When policy is updated, call this method.voidpolicyUpdate(Policy policy, PolicyId oldPolicyId) When policy or the policyId is updated, call this method.voidreset()Reset internal settings what events to save but does not clear the databasevoidsaveEventOccurrence(Event event, Set<HistoricEventTrackItem> trackItems) Provide concrete implementation for storing of events.voidsaveValueChangeBlock(Policy policy, Map<String, String> variableValueChangeBlock) Provide concrete implementation for storing of value changed .voidsetValueChanged(Policy policy, String blockId, String valueInPolicy) voidupdateValueChangeBlockPolicyId(Policy newPolicy, PolicyId oldPolicyId) Provide concrete policyID update for the stored value changed .
-
Method Details
-
deleteEventOccurrenceByActionId
-
deleteValueChangeBlock
Provide concrete implementation for deletion of value changed .- Parameters:
policyId- PolicyIdvariableValueChangeBlock- Value change block with variable replaced with variable declaration xml block from policy
-
findAll
List<HistoricEvent> findAll() -
findByActionId
-
findByActionIdAndHistoricEventParametersAndOccurredAtMsBetween
List<HistoricEvent> findByActionIdAndHistoricEventParametersAndOccurredAtMsBetween(ActionId actionId, List<HistoricEventParameter> hep, long start, long end) -
findByActionIdAndMode
HistoricEvent findByActionIdAndMode(ActionId actionId, String mode, List<HistoricEventParameter> policyEventParameters) -
findByActionIdAndOccurredAtMsBetweenParamIndependant
List<HistoricEvent> findByActionIdAndOccurredAtMsBetweenParamIndependant(ActionId actionId, long start, long end) -
findByOccurredAtMsAfterAndActionId
-
findByOccurredAtMsBeforeAndActionId
-
findByOccurredAtMsBetweenAndActionId
-
getHistoricEventTrackItemsPerActionId
Map<ActionId,Set<HistoricEventTrackItem>> getHistoricEventTrackItemsPerActionId()Returns Map<ActionId, List>, The parameters to save for that event - Returns:
- Parameters of the event that needs to be stored
-
getEventsToBeStored
Returns Map<ActionId, List>, Events with ActionId are to be stored. - Returns:
-
getValueChanged
-
notify
When PDP is notified via event then same call is passed to EventRepository. EventRepository will take care of storing of events if required.- Parameters:
event- notified.
-
policyDeployed
When policy is deployed call this method to update event storing map.- Parameters:
policy- to be deployed
-
policyRevoked
When policy is revoked, this method needs to be called to update Map used to filter policy.- Parameters:
policy- policy to be revoked
-
policyUpdate
When policy is updated, call this method.- Parameters:
policy- Policy to be updated
-
policyUpdate
When policy or the policyId is updated, call this method.- Parameters:
policy- Policy to be updatedoldPolicyId- the previous/old policyId
-
saveEventOccurrence
Provide concrete implementation for storing of events.- Parameters:
event- event to be storedtrackItems- elements of the event that needs to be stored
-
saveValueChangeBlock
Provide concrete implementation for storing of value changed .- Parameters:
policy- the policyvariableValueChangeBlock- Value change block with variable replaced with variable declaration xml block from policy
-
setValueChanged
- Throws:
Exception
-
updateValueChangeBlockPolicyId
Provide concrete policyID update for the stored value changed .- Parameters:
newPolicy- the new policy after policy editionoldPolicyId- the old policyID
-
reset
void reset()Reset internal settings what events to save but does not clear the database
-