class RecipeToRecipeV4ResponseConverter extends AbstractConversionServiceAwareConverter<Recipe, RecipeV4Response> {

    @Override
    public RecipeV4Response convert(Recipe recipe) {
        RecipeV4Response json = new RecipeV4Response();
        json.setName(recipe.getName());
        json.setDescription(recipe.getDescription());
        json.setType(RecipeV4Type.valueOf(recipe.getRecipeType().name()));
        json.setContent(recipe.getContent());
        WorkspaceResourceV4Response workspace = getConversionService().convert(recipe.getWorkspace(), WorkspaceResourceV4Response.class);
        json.setWorkspace(workspace);
        json.setCreator(recipe.getCreator());
        json.setCrn(recipe.getResourceCrn());
        json.setCreated(recipe.getCreated());
        return json;
    }

}