-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
4260001
commit 4e12265
Showing
18 changed files
with
416 additions
and
75 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
34 changes: 34 additions & 0 deletions
34
...e/converter/RepositoryContentApplicationUnitsToValidationSecretsApplicationConverter.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,34 @@ | ||
package com.objectstorage.converter; | ||
|
||
import com.objectstorage.dto.ContentCompoundUnitDto; | ||
import com.objectstorage.dto.RepositoryContentApplicationUnitDto; | ||
import com.objectstorage.model.ValidationSecretsApplication; | ||
import com.objectstorage.model.ValidationSecretsUnit; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
/** | ||
* Represents repository content application units to validation secrets application converter; | ||
*/ | ||
public class RepositoryContentApplicationUnitsToValidationSecretsApplicationConverter { | ||
|
||
/** | ||
* Converts given content compound units to validation secrets application. | ||
* | ||
* @param repositoryContentApplicationUnits given repository content application units. | ||
* @return converted validation secrets application. | ||
*/ | ||
public static ValidationSecretsApplication convert( | ||
List<RepositoryContentApplicationUnitDto> repositoryContentApplicationUnits) { | ||
List<ValidationSecretsUnit> validationSecretsUnits = new ArrayList<>(); | ||
|
||
repositoryContentApplicationUnits.forEach( | ||
element -> validationSecretsUnits.add( | ||
ValidationSecretsUnit.of( | ||
element.getProvider(), | ||
element.getCredentials()))); | ||
|
||
return ValidationSecretsApplication.of(validationSecretsUnits); | ||
} | ||
} |
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
api-server/src/main/java/com/objectstorage/dto/FolderContentUnitDto.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 @@ | ||
package com.objectstorage.dto; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
|
||
import java.io.InputStream; | ||
|
||
/** | ||
* Represents folder content unit. | ||
*/ | ||
@Getter | ||
@AllArgsConstructor(staticName = "of") | ||
public class FolderContentUnitDto { | ||
/** | ||
* Represents folder entity name. | ||
*/ | ||
private String location; | ||
|
||
/** | ||
* Represents folder entity content. | ||
*/ | ||
private byte[] content; | ||
} |
28 changes: 28 additions & 0 deletions
28
api-server/src/main/java/com/objectstorage/dto/RepositoryContentApplicationUnitDto.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,28 @@ | ||
package com.objectstorage.dto; | ||
|
||
import com.objectstorage.model.CredentialsFieldsFull; | ||
import com.objectstorage.model.Provider; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
|
||
/** | ||
* Represents repository content application unit. | ||
*/ | ||
@Getter | ||
@AllArgsConstructor(staticName = "of") | ||
public class RepositoryContentApplicationUnitDto { | ||
/** | ||
* Represents root location for internal file system. | ||
*/ | ||
private String root; | ||
|
||
/** | ||
* Represents provider. | ||
*/ | ||
private Provider provider; | ||
|
||
/** | ||
* Represents full credentials fields. | ||
*/ | ||
private CredentialsFieldsFull credentials; | ||
} |
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.