Package org.parse4j.command

Examples of org.parse4j.command.ParseUploadCommand


  public void save(SaveCallback saveCallback,
      ProgressCallback progressCallback) throws ParseException {
   
    if(!isDirty() || data == null) return;
   
    ParseUploadCommand command = new ParseUploadCommand(getEndPoint());
    command.setProgressCallback(progressCallback);
    command.setData(data);
    if(getContentType() == null) {
      String fileExtension = MimeType.getFileExtension(getName());
      contentType = MimeType.getMimeType(fileExtension);
      command.setContentType(contentType);
    }
    else {
      command.setContentType(getContentType());
    }
    ParseResponse response = command.perform();
    if(!response.isFailed()) {
      JSONObject jsonResponse = response.getJsonObject();
      System.out.println(jsonResponse);
      if (jsonResponse == null) {
        LOGGER.error("Empty response.");
View Full Code Here

TOP

Related Classes of org.parse4j.command.ParseUploadCommand

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.