@Override
public JsonObject getJsonRepresentation() {
- return jsonRepresentation;
+ return jsonRepresentation;
}
void setJsonRepresentation(JsonObject jsonRepresentation) {
return result;
}
+ /**
+ * Regenerate the Operational Policy Json Representation.
+ *
+ */
+ public void updateJsonRepresentation() {
+ try {
+ this.jsonRepresentation = OperationalPolicyRepresentationBuilder
+ .generateOperationalPolicySchema(loop.getModelService());
+ } catch (JsonSyntaxException | IOException | NullPointerException e) {
+ logger.error("Unable to generate the operational policy Schema ... ", e);
+ this.jsonRepresentation = new JsonObject();
+ }
+ }
}