Tabnine Logo
Util.clearEmpty
Code IndexAdd Tabnine to your IDE (free)

How to use
clearEmpty
method
in
com.cloudinary.Util

Best Java code snippets using com.cloudinary.Util.clearEmpty (Showing top 17 results out of 315)

origin: com.cloudinary/cloudinary-core

public void signRequest(Map<String, Object> params, Map<String, Object> options) {
  String apiKey = ObjectUtils.asString(options.get("api_key"), this.config.apiKey);
  if (apiKey == null)
    throw new IllegalArgumentException("Must supply api_key");
  String apiSecret = ObjectUtils.asString(options.get("api_secret"), this.config.apiSecret);
  if (apiSecret == null)
    throw new IllegalArgumentException("Must supply api_secret");
  Util.clearEmpty(params);
  params.put("signature", this.apiSignRequest(params, apiSecret));
  params.put("api_key", apiKey);
}
origin: cloudinary/cloudinary_java

public void signRequest(Map<String, Object> params, Map<String, Object> options) {
  String apiKey = ObjectUtils.asString(options.get("api_key"), this.config.apiKey);
  if (apiKey == null)
    throw new IllegalArgumentException("Must supply api_key");
  String apiSecret = ObjectUtils.asString(options.get("api_secret"), this.config.apiSecret);
  if (apiSecret == null)
    throw new IllegalArgumentException("Must supply api_secret");
  Util.clearEmpty(params);
  params.put("signature", this.apiSignRequest(params, apiSecret));
  params.put("api_key", apiKey);
}
origin: com.cloudinary/cloudinary

public void signRequest(Map<String, Object> params, Map<String, Object> options) {
  String apiKey = Cloudinary.asString(options.get("api_key"), this.getStringConfig("api_key"));
  if (apiKey == null)
    throw new IllegalArgumentException("Must supply api_key");
  String apiSecret = Cloudinary.asString(options.get("api_secret"), this.getStringConfig("api_secret"));
  if (apiSecret == null)
    throw new IllegalArgumentException("Must supply api_secret");
  Util.clearEmpty(params);
  params.put("signature", this.apiSignRequest(params, apiSecret));
  params.put("api_key", apiKey);
}
origin: com.cloudinary/cloudinary

public String uploadTagParams(Map options) {
  if (options == null) options = new HashMap();
  if (options.get("resource_type") == null) { 
    options = new HashMap(options);
    options.put("resource_type", "auto");
  }
  
  String callback = Cloudinary.asString(options.get("callback"), this.cloudinary.getStringConfig("callback"));
  if (callback == null) {
    throw new IllegalArgumentException("Must supply callback");
  }
  options.put("callback", callback);
  
  Map<String, Object> params = this.buildUploadParams(options);
  if (options.get("unsigned") == null || Boolean.FALSE.equals(options.get("unsigned"))) {
    signRequestParams(params, options);
  } else {
    Util.clearEmpty(params);
  }
  
  return JSONObject.toJSONString(params);
}

origin: com.cloudinary/cloudinary-core

public String uploadTagParams(Map options) {
  if (options == null)
    options = new HashMap();
  if (options.get("resource_type") == null) {
    options = new HashMap(options);
    options.put("resource_type", "auto");
  }
  String callback = ObjectUtils.asString(options.get("callback"), this.cloudinary.config.callback);
  if (callback == null) {
    throw new IllegalArgumentException("Must supply callback");
  }
  options.put("callback", callback);
  Map<String, Object> params = this.buildUploadParams(options);
  if (options.get("unsigned") == null || Boolean.FALSE.equals(options.get("unsigned"))) {
    signRequestParams(params, options);
  } else {
    Util.clearEmpty(params);
  }
  return JSONObject.valueToString(params);
}
origin: cloudinary/cloudinary_java

public String uploadTagParams(Map options) {
  if (options == null)
    options = new HashMap();
  if (options.get("resource_type") == null) {
    options = new HashMap(options);
    options.put("resource_type", "auto");
  }
  String callback = ObjectUtils.asString(options.get("callback"), this.cloudinary.config.callback);
  if (callback == null) {
    throw new IllegalArgumentException("Must supply callback");
  }
  options.put("callback", callback);
  Map<String, Object> params = this.buildUploadParams(options);
  if (options.get("unsigned") == null || Boolean.FALSE.equals(options.get("unsigned"))) {
    signRequestParams(params, options);
  } else {
    Util.clearEmpty(params);
  }
  return JSONObject.valueToString(params);
}
origin: com.cloudinary/cloudinary-core

