public class ManifestVerifier
extends java.lang.Object
implements java.lang.AutoCloseable
| Constructor and Description |
|---|
ManifestVerifier()
Create a PayloadVerifier using a cached thread pool and the
StandardBagitAlgorithmNameToSupportedAlgorithmMapping mapping |
ManifestVerifier(BagitAlgorithmNameToSupportedAlgorithmMapping nameMapping)
Create a PayloadVerifier using a cached thread pool and a custom mapping
|
ManifestVerifier(BagitAlgorithmNameToSupportedAlgorithmMapping nameMapping,
java.util.concurrent.ExecutorService executor)
Create a PayloadVerifier using a custom thread pool and a custom mapping
|
ManifestVerifier(java.util.concurrent.ExecutorService executor)
Create a PayloadVerifier using a custom thread pool and the
StandardBagitAlgorithmNameToSupportedAlgorithmMapping mapping |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
verifyManifests(Bag bag,
boolean ignoreHiddenFiles)
Verify that all the files in the payload directory are listed in the payload manifest and
all files listed in all manifests exist.
|
public ManifestVerifier()
StandardBagitAlgorithmNameToSupportedAlgorithmMapping mappingpublic ManifestVerifier(BagitAlgorithmNameToSupportedAlgorithmMapping nameMapping)
nameMapping - the mapping between BagIt algorithm name and the java supported algorithmpublic ManifestVerifier(java.util.concurrent.ExecutorService executor)
StandardBagitAlgorithmNameToSupportedAlgorithmMapping mappingexecutor - the thread pool to use when doing workpublic ManifestVerifier(BagitAlgorithmNameToSupportedAlgorithmMapping nameMapping, java.util.concurrent.ExecutorService executor)
nameMapping - the mapping between BagIt algorithm name and the java supported algorithmexecutor - the thread pool to use when doing workpublic void close()
throws java.lang.SecurityException
close in interface java.lang.AutoCloseablejava.lang.SecurityExceptionpublic void verifyManifests(Bag bag, boolean ignoreHiddenFiles) throws java.io.IOException, MaliciousPathException, UnsupportedAlgorithmException, InvalidBagitFileFormatException, FileNotInPayloadDirectoryException, java.lang.InterruptedException
bag - the bag to check to checkignoreHiddenFiles - to ignore hidden files unless they are specifically listed in a manifestjava.io.IOException - if there is a problem reading a fileMaliciousPathException - the path in the manifest was specifically crafted to cause harmUnsupportedAlgorithmException - if the algorithm used for the manifest is unsupportedInvalidBagitFileFormatException - if any of the manifests don't conform to the bagit specificationFileNotInPayloadDirectoryException - if a file is listed in a manifest but doesn't exist in the payload directoryjava.lang.InterruptedException - if a thread is interrupted while doing work