-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Multiple Files Transfer Feature (#61)
* feat: multiple files transfer * feat: multiple files transfer * chore: examples configurable data
- Loading branch information
1 parent
b194299
commit 1521675
Showing
15 changed files
with
416 additions
and
187 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
35 changes: 35 additions & 0 deletions
35
edc-ionos-extension/core-ionos-s3/src/main/java/com/ionos/edc/extension/s3/api/S3Object.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,35 @@ | ||
/* | ||
* Copyright (c) 2023 IONOS | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Apache License, Version 2.0 which is available at | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* Contributors: | ||
* IONOS | ||
* | ||
*/ | ||
|
||
package com.ionos.edc.extension.s3.api; | ||
|
||
public record S3Object(String objectName, long size) { | ||
|
||
public boolean isRootObject(String blobName) { | ||
return (objectName.equals(blobName) || objectName.equals(blobName + "/")); | ||
} | ||
|
||
public String shortObjectName(String blobName) { | ||
if (isRootObject(blobName)) | ||
return objectName; | ||
|
||
var shortObjectName = objectName.replaceFirst(blobName, ""); | ||
|
||
if (shortObjectName.indexOf("/") == 0) | ||
return shortObjectName.replaceFirst("/", ""); | ||
else | ||
return shortObjectName; | ||
} | ||
|
||
} |
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
23 changes: 23 additions & 0 deletions
23
...on/core-ionos-s3/src/main/java/com/ionos/edc/extension/s3/schema/IonosSettingsSchema.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,23 @@ | ||
/* | ||
* Copyright (c) 2022 IONOS | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Apache License, Version 2.0 which is available at | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* Contributors: | ||
* IONOS | ||
* | ||
*/ | ||
|
||
package com.ionos.edc.extension.s3.schema; | ||
|
||
public interface IonosSettingsSchema { | ||
String IONOS_ACCESS_KEY = "edc.ionos.access.key"; | ||
String IONOS_SECRET_KEY = "edc.ionos.secret.key"; | ||
String IONOS_ENDPOINT = "edc.ionos.endpoint"; | ||
String IONOS_TOKEN = "edc.ionos.token"; | ||
int IONOS_MAX_FILES_DEFAULT = 1000; | ||
} |
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
Oops, something went wrong.