Class FilesystemArchiveTestResourceProvider
- java.lang.Object
-
- de.gebit.integrity.runner.providers.AbstractCompoundTestResourceProvider
-
- de.gebit.integrity.runner.providers.FilesystemArchiveTestResourceProvider
-
- All Implemented Interfaces:
TestResourceProvider
public class FilesystemArchiveTestResourceProvider extends AbstractCompoundTestResourceProvider
This is a compoundTestResourceProvider, able to read Integrity scripts directly from the file system, within a directory on the filesystem, and within archive files (and archives within archives). It wraps aFilesystemTestResourceProviderand anArchiveTestResourceProvider, which provide the actual functionality.- Author:
- Rene Schneider - initial API and implementation
-
-
Field Summary
-
Fields inherited from class de.gebit.integrity.runner.providers.AbstractCompoundTestResourceProvider
resourceProviders
-
-
Constructor Summary
Constructors Constructor Description FilesystemArchiveTestResourceProvider()Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAllRecursively(Collection<? extends File> someResourceFiles)Adds the given resources recursively, that is if one of them is a directory all enclosed directories and files of it are recursively included as well.voidaddArchiveFile(File anArchiveFile, boolean aRecursiveFlag)Adds the given archive file resource.voidaddRecursively(File aResourceFile)Adds the given resource recursively, that is if it is a directory all enclosed directories and files are recursively included as well.voidaddScriptFile(File aResourceFile)Adds the given resource if it is a plain script file.-
Methods inherited from class de.gebit.integrity.runner.providers.AbstractCompoundTestResourceProvider
closeResource, findProvider, getClassLoader, getResourceNames, openResource
-
-
-
-
Method Detail
-
addRecursively
public void addRecursively(File aResourceFile) throws IOException
Adds the given resource recursively, that is if it is a directory all enclosed directories and files are recursively included as well.- Parameters:
aResourceFile- Resource to be added. May be a script file, a directory, or an archive (ending on .zip or .jar)- Throws:
IOException
-
addAllRecursively
public void addAllRecursively(Collection<? extends File> someResourceFiles) throws IOException
Adds the given resources recursively, that is if one of them is a directory all enclosed directories and files of it are recursively included as well.- Parameters:
someResourceFiles- Resources to be added.- Throws:
IOException
-
addScriptFile
public void addScriptFile(File aResourceFile)
Adds the given resource if it is a plain script file. The file will only be added if it ends with theAbstractTestResourceProvider.INTEGRITY_TEST_FILES_SUFFIXsuffix!- Parameters:
aResourceFile- the resource file to add
-
addArchiveFile
public void addArchiveFile(File anArchiveFile, boolean aRecursiveFlag) throws IOException
Adds the given archive file resource. This automatically adds all Integrity scripts (ending on theAbstractTestResourceProvider.INTEGRITY_TEST_FILES_SUFFIXsuffix) within this archive.- Parameters:
anArchiveFile- the archive to addaRecursiveFlag- whether archives inside archives shall be searched too- Throws:
IOException
-
-