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

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

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

Util.putObject介绍

暂无

代码示例

代码示例来源:origin: com.cloudinary/cloudinary-core

private static void putObject(String name, Map from, Map<String, Object> to) {
  putObject(name, from, to, null);
}

代码示例来源:origin: cloudinary/cloudinary_java

private static void putObject(String name, Map from, Map<String, Object> to) {
  putObject(name, from, to, null);
}

代码示例来源:origin: cloudinary/cloudinary_java

@SuppressWarnings("unchecked")
public static final void processWriteParameters(Map<String, Object> options, Map<String, Object> params) {
  if (options.get("headers") != null)
    params.put("headers", buildCustomHeaders(options.get("headers")));
  if (options.get("tags") != null)
    params.put("tags", StringUtils.join(ObjectUtils.asArray(options.get("tags")), ","));
  if (options.get("face_coordinates") != null)
    params.put("face_coordinates", Coordinates.parseCoordinates(options.get("face_coordinates")).toString());
  if (options.get("custom_coordinates") != null)
    params.put("custom_coordinates", Coordinates.parseCoordinates(options.get("custom_coordinates")).toString());
  if (options.get("context") != null)
    params.put("context", encodeContext(options.get("context")));
  if (options.get("access_control") != null) {
    params.put("access_control", encodeAccessControl(options.get("access_control")));
  }
  putObject("ocr", options, params);
  putObject("raw_convert", options, params);
  putObject("categorization", options, params);
  putObject("detection", options, params);
  putObject("similarity_search", options, params);
  putObject("background_removal", options, params);
  if (options.get("auto_tagging") != null)
    params.put("auto_tagging", ObjectUtils.asFloat(options.get("auto_tagging")));
}

代码示例来源:origin: com.cloudinary/cloudinary-core

@SuppressWarnings("unchecked")
public static final void processWriteParameters(Map<String, Object> options, Map<String, Object> params) {
  if (options.get("headers") != null)
    params.put("headers", buildCustomHeaders(options.get("headers")));
  if (options.get("tags") != null)
    params.put("tags", StringUtils.join(ObjectUtils.asArray(options.get("tags")), ","));
  if (options.get("face_coordinates") != null)
    params.put("face_coordinates", Coordinates.parseCoordinates(options.get("face_coordinates")).toString());
  if (options.get("custom_coordinates") != null)
    params.put("custom_coordinates", Coordinates.parseCoordinates(options.get("custom_coordinates")).toString());
  if (options.get("context") != null)
    params.put("context", encodeContext(options.get("context")));
  if (options.get("access_control") != null) {
    params.put("access_control", encodeAccessControl(options.get("access_control")));
  }
  putObject("ocr", options, params);
  putObject("raw_convert", options, params);
  putObject("categorization", options, params);
  putObject("detection", options, params);
  putObject("similarity_search", options, params);
  putObject("background_removal", options, params);
  if (options.get("auto_tagging") != null)
    params.put("auto_tagging", ObjectUtils.asFloat(options.get("auto_tagging")));
}

代码示例来源:origin: com.cloudinary/cloudinary-core

@SuppressWarnings({"rawtypes", "unchecked"})
public static final Map<String, Object> buildArchiveParams(Map options, String targetFormat) {
  Map<String, Object> params = new HashMap<String, Object>();
  if (options != null && options.size() > 0){
    params.put("type", options.get("type"));
    params.put("mode", options.get("mode"));
    params.put("target_format", targetFormat);
    params.put("target_public_id", options.get("target_public_id"));
    putBoolean("flatten_folders", options, params);
    putBoolean("flatten_transformations", options, params);
    putBoolean("use_original_filename", options, params);
    putBoolean("async", options, params);
    putBoolean("keep_derived", options, params);
    params.put("notification_url", options.get("notification_url"));
    putArray("target_tags", options, params);
    putArray("tags", options, params);
    putArray("public_ids", options, params);
    putArray("prefixes", options, params);
    putEager("transformations", options, params);
    putObject("timestamp", options, params, Util.timestamp());
    putBoolean("skip_transformation_name", options, params);
    putBoolean("allow_missing", options, params);
    putObject("expires_at", options, params);
  }
  return params;
}

代码示例来源:origin: cloudinary/cloudinary_java

@SuppressWarnings({"rawtypes", "unchecked"})
public static final Map<String, Object> buildArchiveParams(Map options, String targetFormat) {
  Map<String, Object> params = new HashMap<String, Object>();
  if (options != null && options.size() > 0){
    params.put("type", options.get("type"));
    params.put("mode", options.get("mode"));
    params.put("target_format", targetFormat);
    params.put("target_public_id", options.get("target_public_id"));
    putBoolean("flatten_folders", options, params);
    putBoolean("flatten_transformations", options, params);
    putBoolean("use_original_filename", options, params);
    putBoolean("async", options, params);
    putBoolean("keep_derived", options, params);
    params.put("notification_url", options.get("notification_url"));
    putArray("target_tags", options, params);
    putArray("tags", options, params);
    putArray("public_ids", options, params);
    putArray("prefixes", options, params);
    putEager("transformations", options, params);
    putObject("timestamp", options, params, Util.timestamp());
    putBoolean("skip_transformation_name", options, params);
    putBoolean("allow_missing", options, params);
    putObject("expires_at", options, params);
  }
  return params;
}

相关文章