Interface IEventRepository


  • public interface IEventRepository
    • Method Detail

      • deleteEventOccurrenceByActionId

        void deleteEventOccurrenceByActionId​(ActionId actionId)
      • deleteValueChangeBlock

        void deleteValueChangeBlock​(PolicyId policyId,
                                    Map<String,​String> variableValueChangeBlock)
        Provide concrete implementation for deletion of value changed .
        Parameters:
        policyId - PolicyId
        variableValueChangeBlock - Value change block with variable replaced with variable declaration xml block from policy
      • findByActionIdAndOccurredAtMsBetweenParamIndependant

        List<HistoricEvent> findByActionIdAndOccurredAtMsBetweenParamIndependant​(ActionId actionId,
                                                                                 long start,
                                                                                 long end)
      • findByOccurredAtMsAfterAndActionId

        long findByOccurredAtMsAfterAndActionId​(long start,
                                                ActionId actionId)
      • findByOccurredAtMsBeforeAndActionId

        long findByOccurredAtMsBeforeAndActionId​(long end,
                                                 ActionId actionId)
      • findByOccurredAtMsBetweenAndActionId

        List<HistoricEvent> findByOccurredAtMsBetweenAndActionId​(long start,
                                                                 long end,
                                                                 ActionId actionId)
      • getHistoricEventTrackItemsPerActionId

        Map<ActionId,​Set<HistoricEventTrackItem>> getHistoricEventTrackItemsPerActionId()
        Returns Map>, The parameters to save for that event
        Returns:
        Parameters of the event that needs to be stored
      • getEventsToBeStored

        Map<ActionId,​Set<PolicyId>> getEventsToBeStored()
        Returns Map>, Events with ActionId are to be stored.
        Returns:
      • notify

        void notify​(Event event)
        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

        void policyDeployed​(Policy policy)
        When policy is deployed call this method to update event storing map.
        Parameters:
        policy - to be deployed
      • policyRevoked

        void policyRevoked​(Policy policy)
        When policy is revoked, this method needs to be called to update Map used to filter policy.
        Parameters:
        policy - policy to be revoked
      • policyUpdate

        void policyUpdate​(Policy policy)
        When policy is updated, call this method.
        Parameters:
        policy - Policy to be updated
      • policyUpdate

        void policyUpdate​(Policy policy,
                          PolicyId oldPolicyId)
        When policy or the policyId is updated, call this method.
        Parameters:
        policy - Policy to be updated
        oldPolicyId - the previous/old policyId
      • saveEventOccurrence

        void saveEventOccurrence​(Event event,
                                 Set<HistoricEventTrackItem> trackItems)
        Provide concrete implementation for storing of events.
        Parameters:
        event - event to be stored
        trackItems - elements of the event that needs to be stored
      • saveValueChangeBlock

        void saveValueChangeBlock​(Policy policy,
                                  Map<String,​String> variableValueChangeBlock)
        Provide concrete implementation for storing of value changed .
        Parameters:
        policy - the policy
        variableValueChangeBlock - Value change block with variable replaced with variable declaration xml block from policy
      • updateValueChangeBlockPolicyId

        void updateValueChangeBlockPolicyId​(Policy newPolicy,
                                            PolicyId oldPolicyId)
        Provide concrete policyID update for the stored value changed .
        Parameters:
        newPolicy - the new policy after policy edition
        oldPolicyId - the old policyID
      • reset

        void reset()
        Reset internal settings what events to save but does not clear the database