-
Notifications
You must be signed in to change notification settings - Fork 530
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(java): add WriteOptions for write methods
- Loading branch information
Showing
10 changed files
with
382 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
69 changes: 69 additions & 0 deletions
69
bindings/java/src/main/java/org/apache/opendal/WriteOptions.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
package org.apache.opendal; | ||
|
||
import java.util.Map; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Getter | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
@Builder | ||
public class WriteOptions { | ||
|
||
/** | ||
* Sets the Content-Type header for the object. | ||
* Requires capability: writeWithContentType | ||
*/ | ||
private String contentType; | ||
|
||
/** | ||
* Sets the Content-Disposition header for the object | ||
* Requires capability: writeWithContentDisposition | ||
*/ | ||
private String contentDisposition; | ||
|
||
/** | ||
* Sets the Cache-Control header for the object | ||
* Requires capability: writeWithCacheControl | ||
*/ | ||
private String cacheControl; | ||
|
||
/** | ||
* Sets the Content-Encoding header for the object | ||
*/ | ||
private String contentEncoding; | ||
|
||
/** | ||
* Sets the If-Match header for conditional writes | ||
* Requires capability: writeWithIfMatch | ||
*/ | ||
private String ifMatch; | ||
|
||
/** | ||
* Sets the If-None-Match header for conditional writes | ||
* Requires capability: writeWithIfNoneMatch | ||
*/ | ||
private String ifNoneMatch; | ||
|
||
/** | ||
* Sets custom metadata for the file. | ||
* Requires capability: writeWithUserMetadata | ||
*/ | ||
private Map<String, String> userMetadata; | ||
|
||
/** | ||
* Enables append mode for writing. | ||
* When true, data will be appended to the end of existing file. | ||
* Requires capability: writeCanAppend | ||
*/ | ||
private boolean append; | ||
|
||
/** | ||
* Write only if the file does not exist. | ||
* Operation will fail if the file at the designated path already exists. | ||
* Requires capability: writeWithIfNotExists | ||
*/ | ||
private boolean ifNotExists; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.