summaryrefslogtreecommitdiff
path: root/src/main/java/com/c2kernel/events/History.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/c2kernel/events/History.java')
-rw-r--r--src/main/java/com/c2kernel/events/History.java30
1 files changed, 16 insertions, 14 deletions
diff --git a/src/main/java/com/c2kernel/events/History.java b/src/main/java/com/c2kernel/events/History.java
index bf77f40..c7e1ede 100644
--- a/src/main/java/com/c2kernel/events/History.java
+++ b/src/main/java/com/c2kernel/events/History.java
@@ -3,6 +3,8 @@ package com.c2kernel.events;
import com.c2kernel.common.InvalidDataException;
import com.c2kernel.lifecycle.instance.stateMachine.Transition;
+import com.c2kernel.lookup.AgentPath;
+import com.c2kernel.lookup.ItemPath;
import com.c2kernel.persistency.ClusterStorage;
import com.c2kernel.persistency.RemoteMap;
import com.c2kernel.utils.Logger;
@@ -21,20 +23,20 @@ public class History extends RemoteMap<Event> {
int lastID = -1;
- public History(int sysKey, Object locker) {
- super(sysKey, ClusterStorage.HISTORY, locker);
+ public History(ItemPath itemPath, Object locker) {
+ super(itemPath, ClusterStorage.HISTORY, locker);
}
- public Event addEvent(String agentName, String agentRole,
+ public Event addEvent(AgentPath agentPath, String agentRole,
String stepName,
String stepPath,
String stepType,
String stateMachineName,
Integer stateMachineVersion,
Transition transition) {
- return addEvent(agentName, agentRole, stepName, stepPath, stepType, null, null, stateMachineName, stateMachineVersion, transition, null);
+ return addEvent(agentPath, agentRole, stepName, stepPath, stepType, null, null, stateMachineName, stateMachineVersion, transition, null);
}
- public Event addEvent(String agentName, String agentRole,
+ public Event addEvent(AgentPath agentPath, String agentRole,
String stepName,
String stepPath,
String stepType,
@@ -44,10 +46,10 @@ public class History extends RemoteMap<Event> {
Integer stateMachineVersion,
Transition transition,
String viewName) {
- Logger.msg(7, "History.addEvent() - creating new event for "+transition.getName()+" on "+stepName+" in "+mSysKey);
+ Logger.msg(7, "History.addEvent() - creating new event for "+transition.getName()+" on "+stepName+" in "+mItemPath);
Event newEvent = new Event();
- newEvent.setEntitySystemKey(mSysKey);
- newEvent.setAgentName(agentName);
+ newEvent.setItemPath(mItemPath);
+ newEvent.setAgentPath(agentPath);
newEvent.setAgentRole(agentRole);
newEvent.setStepName(stepName);
newEvent.setStepPath(stepPath);
@@ -64,7 +66,7 @@ public class History extends RemoteMap<Event> {
return storeNewEvent(newEvent);
}
- public Event addEvent(String agentName, String agentRole,
+ public Event addEvent(AgentPath agentPath, String agentRole,
String stepName,
String stepPath,
String stepType,
@@ -72,10 +74,10 @@ public class History extends RemoteMap<Event> {
Integer stateMachineVersion,
Transition transition,
String timeString) throws InvalidDataException {
- return addEvent(agentName, agentRole, stepName, stepPath, stepType, null, null, stateMachineName, stateMachineVersion, transition, null, timeString);
+ return addEvent(agentPath, agentRole, stepName, stepPath, stepType, null, null, stateMachineName, stateMachineVersion, transition, null, timeString);
}
- public Event addEvent(String agentName, String agentRole,
+ public Event addEvent(AgentPath agentPath, String agentRole,
String stepName,
String stepPath,
String stepType,
@@ -86,10 +88,10 @@ public class History extends RemoteMap<Event> {
Transition transition,
String viewName,
String timeString) throws InvalidDataException {
- Logger.msg(7, "History.addEvent() - creating new event for "+transition.getName()+" on "+stepName+" in "+mSysKey);
+ Logger.msg(7, "History.addEvent() - creating new event for "+transition.getName()+" on "+stepName+" in "+mItemPath);
Event newEvent = new Event();
- newEvent.setEntitySystemKey(mSysKey);
- newEvent.setAgentName(agentName);
+ newEvent.setItemPath(mItemPath);
+ newEvent.setAgentPath(agentPath);
newEvent.setAgentRole(agentRole);
newEvent.setStepName(stepName);
newEvent.setStepPath(stepPath);