Class CompositeWarOperation
java.lang.Object
com.atlassian.jira.plugins.ha.container.warhack.operations.CompositeWarOperation
- All Implemented Interfaces:
WarOperation
- Direct Known Subclasses:
AddUpgradeTaskOperation
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCollection<? extends FileEntry>
void
preprocessEntry
(JarEntry entry, ExceptionalSupplier<? extends InputStream, IOException> is) Pre-processes a file entry in a WAR file.processEntry
(JarEntry entry, InputStream is) Process a file entry in a WAR file.
-
Constructor Details
-
CompositeWarOperation
-
-
Method Details
-
processEntry
Description copied from interface:WarOperation
Process a file entry in a WAR file.- Specified by:
processEntry
in interfaceWarOperation
- Parameters:
entry
- the entry in the WAR file.is
- the input stream to the original data.- Returns:
- either
is
to leave entry unmodified or a new input stream that filters original data. Returnnull
to not write the entry into the destination WAR file. - Throws:
IOException
- if an I/O error occurs.
-
preprocessEntry
public void preprocessEntry(JarEntry entry, ExceptionalSupplier<? extends InputStream, IOException> is) throws IOExceptionDescription copied from interface:WarOperation
Pre-processes a file entry in a WAR file. All entries in a WAR are pre-processed before they are processed. It allows other file contents to be read.- Specified by:
preprocessEntry
in interfaceWarOperation
- Parameters:
entry
- the entry in the WAR file to read.is
- provides access to the input stream of the entry. Only consume if needed.- Throws:
IOException
- if an I/O error occurs reading an entry.
-
additionalFiles
- Specified by:
additionalFiles
in interfaceWarOperation
- Returns:
- a list of additional files that should be added to the WAR byt his operation, or empty collection if nothing should be added.
- Throws:
IOException
- if an error occurs gathering additional files.
-