-
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.
Merge pull request #58 from DataONEorg/feature-57-deleteobj-refactor
Feature-57: `deleteObject` Refactor
- Loading branch information
Showing
31 changed files
with
5,279 additions
and
3,384 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
Large diffs are not rendered by default.
Oops, something went wrong.
284 changes: 117 additions & 167 deletions
284
src/main/java/org/dataone/hashstore/HashStoreClient.java
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
12 changes: 12 additions & 0 deletions
12
src/main/java/org/dataone/hashstore/exceptions/CidNotFoundInPidRefsFileException.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,12 @@ | ||
package org.dataone.hashstore.exceptions; | ||
|
||
/** | ||
* Custom exception class for FileHashStore when the expected cid is not found in the pid refs file. | ||
*/ | ||
public class CidNotFoundInPidRefsFileException extends IllegalArgumentException { | ||
|
||
public CidNotFoundInPidRefsFileException(String message) { | ||
super(message); | ||
} | ||
|
||
} |
14 changes: 14 additions & 0 deletions
14
src/main/java/org/dataone/hashstore/exceptions/HashStoreRefsAlreadyExistException.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,14 @@ | ||
package org.dataone.hashstore.exceptions; | ||
|
||
import java.nio.file.FileAlreadyExistsException; | ||
|
||
/** | ||
* Custom exception thrown when called to tag a pid and cid, and reference files already exist | ||
*/ | ||
public class HashStoreRefsAlreadyExistException extends FileAlreadyExistsException { | ||
|
||
public HashStoreRefsAlreadyExistException(String message) { | ||
super(message); | ||
} | ||
|
||
} |
10 changes: 10 additions & 0 deletions
10
src/main/java/org/dataone/hashstore/exceptions/HashStoreServiceException.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,10 @@ | ||
package org.dataone.hashstore.exceptions; | ||
|
||
/** | ||
* An exception that encapsulates errors from the HashStore Runnable Test Class | ||
*/ | ||
public class HashStoreServiceException extends Exception { | ||
public HashStoreServiceException(String message) { | ||
super(message); | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
src/main/java/org/dataone/hashstore/exceptions/MissingHexDigestsException.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,14 @@ | ||
package org.dataone.hashstore.exceptions; | ||
|
||
import java.util.NoSuchElementException; | ||
|
||
/** | ||
* An exception thrown when hexDigests from a supplied ObjectMetadata object is empty. | ||
*/ | ||
public class MissingHexDigestsException extends NoSuchElementException { | ||
|
||
public MissingHexDigestsException(String message) { | ||
super(message); | ||
} | ||
|
||
} |
13 changes: 13 additions & 0 deletions
13
src/main/java/org/dataone/hashstore/exceptions/NonMatchingChecksumException.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,13 @@ | ||
package org.dataone.hashstore.exceptions; | ||
|
||
/** | ||
* An exception thrown when a checksum does not match what is expected. | ||
*/ | ||
|
||
public class NonMatchingChecksumException extends IllegalArgumentException { | ||
|
||
public NonMatchingChecksumException(String message) { | ||
super(message); | ||
} | ||
|
||
} |
14 changes: 14 additions & 0 deletions
14
src/main/java/org/dataone/hashstore/exceptions/NonMatchingObjSizeException.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,14 @@ | ||
package org.dataone.hashstore.exceptions; | ||
|
||
/** | ||
* An exception thrown when a data object size does not match what is expected. | ||
*/ | ||
|
||
public class NonMatchingObjSizeException extends IllegalArgumentException { | ||
|
||
public NonMatchingObjSizeException(String message) { | ||
super(message); | ||
} | ||
|
||
} | ||
|
14 changes: 14 additions & 0 deletions
14
src/main/java/org/dataone/hashstore/exceptions/OrphanRefsFilesException.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,14 @@ | ||
package org.dataone.hashstore.exceptions; | ||
|
||
import java.io.IOException; | ||
|
||
/** | ||
* Custom exception class for FileHashStore when both a pid and cid reference file is found | ||
* but object does not exist. | ||
*/ | ||
public class OrphanRefsFilesException extends IOException { | ||
public OrphanRefsFilesException(String message) { | ||
super(message); | ||
} | ||
|
||
} |
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
10 changes: 10 additions & 0 deletions
10
src/main/java/org/dataone/hashstore/exceptions/PidRefsFileNotFoundException.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,10 @@ | ||
package org.dataone.hashstore.exceptions; | ||
|
||
import java.io.FileNotFoundException; | ||
|
||
public class PidRefsFileNotFoundException extends FileNotFoundException { | ||
public PidRefsFileNotFoundException(String message) { | ||
super(message); | ||
} | ||
|
||
} |
13 changes: 13 additions & 0 deletions
13
src/main/java/org/dataone/hashstore/exceptions/UnsupportedHashAlgorithmException.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,13 @@ | ||
package org.dataone.hashstore.exceptions; | ||
|
||
/** | ||
* An exception thrown when a given algorithm is not supported by FileHashStore java | ||
*/ | ||
|
||
public class UnsupportedHashAlgorithmException extends IllegalArgumentException { | ||
|
||
public UnsupportedHashAlgorithmException(String message) { | ||
super(message); | ||
} | ||
|
||
} |
Oops, something went wrong.