Android Open Source - transloadit-Android-sdk Api Data






From Project

Back to project page transloadit-Android-sdk.

License

The source code is released under:

MIT License

If you think the Android project transloadit-Android-sdk listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package hu.szabot.transloadit;
//from w  ww  . ja  va 2  s  . c om
import java.io.File;
import java.util.HashMap;
import java.util.Map;

/**Stores information which can be sent. This object not parsed.*/
public class ApiData
{
    /**Data fields of a request (key - value pairs)*/
    public Map<String, String> fields;
    
    /**Params field of a request (key - value pairs)*/
    public Map<String, Object> params;

    /**File objects of the files which will be sent*/
    public Map<String, File> files;

    /**Creates new ApiData object. sets Fields and Files to empty collections*/
    public ApiData()
    {
        fields=new HashMap<String, String>();
        files=new HashMap<String, File>();
        params=new HashMap<String, Object>();
    }

    /**Gets the data fields of a request (key - value pairs)*/
  public Map<String, String> getFields() {
    return fields;
  }

  /**Gets the File objects of the files which will be sent*/
  public Map<String, File> getFiles() {
    return files;
  }

  /**Add a custom field property (key - value pairs)*/
  public void addField(String key, String value) 
  {
    fields.put(key, value);
  }
  
  /**Add a File object of the files which will be sent*/
  public void addFile(String key,File file) 
  {
    files.put(key, file);
  }
    
  /**Add a params field property (key - value pairs)*/
  public void addParam(String key,Object value) 
  {
    params.put(key, value);
  }
  
  /**Sets data fields of a request (key - value pairs)*/
  public void setFields(HashMap<String, String> fields) {
    this.fields = fields;
  }
  
  /**Sets the File objects of the files which will be sent*/
  public void setFiles(HashMap<String, File> files) {
    this.files = files;
  }
  
  /**Gets params field of a request (key - value pairs)*/
  public Map<String, Object> getParams() {
    return params;
  }
  
  /**Sets params field of a request (key - value pairs)*/
  public void setParams(HashMap<String, Object> params) {
    this.params = params;
  }
}




Java Source Code List

hu.szabot.transloadit.ApiData.java
hu.szabot.transloadit.IApiRequest.java
hu.szabot.transloadit.IApiResponse.java
hu.szabot.transloadit.ITransloadit.java
hu.szabot.transloadit.TransloaditRequest.java
hu.szabot.transloadit.TransloaditResponse.java
hu.szabot.transloadit.Transloadit.java
hu.szabot.transloadit.assembly.AssemblyBuilder.java
hu.szabot.transloadit.assembly.IAssemblyBuilder.java
hu.szabot.transloadit.assembly.IStep.java
hu.szabot.transloadit.assembly.Step.java
hu.szabot.transloadit.assembly.exceptions.AlreadyDefinedKeyException.java
hu.szabot.transloadit.assembly.exceptions.InvalidFieldKeyException.java
hu.szabot.transloadit.exceptions.FileNotOpenableException.java
hu.szabot.transloadit.exceptions.NotParseableException.java
hu.szabot.transloadit.executor.DefaultHttpExecutor.java
hu.szabot.transloadit.executor.IRequestExecutor.java
hu.szabot.transloadit.executor.ParsedApiData.java
hu.szabot.transloadit.log.TransloaditLogger.java
hu.szabot.transloadit.parser.IRequestParser.java
hu.szabot.transloadit.parser.IResponseParser.java
hu.szabot.transloadit.parser.JSONRequestParser.java
hu.szabot.transloadit.parser.JSONResponseParser.java
hu.szabot.transloadit.utils.ShaUtils.java