com.cloudinary.Util.clearEmpty()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(7.5k)|赞(0)|评价(0)|浏览(478)

本文整理了Java中com.cloudinary.Util.clearEmpty()方法的一些代码示例,展示了Util.clearEmpty()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Util.clearEmpty()方法的具体详情如下:
包路径:com.cloudinary.Util
类名称:Util
方法名:clearEmpty

Util.clearEmpty介绍

暂无

代码示例

代码示例来源: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);

相关文章