- this.configurationsJson = configurationsJson;
- LegacyOperationalPolicy.preloadConfiguration(this.configurationsJson, loop);
- }
-
- @Override
- public String getName() {
- return name;
+ this.setPolicyModel(policyModel);
+ this.setConfigurationsJson(configurationsJson);
+ this.setLoopElementModel(loopElementModel);
+ if (policyModel != null && policyModel.getPolicyModelType().contains("legacy")) {
+ LegacyOperationalPolicy.preloadConfiguration(configurationsJson, loop);
+ }
+ try {
+ this.setJsonRepresentation(
+ OperationalPolicyRepresentationBuilder.generateOperationalPolicySchema(loop.getModelService()));
+ } catch (JsonSyntaxException | IOException | NullPointerException e) {
+ logger.error("Unable to generate the operational policy Schema ... ", e);
+ this.setJsonRepresentation(new JsonObject());
+ }