Class CompositeWarOperation

java.lang.Object
com.atlassian.jira.plugins.ha.container.warhack.operations.CompositeWarOperation
All Implemented Interfaces:
WarOperation
Direct Known Subclasses:
AddUpgradeTaskOperation

public class CompositeWarOperation extends Object implements WarOperation
  • Constructor Details

    • CompositeWarOperation

      public CompositeWarOperation(WarOperation... operations)
  • Method Details

    • processEntry

      public InputStream processEntry(JarEntry entry, InputStream is) throws IOException
      Description copied from interface: WarOperation
      Process a file entry in a WAR file.
      Specified by:
      processEntry in interface WarOperation
      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

      public void preprocessEntry(JarEntry entry, ExceptionalSupplier<? extends InputStream,IOException> is) throws IOException
      Description 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 interface WarOperation
      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

      public Collection<? extends FileEntry> additionalFiles() throws IOException
      Specified by:
      additionalFiles in interface WarOperation
      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.