Skip to content

Commit

Permalink
Merge pull request #44 from neicnordic/feature/unencrypted-filesize
Browse files Browse the repository at this point in the history
Retrieve decrypted filesize
  • Loading branch information
Dmytro Titov authored Oct 26, 2020
2 parents 0aac584 + 274e68f commit c40aeab
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</parent>
<groupId>no.uio.ifi</groupId>
<artifactId>localega-doa</artifactId>
<version>1.4.0</version>
<version>1.5.0</version>
<name>localega-doa</name>
<description>LocalEGA Data Out API</description>

Expand Down
3 changes: 3 additions & 0 deletions src/main/java/no/uio/ifi/localega/doa/dto/File.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ public class File {
private Long fileSize;
private String unencryptedChecksum;
private String unencryptedChecksumType;
private Long decryptedFileSize;
private String decryptedFileChecksum;
private String decryptedFileChecksumType;
private String fileStatus;

}
10 changes: 10 additions & 0 deletions src/main/java/no/uio/ifi/localega/doa/model/LEGAFile.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ public class LEGAFile {
@Column(name = "display_file_name", insertable = false, updatable = false, length = 128)
private String displayFileName;

// This is the size of the file that is in the archive, the encrypted part of the file
@Column(name = "file_size", insertable = false, updatable = false)
private Long fileSize;

Expand All @@ -62,6 +63,15 @@ public class LEGAFile {
@Column(name = "unencrypted_checksum_type", insertable = false, updatable = false, length = 12)
private String unencryptedChecksumType;

@Column(name = "decrypted_file_size", insertable = false, updatable = false)
private Long decryptedFileSize;

@Column(name = "decrypted_file_checksum", insertable = false, updatable = false)
private String decryptedFileChecksum;

@Column(name = "decrypted_file_checksum_type", insertable = false, updatable = false)
private String decryptedFileChecksumType;

@Size(max = 13)
@Column(name = "file_status", insertable = false, updatable = false, length = 13)
private String fileStatus;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ public Collection<File> files(String datasetId) {
file.setDisplayFileName(f.getDisplayFileName());
file.setFileName(f.getFileName());
file.setFileSize(f.getFileSize());
file.setDecryptedFileSize(f.getDecryptedFileSize());
file.setDecryptedFileChecksum(f.getDecryptedFileChecksum());
file.setDecryptedFileChecksumType(f.getDecryptedFileChecksumType());
file.setUnencryptedChecksum(f.getUnencryptedChecksum());
file.setUnencryptedChecksumType(f.getUnencryptedChecksumType());
file.setFileStatus(f.getFileStatus());
Expand Down

0 comments on commit c40aeab

Please sign in to comment.