Skip to content

Commit

Permalink
Merge branch 'master' into dependabot/gradle/ch.qos.logback-logback-c…
Browse files Browse the repository at this point in the history
…lassic-1.4.11
  • Loading branch information
owarai authored Apr 21, 2024
2 parents 09f6f5b + d0c0d44 commit 131907e
Show file tree
Hide file tree
Showing 42 changed files with 506 additions and 326 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -60,7 +60,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -73,4 +73,4 @@ jobs:
# env GRADLE_OPTS="-Dorg.gradle.daemon=false -Dorg.gradle.workers.max=3 -Xmx768m" ./gradlew --parallel --build-cache downloadDependencies testClasses

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v2
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@

All notable changes to QingStor SDK for JAVA will be documented in this file.

## [v2.6.4] - 2024-04-17

### Fixed

- Update jackson to address vulnerability issue.

## [v2.6.3] - 2024-01-15

### Fixed

- Update okhttp & jackson to address several vulnerability issues.

## [v2.6.2] - 2023-07-28

### Fixed
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@

[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.yunify/qingstor.sdk.java/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.yunify/qingstor.sdk.java)
![Build Status](https://github.com/qingstor/qingstor-sdk-java/workflows/Unit%20Test/badge.svg)
[![API Reference](https://img.shields.io/badge/api-reference-green.svg)](https://docs.qingcloud.com)
[![API Reference](https://img.shields.io/badge/api-reference-green.svg)](https://docsv4.qingcloud.com/user_guide/storage/object_storage/)
[![License](https://img.shields.io/badge/license-apache%20v2-blue.svg)](https://github.com/yunify/qingstor-sdk-Java/blob/master/LICENSE)

English | [中文](README_zh-CN.md)

The official QingStor SDK for the Java programming language.

Before you start using the SDK, make sure you have a basic understanding of the concepts of [QingStor object storage](https://docs.qingcloud.com/qingstor/api/common/overview.html) (such as Zone, Service, Bucket, Object, etc.).
Before you start using the SDK, make sure you have a basic understanding of the concepts of [QingStor object storage](https://docsv4.qingcloud.com/user_guide/storage/object_storage/intro/product/) (such as Zone, Service, Bucket, Object, etc.).

This SDK try to keep a one-to-one correspondence with the methods on the [QingCloud QingStor object storage documentation](https://docs.qingcloud.com/qingstor/api/). For details of each method, please refer to the corresponding chapter in the link.
This SDK try to keep a one-to-one correspondence with the methods on the [QingCloud QingStor object storage documentation](https://docsv4.qingcloud.com/user_guide/storage/object_storage/api/). For details of each method, please refer to the corresponding chapter in the link.

You can see documents containing the complete package structure here: [javadoc](https://javadoc.io/doc/com.yunify/qingstor.sdk.java).

Expand All @@ -29,9 +29,9 @@ Checkout our [releases](https://github.com/qingstor/qingstor-sdk-java/releases)

## Reference Documentations

- [QingStor Documentation](https://docs.qingcloud.com/qingstor/index.html)
- [QingStor Guide](https://docs.qingcloud.com/qingstor/guide/index.html)
- [QingStor APIs](https://docs.qingcloud.com/qingstor/api/index.html)
- [QingStor Documentation](https://docsv4.qingcloud.com/user_guide/storage/object_storage/intro/product/)
- [QingStor Guide](https://docsv4.qingcloud.com/user_guide/storage/object_storage/)
- [QingStor APIs](https://docsv4.qingcloud.com/user_guide/storage/object_storage/api/)

## Contributing

Expand Down
12 changes: 6 additions & 6 deletions README_zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@

[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.yunify/qingstor.sdk.java/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.yunify/qingstor.sdk.java)
![Build Status](https://github.com/qingstor/qingstor-sdk-java/workflows/Unit%20Test/badge.svg)
[![API Reference](https://img.shields.io/badge/api-reference-green.svg)](https://docs.qingcloud.com)
[![API Reference](https://img.shields.io/badge/api-reference-green.svg)](https://docsv4.qingcloud.com/user_guide/storage/object_storage/)
[![License](https://img.shields.io/badge/license-apache%20v2-blue.svg)](https://github.com/yunify/qingstor-sdk-Java/blob/master/LICENSE)

[English](README.md) | 中文

Java 语言版本的 QingStor 官方 SDK.

在开始使用 SDK 之前,请确保你对[青云 QingStor 对象存储基本概念](https://docs.qingcloud.com/qingstor/api/common/overview.html)(如 Zone,Service,Bucket,Object 等)有一定的了解。
在开始使用 SDK 之前,请确保你对[青云 QingStor 对象存储基本概念](https://docsv4.qingcloud.com/user_guide/storage/object_storage/intro/product/)(如 Zone,Service,Bucket,Object 等)有一定的了解。

本 SDK 与[青云 QingStor 对象存储帮助文档](https://docs.qingcloud.com/qingstor/api/)上的方法尽量保持一一对应,具体每个方法的详细说明请查看上述链接中的对应章节。
本 SDK 与[青云 QingStor 对象存储帮助文档](https://docsv4.qingcloud.com/user_guide/storage/object_storage/api/)上的方法尽量保持一一对应,具体每个方法的详细说明请查看上述链接中的对应章节。

您可以在此处查看包含完整软件包结构的文档: [javadoc](https://javadoc.io/doc/com.yunify/qingstor.sdk.java).

Expand All @@ -29,9 +29,9 @@ Java 语言版本的 QingStor 官方 SDK.

## 参考文档

- [QingStor 文档](https://docs.qingcloud.com/qingstor/index.html)
- [QingStor 指南](https://docs.qingcloud.com/qingstor/guide/index.html)
- [QingStor APIs](https://docs.qingcloud.com/qingstor/api/index.html)
- [QingStor 文档](https://docsv4.qingcloud.com/user_guide/storage/object_storage/intro/product/)
- [QingStor 指南](https://docsv4.qingcloud.com/user_guide/storage/object_storage/)
- [QingStor APIs](https://docsv4.qingcloud.com/user_guide/storage/object_storage/api/)

## 贡献

Expand Down
10 changes: 5 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ plugins {

group = 'com.yunify'
// Pass command-line option: -Psdk_version=x.x.x if you want build a different version.
version = findProperty('sdk_version') ?: '2.6.2'
version = findProperty('sdk_version') ?: '2.6.4'

repositories {
mavenCentral()
Expand Down Expand Up @@ -145,11 +145,11 @@ configurations {

// In this section you declare the dependencies for your production and test code
dependencies {
api 'com.squareup.okhttp3:okhttp:4.9.2'
api 'com.squareup.okhttp3:okhttp:4.12.0'

implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.9.10'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.9.10.8'
implementation 'org.json:json:20230227'
implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.15.3'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.15.3'
implementation 'org.json:json:20231013'
// it's library's consumer's responsibility to choose a log implementation(and set log_level.)
implementation 'org.slf4j:slf4j-api:1.7.32'
testImplementation 'io.cucumber:cucumber-java:7.0.0'
Expand Down
4 changes: 3 additions & 1 deletion docs/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@ enable_virtual_host_style: false
# cname_support is used when you want access object use your own domain.
# You can aliasing a bucket by adding cname record to map your own domain to some bucket of qingstor.
# then you can access your object of this bucket use your url with object path.
# Note: if this value is set to true, enable_virtual_host_style must be true too.
# if this value is set to true, Note:
# 1. `endpoint` or `host/port/protocol` config item should use custom domain instead;
# 2. enable_virtual_host_style must be true too.
cname_support: false

# optional
Expand Down
6 changes: 4 additions & 2 deletions docs/config_zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,10 @@ endpoint: "https://qingstor.com"
# Also replace previous config item: virtual_host_enabled.
enable_virtual_host_style: false

# 当您希望访问对象使用您自己的域时使用 cname_support(需要先在对象存储中添加对应 cname record)。
# 注意:如果此值设置为 true,则 enable_virtual_host_style 也必须为 true。
# 如果您希望使用自定义域名而非对象域名来访问对象资源时, 可以开启 cname_support(需要先在对象存储中添加对应 cname 记录)。
# 如果此值设置为 true,注意:
# 1. endpoint 配置和 host/port/protocol 配置替换为您的自定义域名
# 2. enable_virtual_host_style 也必须为 true
cname_support: false

# optional
Expand Down
2 changes: 1 addition & 1 deletion docs/example/auto_upload.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Default mehtods of UploadManagerCallback :

- onCorrectTime(): If you need correct your local time, override this method and return the time of server.

You can also see 'Solutions Of App Integration' https://docs.qingcloud.com/qingstor/solutions/app_integration.html , while the access key is not kept in the client.
You can also see 'Solutions Of App Integration' https://docsv4.qingcloud.com/user_guide/storage/object_storage/beat_practices/app_integration/ , while the access key is not kept in the client.

Attention: the method 'put()' used to upload a file,
will create a sync request to upload.
Expand Down
2 changes: 1 addition & 1 deletion docs/example/auto_upload_zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ UploadManagerCallback 的默认方法 (Default methods) 说明:

- onCorrectTime() 方法:在您需要校准本地时间时,请重写该方法,并返回服务端时间。

对于在上传客户端不保存 access key 的情况,还可以配合 “移动 App 接入方案” https://docs.qingcloud.com/qingstor/solutions/app_integration.html 使用。
对于在上传客户端不保存 access key 的情况,还可以配合 “移动 App 接入方案” https://docsv4.qingcloud.com/user_guide/storage/object_storage/beat_practices/app_integration/ 使用。

注意:使用 'put()' 方法上传文件时,会创建同步请求来上传。

Expand Down
2 changes: 1 addition & 1 deletion docs/example/encryption.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

You can encrypt data when uploading.

To understand the process of encryption better, visit the link [https://docs.qingcloud.com/qingstor/api/common/encryption.html#object-storage-encryption-headers](https://docs.qingcloud.com/qingstor/api/common/encryption.html#object-storage-encryption-headers) .
To understand the process of encryption better, visit the link [https://docsv4.qingcloud.com/user_guide/storage/object_storage/api/object/encryption/](https://docsv4.qingcloud.com/user_guide/storage/object_storage/api/object/encryption/) .

#### Encryption Example Of Uploading

Expand Down
2 changes: 1 addition & 1 deletion docs/example/encryption_zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

上传时可对数据进行加密。

访问该链接 [https://docs.qingcloud.com/qingstor/api/common/encryption.html#object-storage-encryption-headers](https://docs.qingcloud.com/qingstor/api/common/encryption.html#object-storage-encryption-headers) .
访问该链接 [https://docsv4.qingcloud.com/user_guide/storage/object_storage/api/object/encryption/](https://docsv4.qingcloud.com/user_guide/storage/object_storage/api/object/encryption/) .
以更好的理解数据加密解密的过程。

#### 上传文件时加密
Expand Down
2 changes: 1 addition & 1 deletion docs/example/get_set_http_headers.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,4 +224,4 @@ if (copyObjectSelfOutput.getStatueCode() == 200 || copyObjectSelfOutput.getStatu
}
```

You can also visit [API Docs](https://docs.qingcloud.com/qingstor/api/common/metadata) for more information about how to define metadata.
You can also visit [API Docs](https://docsv4.qingcloud.com/user_guide/storage/object_storage/api/metadata/) for more information about how to define metadata.
2 changes: 1 addition & 1 deletion docs/example/get_set_http_headers_zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,4 +224,4 @@ if (copyObjectSelfOutput.getStatueCode() == 200 || copyObjectSelfOutput.getStatu
}
```

您也可以访问 [API Docs](https://docs.qingcloud.com/qingstor/api/common/metadata) 以查看更多关于自定义元数据的信息。
您也可以访问 [API Docs](https://docsv4.qingcloud.com/user_guide/storage/object_storage/api/metadata/) 以查看更多关于自定义元数据的信息。
2 changes: 1 addition & 1 deletion docs/example/image_process.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ The image formats that are currently supported are these below:
See the demo below to do image process use ImageProgressClient.

See [API Docs](https://docs.qingcloud.com/qingstor/data_process/image_process/) for more information.
See [API Docs](https://docsv4.qingcloud.com/user_guide/storage/object_storage/api/object/image_process/) for more information.

## Code Snippet

Expand Down
2 changes: 1 addition & 1 deletion docs/example/image_process_zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

> 目前不支持对加密过后的图片进行处理,单张图片最大为 10M 。
您可以参考以下示例使用 ImageProcessClient 对图片进行处理。具体文档说明参考 [API Docs](https://docs.qingcloud.com/qingstor/data_process/image_process/)
您可以参考以下示例使用 ImageProcessClient 对图片进行处理。具体文档说明参考 [API Docs](https://docsv4.qingcloud.com/user_guide/storage/object_storage/api/object/image_process/)

## 代码片段

Expand Down
4 changes: 2 additions & 2 deletions docs/example/list_multipart_uploads.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ This operation returns at most 1,000 multipart uploads in the response. 1,000 mu

In the response, the uploads are sorted by key. If your application has initiated more than one multipart upload using the same object key, then uploads in the response are first sorted by key. Additionally, uploads are sorted in ascending order within each key by the upload initiation time.

For information on permissions required to use the multipart upload API, see Multipart Upload API and Permissions in [API Docs](https://docs.qingcloud.com/qingstor/api/object/multipart/list_multipart.html#object-storage-api-list-multipart).
For information on permissions required to use the multipart upload API, see Multipart Upload API and Permissions in [API Docs](https://docsv4.qingcloud.com/user_guide/storage/object_storage/api/object/multipart/list/).

### Request Parameters

You can add some options when list multipart uploads.

You can set options below in ListMultipartUploadsInput. See controlled [API Docs](https://docs.qingcloud.com/qingstor/api/bucket/list_multipart_uploads.html).
You can set options below in ListMultipartUploadsInput. See controlled [API Docs](https://docsv4.qingcloud.com/user_guide/storage/object_storage/api/object/multipart/list/).

| Parameter name | Type | Description | Required |
| :--------------: | :-----: | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :------: |
Expand Down
4 changes: 2 additions & 2 deletions docs/example/list_multipart_uploads_zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@

与 GET Bucket (List Objects) 接口类似,用户可以通过传递 prefix, delimiter 请求参数,指定获取某个目录下面正在进行的分段上传。列表按照对象名称的 alphanumeric 顺序从小到大排序。如果同名对象有多个分段上传,翻页被截断后只显示了一部分,下次翻页可通过 upload_id_marker 参数,获取该 upload_id 往后按创建时间排序后剩下的分段上传。

如果用户只想获取某个对象已经上传的分段,请查阅 [API Docs](https://docs.qingcloud.com/qingstor/api/object/multipart/list_multipart.html#object-storage-api-list-multipart).
如果用户只想获取某个对象已经上传的分段,请查阅 [API Docs](https://docsv4.qingcloud.com/user_guide/storage/object_storage/api/object/multipart/list/).

### 请求参数

在 List Bucket Objects 时添加筛选条件

参考[对应的 API 文档](https://docs.qingcloud.com/qingstor/api/bucket/list_multipart_uploads.html),您可以在对应的 Input 设置并添加如下筛选条件:
参考[对应的 API 文档](https://docsv4.qingcloud.com/user_guide/storage/object_storage/api/object/multipart/list/),您可以在对应的 Input 设置并添加如下筛选条件:

| 参数名 | 类型 | 描述 | 是否必要 |
| :--------------: | :-----: | :-------------------------------------------------------------------------------------------------- | :------: |
Expand Down
2 changes: 1 addition & 1 deletion docs/example/list_objects.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ List<KeyModel> objectKeys = listObjectsOutput.getKeys();

Add some options when list bucket objects

You can set options below in ListObjectsInput. See controlled [API Docs](https://docs.qingcloud.com/qingstor/api/bucket/get).
You can set options below in ListObjectsInput. See controlled [API Docs](https://docsv4.qingcloud.com/user_guide/storage/object_storage/api/bucket/basic_opt/get/).

| Parameter name | Type | Description | Required |
| :------------: | :-----: | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :------: |
Expand Down
2 changes: 1 addition & 1 deletion docs/example/list_objects_zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ List<KeyModel> objectKeys = listObjectsOutput.getKeys();

在 List Bucket Objects 时添加筛选条件

参考[对应的 API 文档](https://docs.qingcloud.com/qingstor/api/bucket/get),您可以在对应的 Input 设置并添加如下筛选条件:
参考[对应的 API 文档](https://docsv4.qingcloud.com/user_guide/storage/object_storage/api/bucket/basic_opt/get/),您可以在对应的 Input 设置并添加如下筛选条件:

| 参数名称 | 类型 | 描述 | 是否必须 |
| :-------: | :-----: | :-----------------------------------------------------------------------------------------------------------------: | :------: |
Expand Down
Loading

0 comments on commit 131907e

Please sign in to comment.