-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
s3 based case store #11
Changes from 11 commits
4f5d98a
db41032
7c7157f
e94e02c
ebba256
833c839
4dc872d
80566f7
ffbb128
a657b8a
ee1d7be
bdb2a2e
1d96977
e5cea59
36b2454
5b619ba
2f5e41d
4e225e5
5a13fc9
3075cda
7f458a3
35106ac
7ba466c
c200713
933e75d
51f6bf9
93b531c
700852a
92d5796
40e669e
ca90c16
95129ae
18e2b33
883e509
6dc48bc
5c37e6a
2a413cf
6b38ec4
e536feb
7fa0c59
4546ac1
642689d
87559a2
c387a19
cab43d0
b0a8706
cbf8acc
55203cd
1cb4564
e3167e2
2b04ca6
bfeea3f
9e0ac92
0cb0674
b02628e
ccf3f6d
5717e8a
ab90e91
74e7e54
2eccb66
0dd6fba
cadf860
6435368
6cbad7e
678e89b
dc833bc
cd2955f
d3b815d
17b5b1f
7438f1d
6b5761c
3b1f5b2
d05bd80
7bd2878
bed9105
e98c4fb
099c976
2f4a6b7
65edac3
d991f20
4a784cb
22a5b7e
e0c40e0
2aba9eb
59cdeed
a8636cf
4670e3c
a1c8d60
d302c6b
ea91965
1950468
2db73b4
dba9843
a38600f
7c2ac02
2ab52f2
2b051e6
8544992
83d68de
8b61aa3
5cbf729
df12461
5be2ad3
b7ce30c
c723614
ee478f5
faf83c1
82a556a
3a27d6f
b775a19
7440835
63bc15f
93ac483
014afa9
ba149cd
d1d5557
7974e2a
b50cd85
addb864
c0671dc
9883652
34ff54a
7ade436
5644ca7
2ef97e9
a347c0a
5c8918e
7c6e17e
a4568c9
0398643
143eab2
4418273
28cc495
6b73714
5d4c720
8f2d24b
7706ee5
0d12be6
5acd02f
9cbca2e
c3bdd4f
355c498
460af0e
904215f
ccfc5cc
8d25d02
80e331a
2099593
e69fa42
23a212b
97c4f56
16a7625
5c8f7f0
6cf316c
9d69962
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,9 @@ public enum Type { | |
ILLEGAL_FILE_NAME, | ||
DIRECTORY_ALREADY_EXISTS, | ||
DIRECTORY_EMPTY, | ||
DIRECTORY_NOT_FOUND | ||
DIRECTORY_NOT_FOUND, | ||
TEMP_FILE_INIT, | ||
TEMP_FILE_PROCESS, TEMP_DIRECTORY_CREATION | ||
} | ||
|
||
private final Type type; | ||
|
@@ -31,11 +33,16 @@ private CaseException(Type type, String msg) { | |
this.type = Objects.requireNonNull(type); | ||
} | ||
|
||
public CaseException(Type type, String message, Exception e) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can be removed if you have the one with throwable no ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done |
||
super(message, e); | ||
this.type = type; | ||
} | ||
|
||
public Type getType() { | ||
return type; | ||
} | ||
|
||
public static CaseException createDirectoryAreadyExists(Path directory) { | ||
public static CaseException createDirectoryAreadyExists(String directory) { | ||
Objects.requireNonNull(directory); | ||
return new CaseException(Type.DIRECTORY_ALREADY_EXISTS, "A directory with the same name already exists: " + directory); | ||
} | ||
|
@@ -55,6 +62,11 @@ public static CaseException createFileNotImportable(Path file) { | |
return new CaseException(Type.FILE_NOT_IMPORTABLE, "This file cannot be imported: " + file); | ||
} | ||
|
||
public static CaseException createFileNotImportable(String file) { | ||
Objects.requireNonNull(file); | ||
return new CaseException(Type.FILE_NOT_IMPORTABLE, "This file cannot be imported: " + file); | ||
} | ||
|
||
public static CaseException createStorageNotInitialized(Path storageRootDir) { | ||
Objects.requireNonNull(storageRootDir); | ||
return new CaseException(Type.STORAGE_DIR_NOT_CREATED, "The storage is not initialized: " + storageRootDir); | ||
|
@@ -64,4 +76,28 @@ public static CaseException createIllegalCaseName(String caseName) { | |
Objects.requireNonNull(caseName); | ||
return new CaseException(Type.ILLEGAL_FILE_NAME, "This is not an acceptable case name: " + caseName); | ||
} | ||
|
||
public static CaseException createTempDirectory(UUID uuid, Exception e) { | ||
Objects.requireNonNull(uuid); | ||
return new CaseException(Type.TEMP_DIRECTORY_CREATION, "Error creating temporary directory: " + uuid, e); | ||
} | ||
|
||
public static CaseException initTempFile(UUID uuid, Exception e) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should not need version with Exception There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done |
||
Objects.requireNonNull(uuid); | ||
return new CaseException(Type.TEMP_FILE_INIT, "Error initializing temporary case file: " + uuid, e); | ||
} | ||
|
||
public static CaseException initTempFile(UUID uuid) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is never used There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||
return CaseException.initTempFile(uuid, null); | ||
} | ||
|
||
public static CaseException processTempFile(UUID uuid, Exception e) { | ||
Objects.requireNonNull(uuid); | ||
return new CaseException(Type.TEMP_FILE_PROCESS, "Error processing temporary case file: " + uuid, e); | ||
} | ||
|
||
public static CaseException processTempFile(UUID uuid) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is never used There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||
return CaseException.processTempFile(uuid, null); | ||
} | ||
|
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3.1 (dec 2023) and 3.2 (sept 2024) have been released in the meantime
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/awspring/spring-cloud-aws
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Go for 3.2 or it's a too early ?