Fixing JSON serialization

This commit is contained in:
Luca Frosini 2022-02-01 16:48:11 +01:00
parent b95f923636
commit 7f964ad5d2
1 changed files with 9 additions and 6 deletions

View File

@ -46,19 +46,19 @@ public interface QueryTemplate extends EntityElement {
public void setDescription(String description);
@JsonGetter(value = TEMPLATE_PROPERTY)
@JsonIgnore
@ISProperty(name = TEMPLATE_PROPERTY, description = "The Query Template. It can contains query variables to be replaced to obtain a runnable query.", readonly = false, mandatory = true, nullable = false)
public String getTemplateAsString() throws JsonProcessingException;
@JsonSetter(value = TEMPLATE_PROPERTY)
@JsonIgnore
public void setTemplate(String template) throws JsonProcessingException, IOException;
@JsonIgnore
public JsonNode getTemplate();
@JsonIgnore
@JsonSetter(value = TEMPLATE_PROPERTY)
public void setTemplate(JsonNode template);
@JsonGetter(value = TEMPLATE_PROPERTY)
public JsonNode getTemplate();
@JsonGetter(value = TEMPLATE_VARIABLES_PROPERTY)
@ISProperty(name = TEMPLATE_VARIABLES_PROPERTY, description = "The Query Template Variables. It can contains Query Template Variable to be replaced to obtain a runnable query.", readonly = false, mandatory = true, nullable = false)
public Map<String, TemplateVariable> getTemplateVariables();
@ -76,12 +76,14 @@ public interface QueryTemplate extends EntityElement {
* It uses the default values provided in TemplateVariables.
* @return the created object node
*/
@JsonIgnore
public ObjectNode getParamsFromDefaultValues();
/**
* @return the JsonQuery replacing the variables using the default values contained in TemplateVariables
* @throws Exception
*/
@JsonIgnore
public JsonNode getJsonQuery() throws Exception;
/**
@ -89,6 +91,7 @@ public interface QueryTemplate extends EntityElement {
* @return the JsonQuery replacing the variables using the provided values
* @throws Exception
*/
@JsonIgnore
public JsonNode getJsonQuery(JsonNode values) throws Exception;