PayloadResults.java [src/csip/api/server] Revision:   Date:
/*
 * $Id$
 *
 * This file is part of the Cloud Services Integration Platform (CSIP),
 * a Model-as-a-Service framework, API and application suite.
 *
 * 2012-2022, Olaf David and others, OMSLab, Colorado State University.
 *
 * OMSLab licenses this file to you under the MIT license.
 * See the LICENSE file in the project root for more information.
 */
package csip.api.server;

import java.io.File;

/**
 * Access to return payload results (and report data, same API).
 *
 * @author od
 */
public interface PayloadResults {

  /**
   * Put any meta data into a result.
   *
   * @param name the result name
   * @param metaKey the meta data key
   * @param metaValue the meta data value
   * @return this payload object
   */
  PayloadResults putMetaInfo(String name, String metaKey, Object metaValue);


  /**
   * Provide a string as a result.
   * @param name the result name
   * @param val the value to store
   * @param unit the physical unit
   * @param descr a description
   * @return this payload object
   */
  PayloadResults put(String name, String val, String descr, String unit);


  /**
   * Provide a string as a result.
   * @param name the result name
   * @param val the value to store
   * @param descr a description
   * @return this payload object
   */
  PayloadResults put(String name, String val, String descr);


  /**
   * Provide a string as a result.
   * @param name the result name
   * @param val the value to store
   * @return this payload object
   */
  PayloadResults put(String name, String val);


  /**
   * Provide an int as a result.
   * @param name the result name
   * @param val the value to store
   * @param unit the physical unit
   * @param descr a description
   * @return this payload object
   */
  PayloadResults put(String name, int val, String descr, String unit);


  /**
   * Provide an int as a result.
   * @param name the result name
   * @param val the value to store
   * @param descr a description
   * @return this payload object
   */
  PayloadResults put(String name, int val, String descr);


  /**
   * Provide an int as a result.
   * @param name the result name
   * @param val the value to store
   * @return this payload object
   */
  PayloadResults put(String name, int val);


  /**
   * Provide a double as a result.
   * @param name the result name
   * @param val the value to store
   * @param unit the physical unit
   * @param descr a description
   * @return this payload object
   */
  PayloadResults put(String name, double val, String descr, String unit);


  /**
   * Provide a double as a result.
   * @param name the result name
   * @param val the value to store
   * @param descr the result description.
   * @return this payload object
   */
  PayloadResults put(String name, double val, String descr);


  /**
   * Provide a double as a result.
   * @param name the result name
   * @param val the value to store
   * @return this payload object
   */
  PayloadResults put(String name, double val);


  /**
   * Provide a boolean as a result.
   * @param name the result name
   * @param val the value to store
   * @param unit the physical unit
   * @param descr a description
   * @return this payload object
   */
  PayloadResults put(String name, boolean val, String descr, String unit);


  /**
   * Provide a boolean as a result.
   * @param name the result name
   * @param val the value to store
   * @param descr a description
   * @return this payload object
   */
  PayloadResults put(String name, boolean val, String descr);


  /**
   * Provide a boolean as a result.
   * @param name the result name
   * @param val the value to store
   * @return this payload object
   */
  PayloadResults put(String name, boolean val);


  /**
   * Provide an Object as a result.
   * @param name the result name
   * @param val the value to store
   * @param descr the description
   * @param unit the unit
   * @return this payload object
   */
  PayloadResults put(String name, Object val, String descr, String unit);


  /**
   * Provide an Object as a result.
   * @param name the result name
   * @param val the value to store
   * @param descr the description
   * @return this payload object
   */
  PayloadResults put(String name, Object val, String descr);


  /**
   * Provide an Object as a result.
   * @param name the result name
   * @param val the value to store
   * @return this payload object
   */
  PayloadResults put(String name, Object val);


  /**
   * Provide a boolean array as a result.
   * @param name the result name
   * @param val the value to store
   * @param unit the physical unit
   * @param descr a description
   * @return this payload object
   */
  PayloadResults put(String name, boolean[] val, String descr, String unit);


  /**
   * Provide a boolean array as a result.
   * @param name the result name
   * @param val the value to store
   * @param descr a description
   * @return this payload object
   */
  PayloadResults put(String name, boolean[] val, String descr);


  /**
   * Provide a boolean array as a result.
   * @param name the result name
   * @param val the value to store
   * @return this payload object
   */
  PayloadResults put(String name, boolean[] val);


  /**
   * Provide a double array as a result.
   * @param name the result name
   * @param val the value to store
   * @param unit the physical unit
   * @param descr a description
   * @return this payload object
   */
  PayloadResults put(String name, double[] val, String descr, String unit);


  /**
   * Provide a double array as a result.
   * @param name the result name
   * @param val the value to store
   * @param descr a description
   * @return this payload object
   */
  PayloadResults put(String name, double[] val, String descr);


  /**
   * Provide a double array as a result.
   * @param name the result name
   * @param val the value to store
   * @return this payload object
   */
  PayloadResults put(String name, double[] val);


  /**
   * Provide a int array as a result.
   * @param name the result name
   * @param val the value to store
   * @param unit the physical unit
   * @param descr a description
   * @return this payload object
   */
  PayloadResults put(String name, int[] val, String descr, String unit);


  /**
   * Provide a int array as a result.
   * @param name the result name
   * @param val the value to store
   * @param descr a description
   * @return this payload object
   */
  PayloadResults put(String name, int[] val, String descr);


  /**
   * Provide a int array as a result.
   * @param name the result name
   * @param val the value to store
   * @return this payload object
   */
  PayloadResults put(String name, int[] val);


  /**
   * Provide a long array as a result.
   * @param name the result name
   * @param val the value to store
   * @param unit the physical unit
   * @param descr a description
   * @return this payload object
   */
  PayloadResults put(String name, long[] val, String descr, String unit);


  /**
   * Provide a long array as a result.
   * @param name the result name
   * @param val the value to store
   * @param descr a description
   * @return this payload object
   */
  PayloadResults put(String name, long[] val, String descr);


  /**
   * Provide a long array as a result.
   * @param name the result name
   * @param val the value to store
   * @return this payload object
   */
  PayloadResults put(String name, long[] val);


  /**
   * Provide a String array as a result.
   * @param name the result name
   * @param val the value to store
   * @param unit the physical unit
   * @param descr a description
   * @return this payload object
   */
  PayloadResults put(String name, String[] val, String descr, String unit);


  /**
   * Provide a String array as a result.
   * @param name the result name
   * @param val the value to store
   * @param descr a description
   * @return this payload object
   */
  PayloadResults put(String name, String[] val, String descr);


  /**
   * Provide a String array as a result.
   * @param name the result name
   * @param val the value to store
   * @return this payload object
   */
  PayloadResults put(String name, String[] val);


  /**
   * Provide a file as a result. If the files represents a folder, it gets added
   * to the result as zip file.
   *
   * @param file the file to add as result.
   * @return this payload object
   */
  PayloadResults put(File file);


  /**
   * Provide a file with description as a result.
   * @param file the result file
   * @param descr the file description
   * @return this payload object
   */
  PayloadResults put(File file, String descr);


  /**
   * Provide multiple files as a result.
   * @param files the files to add as a result
   * @return this payload object
   */
  PayloadResults put(File... files);

}