-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
54 changed files
with
685 additions
and
476 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
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
22 changes: 22 additions & 0 deletions
22
...r/src/main/java/com/jmsoftware/maf/osscenter/read/entity/SerializableGenericResponse.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,22 @@ | ||
package com.jmsoftware.maf.osscenter.read.entity; | ||
|
||
import lombok.AccessLevel; | ||
import lombok.Data; | ||
import lombok.Setter; | ||
|
||
import java.util.List; | ||
import java.util.Map; | ||
|
||
/** | ||
* Description: SerializableGenericResponse, change description here. | ||
* | ||
* @author Johnny Miller (锺俊), email: johnnysviva@outlook.com, date: 8/12/2021 5:07 PM | ||
**/ | ||
@Data | ||
@Setter(AccessLevel.PROTECTED) | ||
public class SerializableGenericResponse { | ||
private Map<String, List<String>> headers; | ||
private String bucket; | ||
private String region; | ||
private String object; | ||
} |
45 changes: 45 additions & 0 deletions
45
...rc/main/java/com/jmsoftware/maf/osscenter/read/entity/SerializableStatObjectResponse.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,45 @@ | ||
package com.jmsoftware.maf.osscenter.read.entity; | ||
|
||
import io.minio.StatObjectResponse; | ||
import io.minio.messages.LegalHold; | ||
import io.minio.messages.RetentionMode; | ||
import lombok.*; | ||
|
||
import java.time.ZonedDateTime; | ||
import java.util.Map; | ||
|
||
/** | ||
* Description: SerializableStatObjectResponse, change description here. | ||
* | ||
* @author Johnny Miller (锺俊), email: johnnysviva@outlook.com, date: 8/12/2021 5:04 PM | ||
**/ | ||
@Data | ||
@Setter(AccessLevel.NONE) | ||
@EqualsAndHashCode(callSuper = true) | ||
public class SerializableStatObjectResponse extends SerializableGenericResponse { | ||
private String etag; | ||
private long size; | ||
private ZonedDateTime lastModified; | ||
private RetentionMode retentionMode; | ||
private ZonedDateTime retentionRetainUntilDate; | ||
private LegalHold legalHold; | ||
private boolean deleteMarker; | ||
private Map<String, String> userMetadata; | ||
|
||
public static SerializableStatObjectResponse build(StatObjectResponse statObjectResponse) { | ||
val serializableStatObjectResponse = new SerializableStatObjectResponse(); | ||
serializableStatObjectResponse.setHeaders(statObjectResponse.headers().toMultimap()); | ||
serializableStatObjectResponse.setBucket(statObjectResponse.bucket()); | ||
serializableStatObjectResponse.setRegion(statObjectResponse.region()); | ||
serializableStatObjectResponse.setObject(statObjectResponse.object()); | ||
serializableStatObjectResponse.etag = statObjectResponse.etag(); | ||
serializableStatObjectResponse.size = statObjectResponse.size(); | ||
serializableStatObjectResponse.lastModified = statObjectResponse.lastModified(); | ||
serializableStatObjectResponse.retentionMode = statObjectResponse.retentionMode(); | ||
serializableStatObjectResponse.retentionRetainUntilDate = statObjectResponse.retentionRetainUntilDate(); | ||
serializableStatObjectResponse.legalHold = statObjectResponse.legalHold(); | ||
serializableStatObjectResponse.deleteMarker = statObjectResponse.deleteMarker(); | ||
serializableStatObjectResponse.userMetadata = statObjectResponse.userMetadata(); | ||
return serializableStatObjectResponse; | ||
} | ||
} |
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
21 changes: 21 additions & 0 deletions
21
...er/src/main/java/com/jmsoftware/maf/osscenter/write/entity/MergeResourceChunkPayload.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,21 @@ | ||
package com.jmsoftware.maf.osscenter.write.entity; | ||
|
||
import lombok.Data; | ||
|
||
import javax.validation.Valid; | ||
import javax.validation.constraints.NotBlank; | ||
import javax.validation.constraints.NotEmpty; | ||
import java.util.List; | ||
|
||
/** | ||
* Description: MergeResourceChunkPayload, change description here. | ||
* | ||
* @author Johnny Miller (锺俊), email: johnnysviva@outlook.com, date: 8/12/2021 8:48 PM | ||
**/ | ||
@Data | ||
public class MergeResourceChunkPayload { | ||
@NotBlank | ||
private String bucket; | ||
@NotEmpty | ||
private List<@Valid @NotBlank String> objectList; | ||
} |
15 changes: 15 additions & 0 deletions
15
oss-center/src/main/java/com/jmsoftware/maf/osscenter/write/entity/ObjectResponse.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,15 @@ | ||
package com.jmsoftware.maf.osscenter.write.entity; | ||
|
||
import lombok.Data; | ||
|
||
/** | ||
* Description: ObjectResponse, change description here. | ||
* | ||
* @author Johnny Miller (锺俊), email: johnnysviva@outlook.com, date: 8/12/2021 9:27 PM | ||
**/ | ||
@Data | ||
public class ObjectResponse { | ||
private String bucket; | ||
private String object; | ||
private String etag; | ||
} |
Oops, something went wrong.