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