[New] Added StrolchElementToJsonVisitor.withoutValueChanges()
This commit is contained in:
parent
ef230cf040
commit
80d8bcadb6
|
@ -52,6 +52,7 @@ public class StrolchElementToJsonVisitor implements StrolchElementVisitor<JsonEl
|
|||
private boolean withoutVersion;
|
||||
private boolean withoutPolicies;
|
||||
private boolean withoutStateVariables;
|
||||
private boolean withoutValueChanges;
|
||||
private int activityDepth = Integer.MAX_VALUE;
|
||||
|
||||
public StrolchElementToJsonVisitor() {
|
||||
|
@ -94,6 +95,10 @@ public class StrolchElementToJsonVisitor implements StrolchElementVisitor<JsonEl
|
|||
return this.withoutStateVariables;
|
||||
}
|
||||
|
||||
public boolean isWithoutValueChanges() {
|
||||
return this.withoutValueChanges;
|
||||
}
|
||||
|
||||
public StrolchElementToJsonVisitor withLocator() {
|
||||
this.withLocator = true;
|
||||
return this;
|
||||
|
@ -129,6 +134,11 @@ public class StrolchElementToJsonVisitor implements StrolchElementVisitor<JsonEl
|
|||
return this;
|
||||
}
|
||||
|
||||
public StrolchElementToJsonVisitor withoutValueChanges() {
|
||||
this.withoutValueChanges = true;
|
||||
return this;
|
||||
}
|
||||
|
||||
public StrolchElementToJsonVisitor withoutStateVariables() {
|
||||
this.withoutStateVariables = true;
|
||||
return this;
|
||||
|
@ -496,8 +506,8 @@ public class StrolchElementToJsonVisitor implements StrolchElementVisitor<JsonEl
|
|||
this.actionHook.accept(element, rootJ);
|
||||
|
||||
// value changes
|
||||
if (!this.withoutValueChanges && element.hasChanges()) {
|
||||
Iterator<IValueChange<? extends IValue<?>>> iter = element.getChanges().iterator();
|
||||
if (iter.hasNext()) {
|
||||
|
||||
JsonArray changesJ = new JsonArray();
|
||||
rootJ.add(Json.VALUE_CHANGES, changesJ);
|
||||
|
|
|
@ -94,6 +94,11 @@ public class StrolchRootElementToJsonVisitor implements StrolchRootElementVisito
|
|||
return this;
|
||||
}
|
||||
|
||||
public StrolchRootElementToJsonVisitor withoutValueChanges() {
|
||||
this.visitor.withoutValueChanges();
|
||||
return this;
|
||||
}
|
||||
|
||||
public StrolchRootElementToJsonVisitor withPolicies() {
|
||||
this.visitor.withPolicies();
|
||||
return this;
|
||||
|
|
Loading…
Reference in New Issue