+ List<MicroServicePolicy> microservicePolicies = JsonUtils.GSON_JPA_MODEL.fromJson(microServicePoliciesJson,
+ MICROSERVICE_POLICY_TYPE);
+ return loopService.updateAndSaveMicroservicePolicies(loopName, microservicePolicies);
+ }
+
+ /**
+ * Update the global properties.
+ *
+ * @param loopName The loop name
+ * @param globalProperties The updated global properties
+ * @return The updated loop
+ */
+ public Loop updateGlobalPropertiesJson(String loopName, JsonObject globalProperties) {
+ return loopService.updateAndSaveGlobalPropertiesJson(loopName, globalProperties);
+ }
+
+ /**
+ * This method add an operational policy to a loop instance.
+ *
+ * @param loopName The loop name
+ * @param policyType The policy model type
+ * @param policyVersion The policy model version
+ * @return The loop modified
+ */
+ public Loop addOperationalPolicy(String loopName, String policyType, String policyVersion) {
+ return loopService.addOperationalPolicy(loopName, policyType, policyVersion);
+ }
+
+ /**
+ * This method remove an operational policy to a loop instance.
+ *
+ * @param loopName The loop name
+ * @param policyType The policy model type
+ * @param policyVersion The policy model version
+ * @return The loop modified
+ */
+ public Loop removeOperationalPolicy(String loopName, String policyType, String policyVersion) {
+ return loopService.removeOperationalPolicy(loopName, policyType, policyVersion);
+ }
+
+ /**
+ * This method deletes the loop.
+ *
+ * @param loopName The loop Name
+ */
+ public void deleteLoop(String loopName) {
+ loopService.deleteLoop(loopName);
+ }
+
+ /**
+ * Update one MicroService policy properties.
+ *
+ * @param loopName The loop name
+ * @param newMicroservicePolicy The new MicroService policy properties
+ * @return The updated MicroService policy
+ */
+ public MicroServicePolicy updateMicroservicePolicy(String loopName, MicroServicePolicy newMicroservicePolicy) {
+ return loopService.updateMicroservicePolicy(loopName, newMicroservicePolicy);
+ }
+
+ /**
+ * Get the SVG representation of the loop.
+ *
+ * @param loopName The loop name
+ * @return The SVG representation
+ */
+ public String getSvgRepresentation(String loopName) {
+ Loop loop = loopService.getLoop(loopName);
+ return loop != null ? loop.getSvgRepresentation() : null;
+ }
+
+ /**
+ * Refresh the Operational Policy Json representation of the loop.
+ *
+ * @param loopName The loop name
+ * @return The refreshed Loop
+ */
+ public Loop refreshOpPolicyJsonRepresentation(String loopName) {
+ return loopService.refreshOpPolicyJsonRepresentation(loopName);