public ApiResponse updateUploadPreset(String name, Map options) throws Exception {
  if (options == null) options = ObjectUtils.emptyMap();
  Map params = Util.buildUploadParams(options);
  Util.clearEmpty(params);
  params.putAll(ObjectUtils.only(options, "unsigned", "disallow_public_id"));
  return callApi(HttpMethod.PUT, Arrays.asList("upload_presets", name), params, options);
}
origin: com.cloudinary/cloudinary

public ApiResponse updateUploadPreset(String name, Map options) throws Exception {
  if (options == null) options = Cloudinary.emptyMap();
  Map params = Util.buildUploadParams(options);
  Util.clearEmpty(params);
  params.putAll(Cloudinary.only(options, "unsigned", "disallow_public_id"));
  return callApi(HttpMethod.PUT, Arrays.asList("upload_presets", name), params, options);
}
origin: cloudinary/cloudinary_java

public ApiResponse updateUploadPreset(String name, Map options) throws Exception {
  if (options == null) options = ObjectUtils.emptyMap();
  Map params = Util.buildUploadParams(options);
  Util.clearEmpty(params);
  params.putAll(ObjectUtils.only(options, "unsigned", "disallow_public_id"));
  return callApi(HttpMethod.PUT, Arrays.asList("upload_presets", name), params, options);
}
origin: com.cloudinary/cloudinary

public ApiResponse createUploadPreset(Map options) throws Exception {
  if (options == null) options = Cloudinary.emptyMap();
  Map params = Util.buildUploadParams(options);
  Util.clearEmpty(params);
  params.putAll(Cloudinary.only(options, "name", "unsigned", "disallow_public_id"));
  return callApi(HttpMethod.POST,  Arrays.asList("upload_presets"), params, options);
}

origin: com.cloudinary/cloudinary-core

public ApiResponse createUploadPreset(Map options) throws Exception {
  if (options == null) options = ObjectUtils.emptyMap();
  Map params = Util.buildUploadParams(options);
  Util.clearEmpty(params);
  params.putAll(ObjectUtils.only(options, "name", "unsigned", "disallow_public_id"));
  return callApi(HttpMethod.POST, Arrays.asList("upload_presets"), params, options);
}
origin: cloudinary/cloudinary_java

public ApiResponse createUploadPreset(Map options) throws Exception {
  if (options == null) options = ObjectUtils.emptyMap();
  Map params = Util.buildUploadParams(options);
  Util.clearEmpty(params);
  params.putAll(ObjectUtils.only(options, "name", "unsigned", "disallow_public_id"));
  return callApi(HttpMethod.POST, Arrays.asList("upload_presets"), params, options);
}
origin: com.cloudinary/cloudinary

  signRequestParams(params, options);
} else {
  Util.clearEmpty(params);
origin: cloudinary/cloudinary_java

  uploader.signRequestParams(params, options);
} else {
  Util.clearEmpty(params);
origin: cloudinary/cloudinary_java

  uploader.signRequestParams(params, options);
} else {
  Util.clearEmpty(params);
origin: com.cloudinary/cloudinary-http44

  uploader.signRequestParams(params, options);
} else {
  Util.clearEmpty(params);
origin: cloudinary/cloudinary_java

  uploader.signRequestParams(params, options);
} else {
  Util.clearEmpty(params);
com.cloudinaryUtilclearEmpty

Popular methods of Util

  • buildCustomHeaders
  • buildEager
  • buildUploadParams
  • encodeContext
  • processWriteParameters
  • buildArchiveParams
  • encodeAccessControl
  • putArray
  • putBoolean
  • putEager
  • putObject
  • timestamp
  • putObject,
  • timestamp

Popular in Java

  • Finding current android device location
  • getResourceAsStream (ClassLoader)
  • compareTo (BigDecimal)
  • putExtra (Intent)
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • StringTokenizer (java.util)
    Breaks a string into tokens; new code should probably use String#split.> // Legacy code: StringTo
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • Reference (javax.naming)
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now