V1_01.java [src/java/m/example/simpleservice] Revision:   Date:
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package m.example.simpleservice;

import csip.ModelDataService;
import javax.ws.rs.Path;
import csip.annotations.*;
import org.apache.commons.io.FileUtils;

/**
 * Fahrenheit conversion.
 *
 * @author od
 */
@Name("simple")
@Description("Example of an simple service")
@Path("m/attach/1.0")
public class V1_01 extends ModelDataService {

  // 2) convert the temperature
  @Override
  protected void doProcess() throws Exception {
    
    FileUtils.writeStringToFile(workspace().getFile("abc"), "string content", "UTF-8");

    results().put(workspace().getFile("abc"));
    
////    System.out.println("File " + getFileInput("test.txt"));
//    System.out.println("File " + attachments().getFile("test.txt"));
//    System.out.println("File " + formdata().getFile("file1"));
//    System.out.println("File " + formdata().getKeys());
  }

}