public class ArchivingStrategy
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
ArchivingStrategy.CompressionStrategy |
Modifier and Type | Field and Description |
---|---|
static ArchivingStrategy |
DEFAULT
The default strategy: include everything, compress all files except those
known to be already compressed.
|
static ArchivingStrategy |
DEFAULT_NO_COMPRESSION
The default strategy without compression: include everything, compress nothing.
|
static ArchivingStrategy |
DEFAULT_WITH_COMPRESSION
An alias for the default strategy (kept for backward compatibility).
|
Constructor and Description |
---|
ArchivingStrategy() |
ArchivingStrategy(ArchivingStrategy template) |
Modifier and Type | Method and Description |
---|---|
ArchivingStrategy |
addToCompressionBlackList(java.util.regex.Pattern pattern)
Add the given pattern to the blacklist of files to store compressed in archive.
|
ArchivingStrategy |
addToCompressionBlackList(java.lang.String pattern)
Add the given pattern to the blacklist of files to store compressed in archive.
|
ArchivingStrategy |
addToCompressionWhiteList(java.util.regex.Pattern pattern)
Add the given pattern to the whitelist of files to store compressed in archive.
|
ArchivingStrategy |
addToCompressionWhiteList(java.lang.String pattern)
Add the given pattern to the whitelist of files to store compressed in archive.
|
ArchivingStrategy |
addToDirBlackList(java.util.regex.Pattern pattern)
Add the given pattern to the blacklist of directories to exclude from archiving.
|
ArchivingStrategy |
addToDirBlackList(java.lang.String pattern)
Add the given pattern to the blacklist of directories to exclude from archiving.
|
ArchivingStrategy |
addToDirWhiteList(java.util.regex.Pattern pattern)
Add the given pattern to the whitelist of directories to include in archiving.
|
ArchivingStrategy |
addToDirWhiteList(java.lang.String pattern)
Add the given pattern to the whitelist of directories to include in archiving.
|
ArchivingStrategy |
addToFileBlackList(java.util.regex.Pattern pattern)
Add the given pattern to the blacklist of files to exclude from archiving.
|
ArchivingStrategy |
addToFileBlackList(java.lang.String pattern)
Add the given pattern to the blacklist of files to exclude from archiving.
|
ArchivingStrategy |
addToFileWhiteList(java.util.regex.Pattern pattern)
Add the given pattern to the whitelist of files to include in archiving.
|
ArchivingStrategy |
addToFileWhiteList(java.lang.String pattern)
Add the given pattern to the whitelist of files to include in archiving.
|
ArchivingStrategy |
compressAll()
Store all files compressed in archive.
|
ArchivingStrategy |
compressAll(boolean compress)
Sets, whether all files should be stored compressed in archive (
true ) or not (
false ). |
boolean |
doCompress(java.lang.String path) |
ArchivingStrategy.CompressionStrategy |
getCompressionStrategy() |
boolean |
isSealed()
Returns
true if this strategy is sealed. |
ArchivingStrategy |
seal()
Seal the strategy.
|
public static final ArchivingStrategy DEFAULT
public static final ArchivingStrategy DEFAULT_WITH_COMPRESSION
public static final ArchivingStrategy DEFAULT_NO_COMPRESSION
public ArchivingStrategy()
public ArchivingStrategy(ArchivingStrategy template)
public ArchivingStrategy addToFileWhiteList(java.util.regex.Pattern pattern)
public ArchivingStrategy addToFileWhiteList(java.lang.String pattern)
public ArchivingStrategy addToFileBlackList(java.util.regex.Pattern pattern)
public ArchivingStrategy addToFileBlackList(java.lang.String pattern)
public ArchivingStrategy addToDirWhiteList(java.util.regex.Pattern pattern)
public ArchivingStrategy addToDirWhiteList(java.lang.String pattern)
public ArchivingStrategy addToDirBlackList(java.util.regex.Pattern pattern)
public ArchivingStrategy addToDirBlackList(java.lang.String pattern)
public ArchivingStrategy addToCompressionWhiteList(java.util.regex.Pattern pattern)
public ArchivingStrategy addToCompressionWhiteList(java.lang.String pattern)
public ArchivingStrategy addToCompressionBlackList(java.util.regex.Pattern pattern)
public ArchivingStrategy addToCompressionBlackList(java.lang.String pattern)
public ArchivingStrategy seal()
IllegalStateException
.public boolean isSealed()
true
if this strategy is sealed.seal()
public ArchivingStrategy compressAll()
public ArchivingStrategy compressAll(boolean compress)
true
) or not (
false
).public boolean doCompress(java.lang.String path)
public ArchivingStrategy.CompressionStrategy getCompressionStrategy()