Interface WarOperation
- All Known Implementing Classes:
AbstractWarOperation,AddApplicationsOperation,AddClassFileOperation,AddSpringScannerPluginComponent,AddUpgradeTaskOperation,CompositeWarOperation,ExcludeFileOperation,FilterBuildUtilsOperation,ModifyUpgradesXmlOperation
public interface WarOperation
An operation does something to the WAR file by modifying or adding entries.
-
Method Summary
Modifier and TypeMethodDescriptionCollection<? extends FileEntry> voidpreprocessEntry(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.
-
Method Details
-
processEntry
Process a file entry in a WAR file.- Parameters:
entry- the entry in the WAR file.is- the input stream to the original data.- Returns:
- either
isto leave entry unmodified or a new input stream that filters original data. Returnnullto not write the entry into the destination WAR file. - Throws:
IOException- if an I/O error occurs.
-
preprocessEntry
void preprocessEntry(JarEntry entry, ExceptionalSupplier<? extends InputStream, IOException> is) throws IOExceptionPre-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.- 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
- 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.
-