V1_01.java [src/java/m/example/simpleservice] Revision: a3ea9bda3aef2cc041108bc718e31bd33ce37042  Date: Sat Apr 25 07:31:06 MDT 2020
/*
 * 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 oms3.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(getWorkspaceFile("abc"), "string content");

    results().put(getWorkspaceFile("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());
  }

}