@Column(columnDefinition = "MEDIUMTEXT", name = "blueprint_yaml")
private String blueprint;
- @Column(columnDefinition = "MEDIUMTEXT", name = "svg_representation")
- private String svgRepresentation;
-
@Expose
@OneToMany(
- cascade = CascadeType.ALL,
- fetch = FetchType.EAGER,
- mappedBy = "loopTemplate",
- orphanRemoval = true)
+ cascade = CascadeType.ALL,
+ fetch = FetchType.EAGER,
+ mappedBy = "loopTemplate",
+ orphanRemoval = true)
@SortNatural
private SortedSet<LoopTemplateLoopElementModel> loopElementModelsUsed = new TreeSet<>();
@Expose
@ManyToOne(
- fetch = FetchType.EAGER,
- cascade = {CascadeType.PERSIST, CascadeType.MERGE, CascadeType.REFRESH})
+ fetch = FetchType.EAGER,
+ cascade = {CascadeType.PERSIST, CascadeType.MERGE, CascadeType.REFRESH})
@JoinColumn(name = "service_uuid")
private Service modelService;
}
}
- /**
- * svgRepresentation getter.
- *
- * @return the svgRepresentation
- */
- public String getSvgRepresentation() {
- return svgRepresentation;
- }
-
- /**
- * svgRepresentation setter.
- *
- * @param svgRepresentation the svgRepresentation to set
- */
- public void setSvgRepresentation(String svgRepresentation) {
- this.svgRepresentation = svgRepresentation;
- }
-
/**
* loopElementModelsUsed getter.
*
* @param loopElementModel The loopElementModel to add
*/
public void addLoopElementModel(LoopElementModel loopElementModel) {
- LoopTemplateLoopElementModel jointEntry = new LoopTemplateLoopElementModel(this,
- loopElementModel, this.loopElementModelsUsed.size());
- this.loopElementModelsUsed.add(jointEntry);
- loopElementModel.getUsedByLoopTemplates().add(jointEntry);
+ this.addLoopElementModel(loopElementModel,this.loopElementModelsUsed.size());
}
/**
* specified manually.
*
* @param loopElementModel The loopElementModel to add
- * @param listPosition The position in the flow
+ * @param listPosition The position in the flow
*/
public void addLoopElementModel(LoopElementModel loopElementModel, Integer listPosition) {
LoopTemplateLoopElementModel jointEntry =
- new LoopTemplateLoopElementModel(this, loopElementModel, listPosition);
+ new LoopTemplateLoopElementModel(this, loopElementModel, listPosition);
this.loopElementModelsUsed.add(jointEntry);
loopElementModel.getUsedByLoopTemplates().add(jointEntry);
}
/**
* Constructor.
*
- * @param name The loop template name id
- * @param blueprint The blueprint containing all microservices (legacy
- * case)
- * @param svgRepresentation The svg representation of that loop template
+ * @param name The loop template name id
+ * @param blueprint The blueprint containing all microservices (legacy
+ * case)
* @param maxInstancesAllowed The maximum number of instances that can be
- * created from that template
- * @param service The service associated to that loop template
+ * created from that template
+ * @param service The service associated to that loop template
*/
- public LoopTemplate(String name, String blueprint, String svgRepresentation,
- Integer maxInstancesAllowed, Service service) {
+ public LoopTemplate(String name, String blueprint, Integer maxInstancesAllowed, Service service) {
this.name = name;
this.setBlueprint(blueprint);
- this.svgRepresentation = svgRepresentation;
this.maximumInstancesAllowed = maxInstancesAllowed;
this.modelService = service;
/**
* Generate the loop template name.
*
- * @param serviceName The service name
- * @param serviceVersion The service version
- * @param resourceName The resource name
+ * @param serviceName The service name
+ * @param serviceVersion The service version
+ * @param resourceName The resource name
* @param blueprintFileName The blueprint file name
* @return The generated loop template name
*/
public static String generateLoopTemplateName(String serviceName, String serviceVersion,
- String resourceName, String blueprintFileName) {
+ String resourceName, String blueprintFileName) {
StringBuilder buffer = new StringBuilder("LOOP_TEMPLATE_").append(serviceName).append("_v")
- .append(serviceVersion).append("_").append(resourceName).append("_")
- .append(blueprintFileName.replaceAll(".yaml", ""));
+ .append(serviceVersion).append("_").append(resourceName).append("_")
+ .append(blueprintFileName.replaceAll(".yaml", ""));
return buffer.toString().replace('.', '_').replaceAll(" ", "");
}
}