}
//Check for conflict with the appropriate update set if we are not a manual transition
- if (confupdates != null && !e.isManual()) {
+ if (confupdates != null && !u.isManual()) {
for(Update u2: confupdates) {
if (conflicts(u, u2)) {
throw new RuntimeException(createErrorMessage(u, u2));
return message;
}
- Edge createEdge(Node parent, Node current, Transition transition, boolean ismanual) {
+ Edge createEdge(Node parent, Node current, Transition transition) {
//Check if this transition is explored. If so, just skip everything
if (transitions.contains(transition))
return null;
//Create edge
- Edge e = new Edge(parent, current, transition, currUpdates, ismanual);
+ Edge e = new Edge(parent, current, transition, currUpdates);
parent.addOutEdge(e);
//Mark transition as explored
Node source, destination;
Transition transition;
ArrayList<Update> updates = new ArrayList<Update>();
- boolean ismanual;
- Edge(Node src, Node dst, Transition t, ArrayList<Update> _updates, boolean _ismanual) {
+ Edge(Node src, Node dst, Transition t, ArrayList<Update> _updates) {
this.source = src;
this.destination = dst;
this.transition = t;
- this.ismanual = _ismanual;
this.updates.addAll(_updates);
}
- boolean isManual() {
- return ismanual;
- }
-
Node getSrc() {
return source;
}
String deviceId;
String attribute;
String value;
-
- Update(String _appName, String _deviceId, String _attribute, String _value) {
+ boolean ismanual;
+
+ Update(String _appName, String _deviceId, String _attribute, String _value, boolean _ismanual) {
this.appName = _appName;
this.deviceId = _deviceId;
this.attribute = _attribute;
this.value = _value;
+ this.ismanual = _ismanual;
}
+ boolean isManual() {
+ return ismanual;
+ }
+
String getApp() {
return appName;
}
Node currentNode = getNode(id);
// Create an edge based on the current transition
- Edge newEdge = createEdge(parentNode, currentNode, transition, manual);
+ Edge newEdge = createEdge(parentNode, currentNode, transition);
// Reset the temporary variables and flags
currUpdates.clear();
}
private void writeWriterAndValue(String writer, String attribute, String value) {
- Update u = new Update(writer, "DEVICE", attribute, value);
+ Update u = new Update(writer, "DEVICE", attribute, value, manual);
currUpdates.add(u);
}