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 Details

    • processEntry

      InputStream processEntry(JarEntry entry, InputStream is) throws IOException
      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 is to leave entry unmodified or a new input stream that filters original data. Return null to 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 IOException
      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.
      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

      Collection<? extends FileEntry> additionalFiles() throws IOException
      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.