public abstract class AbstractEntityJsonTransformer extends java.lang.Object implements EntityJsonTransformer
Constructor and Description |
---|
AbstractEntityJsonTransformer(java.lang.String fromEntityName,
java.lang.String toEntityName,
java.lang.String version,
JsonTransformationDirection direction) |
Modifier and Type | Method and Description |
---|---|
java.util.Set<java.lang.String> |
getAttributesToRemove() |
java.util.Map<java.lang.String,java.lang.String> |
getAttributesToRename() |
JsonTransformationDirection |
getDirection() |
java.lang.String |
getFromEntityName() |
java.lang.String |
getToEntityName() |
java.lang.String |
getTransformedEntityName() |
java.lang.String |
getVersion() |
void |
setAttributesToRemove(java.util.Set<java.lang.String> attributesToRemove) |
void |
setAttributesToRename(java.util.Map<java.lang.String,java.lang.String> attributesToRename) |
void |
setDirection(JsonTransformationDirection direction) |
void |
setFromEntityName(java.lang.String fromEntityName) |
void |
setToEntityName(java.lang.String toEntityName) |
void |
setVersion(java.lang.String version) |
java.lang.String |
transformJson(java.lang.String json)
Method checks whether the passed JSON is an array of entities and if so it executes the
transformEntityJson(ObjectNode, ObjectMapper)
method for each array element. |
public AbstractEntityJsonTransformer(java.lang.String fromEntityName, java.lang.String toEntityName, java.lang.String version, JsonTransformationDirection direction)
public java.lang.String getTransformedEntityName()
getTransformedEntityName
in interface EntityJsonTransformer
public java.lang.String transformJson(java.lang.String json)
transformEntityJson(ObjectNode, ObjectMapper)
method for each array element. Method executes the transformEntityJson(ObjectNode, ObjectMapper)
method otherwise.transformJson
in interface EntityJsonTransformer
json
- JSON containing an entity or a list of entitiespublic java.lang.String getFromEntityName()
public void setFromEntityName(java.lang.String fromEntityName)
public java.lang.String getToEntityName()
public void setToEntityName(java.lang.String toEntityName)
public java.util.Map<java.lang.String,java.lang.String> getAttributesToRename()
public void setAttributesToRename(java.util.Map<java.lang.String,java.lang.String> attributesToRename)
public java.lang.String getVersion()
public void setVersion(java.lang.String version)
public JsonTransformationDirection getDirection()
public void setDirection(JsonTransformationDirection direction)
public java.util.Set<java.lang.String> getAttributesToRemove()
public void setAttributesToRemove(java.util.Set<java.lang.String> attributesToRemove)