Package rife.bld.extension
Class ZipOperation
java.lang.Object
rife.bld.operations.AbstractOperation<ZipOperation>
rife.bld.extension.ZipOperation
Creates a zip archive of the provided sources and directories.
- Since:
- 1.0
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionRetrieves the destination directory in which the zip archive will be created.destinationDirectory
(File directory) Provides the destination directory in which the zip archive will be created.destinationDirectory
(String directory) Provides the destination directory in which the zip archive will be created.destinationDirectory
(Path directory) Provides the destination directory in which the zip archive will be created.Retrieves the destination file where the zip archive will be created.Retrieves the destination file name that will be used for the zip archive creation.destinationFileName
(String name) Provides the destination file name that will be used for the zip archive creation.excluded()
Retrieves the list of patterns that will be evaluated to determine which files will be excluded the zip archive.Provides regex patterns that will be found to determine which files will be excluded from the javadoc generation.Provides a list of patterns that will be found to determine which files will be excluded from the zip archive.Provides patterns that will be found to determine which files will be excluded from the zip archive.void
execute()
Performs the zip operation.protected void
executeAddFileToZip
(org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream zip, rife.bld.NamedFile file) Part of theexecute()
operation, add a single file to the zip archive.protected void
Part of theexecute()
operation, create the destination directory.protected void
Part of theexecute()
operation, create the zip archive.included()
Retrieves the list of patterns that will be evaluated to determine which files will be included in the zip archive.Provides regex patterns that will be found to determine which files will be included in the javadoc generation.Provides a list of patterns that will be found to determine which files will be included in the zip archive.Provides patterns that will be found to determine which files will be included in the zip archive.Retrieves the list of source directories that will be used for the zip archive creation.sourceDirectories
(File... directories) Provides source directories that will be used for the zip archive creation.sourceDirectories
(String... directories) Provides source directories that will be used for the zip archive creation.sourceDirectories
(Path... directories) Provides source directories that will be used for the zip archive creation.sourceDirectories
(List<File> directories) Provides a list of source directories that will be used for the zip archive creation.sourceDirectoriesPaths
(List<Path> directories) Provides a list of source directories that will be used for the zip archive creation.sourceDirectoriesStrings
(List<String> directories) Provides a list of source directories that will be used for the zip archive creation.List<rife.bld.NamedFile>
Retrieves the list of source files that will be used for the zip archive creation.sourceFiles
(List<rife.bld.NamedFile> files) Provides a list of source files that will be used for the zip archive creation.sourceFiles
(rife.bld.NamedFile... files) Provides source files that will be used for the zip archive creation.Methods inherited from class rife.bld.operations.AbstractOperation
executeOnce, executeOnce, silent, silent
-
Constructor Details
-
ZipOperation
public ZipOperation()
-
-
Method Details
-
execute
Performs the zip operation.- Specified by:
execute
in classrife.bld.operations.AbstractOperation<ZipOperation>
- Throws:
IOException
- when an exception occurred during the zip creation process- Since:
- 1.0
-
executeCreateDestinationDirectory
protected void executeCreateDestinationDirectory()Part of theexecute()
operation, create the destination directory.- Since:
- 1.0
-
executeCreateZipArchive
Part of theexecute()
operation, create the zip archive.- Throws:
IOException
- Since:
- 1.0
-
executeAddFileToZip
protected void executeAddFileToZip(org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream zip, rife.bld.NamedFile file) throws IOException Part of theexecute()
operation, add a single file to the zip archive.- Throws:
IOException
- Since:
- 1.0
-
sourceDirectories
Provides source directories that will be used for the zip archive creation.- Parameters:
directories
- source directories- Returns:
- this operation instance
- Since:
- 1.0
- See Also:
-
sourceDirectories
Provides source directories that will be used for the zip archive creation.- Parameters:
directories
- source directories- Returns:
- this operation instance
- Since:
- 1.0
- See Also:
-
sourceDirectories
Provides source directories that will be used for the zip archive creation.- Parameters:
directories
- source directories- Returns:
- this operation instance
- Since:
- 1.0
- See Also:
-
sourceDirectories
Provides a list of source directories that will be used for the zip archive creation.A copy will be created to allow this list to be independently modifiable.
- Parameters:
directories
- a list of source directories- Returns:
- this operation instance
- Since:
- 1.0
- See Also:
-
sourceDirectoriesPaths
Provides a list of source directories that will be used for the zip archive creation.A copy will be created to allow this list to be independently modifiable.
- Parameters:
directories
- a list of source directories- Returns:
- this operation instance
- Since:
- 1.0
- See Also:
-
sourceDirectoriesStrings
Provides a list of source directories that will be used for the zip archive creation.A copy will be created to allow this list to be independently modifiable.
- Parameters:
directories
- a list of source directories- Returns:
- this operation instance
- Since:
- 1.0
- See Also:
-
sourceFiles
Provides source files that will be used for the zip archive creation.- Parameters:
files
- source files- Returns:
- this operation instance
- Since:
- 1.0
-
sourceFiles
Provides a list of source files that will be used for the zip archive creation.A copy will be created to allow this list to be independently modifiable.
- Parameters:
files
- a list of source files- Returns:
- this operation instance
- Since:
- 1.0
-
destinationDirectory
Provides the destination directory in which the zip archive will be created.- Parameters:
directory
- the zip destination directory- Returns:
- this operation instance
- Since:
- 1.0
-
destinationDirectory
Provides the destination directory in which the zip archive will be created.- Parameters:
directory
- the zip destination directory- Returns:
- this operation instance
- Since:
- 1.0
-
destinationDirectory
Provides the destination directory in which the zip archive will be created.- Parameters:
directory
- the zip destination directory- Returns:
- this operation instance
- Since:
- 1.0
-
destinationFileName
Provides the destination file name that will be used for the zip archive creation.- Parameters:
name
- the zip archive destination file name- Returns:
- this operation instance
- Since:
- 1.0
-
included
Provides regex patterns that will be found to determine which files will be included in the javadoc generation.- Parameters:
included
- inclusion patterns- Returns:
- this operation instance
- Since:
- 1.0
-
included
Provides patterns that will be found to determine which files will be included in the zip archive.- Parameters:
included
- inclusion patterns- Returns:
- this operation instance
- Since:
- 1.0
-
included
Provides a list of patterns that will be found to determine which files will be included in the zip archive.A copy will be created to allow this list to be independently modifiable.
- Parameters:
included
- a list of inclusion patterns- Returns:
- this operation instance
- Since:
- 1.0
-
excluded
Provides regex patterns that will be found to determine which files will be excluded from the javadoc generation.- Parameters:
excluded
- exclusion patterns- Returns:
- this operation instance
- Since:
- 1.0
-
excluded
Provides patterns that will be found to determine which files will be excluded from the zip archive.- Parameters:
excluded
- exclusion patterns- Returns:
- this operation instance
- Since:
- 1.0
-
excluded
Provides a list of patterns that will be found to determine which files will be excluded from the zip archive.A copy will be created to allow this list to be independently modifiable.
- Parameters:
excluded
- a list of exclusion patterns- Returns:
- this operation instance
- Since:
- 1.0
-
sourceDirectories
Retrieves the list of source directories that will be used for the zip archive creation.This is a modifiable list that can be retrieved and changed.
- Returns:
- the zip archive's source directories
- Since:
- 1.0
-
sourceFiles
Retrieves the list of source files that will be used for the zip archive creation.This is a modifiable list that can be retrieved and changed.
- Returns:
- the zip archive's source files
- Since:
- 1.0
-
destinationDirectory
Retrieves the destination directory in which the zip archive will be created.- Returns:
- the zip archive's destination directory
- Since:
- 1.0
-
destinationFileName
Retrieves the destination file name that will be used for the zip archive creation.- Returns:
- the zip archive's destination file name
- Since:
- 1.0
-
destinationFile
Retrieves the destination file where the zip archive will be created.- Returns:
- the zip archive's destination file
- Since:
- 1.0
-
included
Retrieves the list of patterns that will be evaluated to determine which files will be included in the zip archive.This is a modifiable list that can be retrieved and changed.
- Returns:
- the zip's archive's inclusion patterns
- Since:
- 1.0
-
excluded
Retrieves the list of patterns that will be evaluated to determine which files will be excluded the zip archive.This is a modifiable list that can be retrieved and changed.
- Returns:
- the zip's archive's exclusion patterns
- Since:
- 1.0
-