-
Notifications
You must be signed in to change notification settings - Fork 487
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add getObject{Acl,Attributes}, putObjectFanOut, promptObject APIs
Signed-off-by: Bala.FA <[email protected]>
- Loading branch information
1 parent
0f533e8
commit 9c1f1b4
Showing
26 changed files
with
2,051 additions
and
39 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
* MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2025 MinIO, Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package io.minio; | ||
|
||
/** Argument class of {@link MinioAsyncClient#getObjectAcl} and {@link MinioClient#getObjectAcl}. */ | ||
public class GetObjectAclArgs extends ObjectVersionArgs { | ||
public static Builder builder() { | ||
return new Builder(); | ||
} | ||
|
||
/** Argument builder of {@link GetObjectAclArgs}. */ | ||
public static final class Builder extends ObjectVersionArgs.Builder<Builder, GetObjectAclArgs> {} | ||
} |
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,96 @@ | ||
/* | ||
* MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2025 MinIO, Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package io.minio; | ||
|
||
import java.util.Arrays; | ||
import java.util.List; | ||
import java.util.Objects; | ||
|
||
/** | ||
* Argument class of {@link MinioAsyncClient#getObjectAttributes} and {@link | ||
* MinioClient#getObjectAttributes}. | ||
*/ | ||
public class GetObjectAttributesArgs extends ObjectReadArgs { | ||
private List<String> objectAttributes; | ||
private Integer maxParts; | ||
private Integer partNumberMarker; | ||
|
||
public List<String> objectAttributes() { | ||
return objectAttributes; | ||
} | ||
|
||
public Integer maxParts() { | ||
return maxParts; | ||
} | ||
|
||
public Integer partNumberMarker() { | ||
return partNumberMarker; | ||
} | ||
|
||
public static Builder builder() { | ||
return new Builder(); | ||
} | ||
|
||
/** Argument builder of {@link GetObjectAttributesArgs}. */ | ||
public static final class Builder | ||
extends ObjectReadArgs.Builder<Builder, GetObjectAttributesArgs> { | ||
@Override | ||
protected void validate(GetObjectAttributesArgs args) { | ||
super.validate(args); | ||
validateNotNull(args.objectAttributes, "object attributes"); | ||
} | ||
|
||
public Builder objectAttributes(String[] objectAttributes) { | ||
operations.add( | ||
args -> | ||
args.objectAttributes = | ||
objectAttributes == null ? null : Arrays.asList(objectAttributes)); | ||
return this; | ||
} | ||
|
||
public Builder objectAttributes(List<String> objectAttributes) { | ||
operations.add(args -> args.objectAttributes = objectAttributes); | ||
return this; | ||
} | ||
|
||
public Builder maxParts(Integer maxParts) { | ||
operations.add(args -> args.maxParts = maxParts); | ||
return this; | ||
} | ||
|
||
public Builder partNumberMarker(Integer partNumberMarker) { | ||
operations.add(args -> args.partNumberMarker = partNumberMarker); | ||
return this; | ||
} | ||
} | ||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) return true; | ||
if (!(o instanceof GetObjectAttributesArgs)) return false; | ||
if (!super.equals(o)) return false; | ||
GetObjectAttributesArgs that = (GetObjectAttributesArgs) o; | ||
return Objects.equals(objectAttributes, that.objectAttributes) | ||
&& Objects.equals(maxParts, that.maxParts) | ||
&& Objects.equals(partNumberMarker, that.partNumberMarker); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(super.hashCode(), objectAttributes, maxParts, partNumberMarker); | ||
} | ||
} |
42 changes: 42 additions & 0 deletions
42
api/src/main/java/io/minio/GetObjectAttributesResponse.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,42 @@ | ||
/* | ||
* MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2025 MinIO, Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package io.minio; | ||
|
||
import io.minio.messages.GetObjectAttributesOutput; | ||
import okhttp3.Headers; | ||
|
||
/** | ||
* Response class of {@link MinioAsyncClient#getObjectAttributes} and {@link | ||
* MinioClient#getObjectAttributes}. | ||
*/ | ||
public class GetObjectAttributesResponse extends GenericResponse { | ||
private GetObjectAttributesOutput result; | ||
|
||
public GetObjectAttributesResponse( | ||
Headers headers, | ||
String bucket, | ||
String region, | ||
String object, | ||
GetObjectAttributesOutput result) { | ||
super(headers, bucket, region, object); | ||
this.result = result; | ||
} | ||
|
||
public GetObjectAttributesOutput result() { | ||
return result; | ||
} | ||
} |
Oops, something went wrong.