use of co.cask.cdap.internal.flow.DefaultFlowSpecification in project cdap by caskdata.
the class FlowSpecificationCodec method deserialize.
@Override
public FlowSpecification deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException {
JsonObject jsonObj = json.getAsJsonObject();
String className = jsonObj.get("className").getAsString();
String name = jsonObj.get("name").getAsString();
String description = jsonObj.get("description").getAsString();
Map<String, FlowletDefinition> flowlets = deserializeMap(jsonObj.get("flowlets"), context, FlowletDefinition.class);
List<FlowletConnection> connections = deserializeList(jsonObj.get("connections"), context, FlowletConnection.class);
return new DefaultFlowSpecification(className, name, description, flowlets, connections);
}
Aggregations