Skip to content
Snippets Groups Projects
Commit 68835b2d authored by René Schöne's avatar René Schöne
Browse files

Expose non-AST item state (isFrozen and isSendState).

- Report those states in REST API
parent fe7cd372
No related branches found
No related tags found
No related merge requests found
......@@ -6,10 +6,12 @@ aspect ItemHandling {
protected boolean Item.isFrozen = false;
public void Item.freeze() { isFrozen = true; }
public void Item.unfreeze() { isFrozen = false; }
public final boolean Item.isFrozen() { return isFrozen; }
protected boolean Item.sendState = true;
public void Item.disableSendState() { sendState = false; }
public void Item.enableSendState() { sendState = true; }
public final boolean Item.isSendState() { return sendState; }
//--- getStateAsString ---
syn String Item.getStateAsString();
......
......@@ -182,6 +182,8 @@ public class Application {
return SimpleItem.of(item.getID(),
item.getLabel(),
item.getTopic() != null ? item.getTopic().allParts() : null,
item.isFrozen(),
item.isSendState(),
item.getControllingList().stream().map(Item::getID).collect(Collectors.toList()),
wrapMetaData(item.getMetaDataList()));
}
......
......@@ -15,6 +15,8 @@ public class SimpleItem {
public final String ID;
public final String label;
public final String topic;
public final boolean frozen;
public final boolean sendState;
public final List<String> controlling;
public final Map<String, String> metaData;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment