Class EventRepository
java.lang.Object
de.fraunhofer.iese.mydata.pdp.interfaces.AbstractEventRepository
de.fraunhofer.iese.mydata.eventhistory.EventRepository
- All Implemented Interfaces:
de.fraunhofer.iese.mydata.policy.event.history.IEventRepository
@Component("mydataEventRepository")
public class EventRepository
extends de.fraunhofer.iese.mydata.pdp.interfaces.AbstractEventRepository
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
deleteEventOccurrenceByActionId
(de.fraunhofer.iese.mydata.policy.event.ActionId actionId) void
deleteValueChangeBlock
(de.fraunhofer.iese.mydata.policy.PolicyId policyId, Map<String, String> variableValueChangeBlock) void
de.fraunhofer.iese.mydata.policy.event.history.HistoricEvent
filterHistoricEventByModeAndParameters
(String mode, List<de.fraunhofer.iese.mydata.policy.event.history.HistoricEvent> notFiltred, List<de.fraunhofer.iese.mydata.policy.event.history.HistoricEventParameter> parameters) List<de.fraunhofer.iese.mydata.policy.event.history.HistoricEvent>
findAll()
List<de.fraunhofer.iese.mydata.policy.event.history.HistoricEvent>
findByActionId
(de.fraunhofer.iese.mydata.policy.event.ActionId actionId) List<de.fraunhofer.iese.mydata.policy.event.history.HistoricEvent>
findByActionIdAndHistoricEventParametersAndOccurredAtMsBetween
(de.fraunhofer.iese.mydata.policy.event.ActionId actionId, List<de.fraunhofer.iese.mydata.policy.event.history.HistoricEventParameter> p, long start, long end) de.fraunhofer.iese.mydata.policy.event.history.HistoricEvent
findByActionIdAndMode
(de.fraunhofer.iese.mydata.policy.event.ActionId actionId, String mode, List<de.fraunhofer.iese.mydata.policy.event.history.HistoricEventParameter> parameters) List<de.fraunhofer.iese.mydata.policy.event.history.HistoricEvent>
findByActionIdAndOccurredAtMsBetweenParamIndependant
(de.fraunhofer.iese.mydata.policy.event.ActionId actionId, long start, long end) long
findByOccurredAtMsAfterAndActionId
(long start, de.fraunhofer.iese.mydata.policy.event.ActionId actionId) long
findByOccurredAtMsBeforeAndActionId
(long end, de.fraunhofer.iese.mydata.policy.event.ActionId actionId) List<de.fraunhofer.iese.mydata.policy.event.history.HistoricEvent>
findByOccurredAtMsBetweenAndActionId
(long start, long end, de.fraunhofer.iese.mydata.policy.event.ActionId actionId) int
getValueChanged
(String id, de.fraunhofer.iese.mydata.policy.Policy policy) void
saveEventOccurrence
(de.fraunhofer.iese.mydata.policy.event.Event event, Set<de.fraunhofer.iese.mydata.policy.event.history.HistoricEventTrackItem> trackItems) void
saveValueChangeBlock
(de.fraunhofer.iese.mydata.policy.Policy policy, Map<String, String> variableValueChangeBlock) void
setValueChanged
(de.fraunhofer.iese.mydata.policy.Policy policy, String id, String valueInPolicy) void
updateValueChangeBlockPolicyId
(de.fraunhofer.iese.mydata.policy.Policy newPolicy, de.fraunhofer.iese.mydata.policy.PolicyId oldPolicyId) Methods inherited from class de.fraunhofer.iese.mydata.pdp.interfaces.AbstractEventRepository
getEventsToBeStored, getHistoricEventTrackItemsPerActionId, notify, policyDeployed, policyRevoked, policyUpdate, policyUpdate, reset
-
Constructor Details
-
EventRepository
public EventRepository()
-
-
Method Details
-
findByActionIdAndHistoricEventParametersAndOccurredAtMsBetween
-
findByActionIdAndOccurredAtMsBetweenParamIndependant
public List<de.fraunhofer.iese.mydata.policy.event.history.HistoricEvent> findByActionIdAndOccurredAtMsBetweenParamIndependant(de.fraunhofer.iese.mydata.policy.event.ActionId actionId, long start, long end) -
saveEventOccurrence
@Async public void saveEventOccurrence(de.fraunhofer.iese.mydata.policy.event.Event event, Set<de.fraunhofer.iese.mydata.policy.event.history.HistoricEventTrackItem> trackItems) -
findByOccurredAtMsBetweenAndActionId
public List<de.fraunhofer.iese.mydata.policy.event.history.HistoricEvent> findByOccurredAtMsBetweenAndActionId(long start, long end, de.fraunhofer.iese.mydata.policy.event.ActionId actionId) -
findByOccurredAtMsBeforeAndActionId
public long findByOccurredAtMsBeforeAndActionId(long end, de.fraunhofer.iese.mydata.policy.event.ActionId actionId) -
findByOccurredAtMsAfterAndActionId
public long findByOccurredAtMsAfterAndActionId(long start, de.fraunhofer.iese.mydata.policy.event.ActionId actionId) -
findByActionId
public List<de.fraunhofer.iese.mydata.policy.event.history.HistoricEvent> findByActionId(de.fraunhofer.iese.mydata.policy.event.ActionId actionId) -
findByActionIdAndMode
-
filterHistoricEventByModeAndParameters
public de.fraunhofer.iese.mydata.policy.event.history.HistoricEvent filterHistoricEventByModeAndParameters(String mode, List<de.fraunhofer.iese.mydata.policy.event.history.HistoricEvent> notFiltred, List<de.fraunhofer.iese.mydata.policy.event.history.HistoricEventParameter> parameters) - Parameters:
mode
- : get the first or the last occurrence of the historic eventsnotFiltred
- : the list of historic events for a specific actionidparameters
- : if no parameters are provided in the policy, it means the user is only interested when the historic events occurred, independently of the parameters it had- Returns:
HistoricEvent
-
findAll
-
deleteEventOccurrenceByActionId
public void deleteEventOccurrenceByActionId(de.fraunhofer.iese.mydata.policy.event.ActionId actionId) -
getNumberOfEntries
public int getNumberOfEntries() -
updateValueChangeBlockPolicyId
public void updateValueChangeBlockPolicyId(de.fraunhofer.iese.mydata.policy.Policy newPolicy, de.fraunhofer.iese.mydata.policy.PolicyId oldPolicyId) -
saveValueChangeBlock
-
deleteValueChangeBlock
-
getValueChanged
-
setValueChanged
public void setValueChanged(de.fraunhofer.iese.mydata.policy.Policy policy, String id, String valueInPolicy) throws de.fraunhofer.iese.mydata.policy.exception.ValueNotFoundException - Throws:
de.fraunhofer.iese.mydata.policy.exception.ValueNotFoundException
-
deleteValueChangedByPolicyId
-