Class AbstractUpdater

java.lang.Object
zleurtor.scanmanager.model.update.AbstractUpdater
Direct Known Subclasses:
MasterUpdater, SlaveUpdater

public abstract class AbstractUpdater extends Object
The class having in charge to search the updates and apply it (if needed).
Author:
Zleurtor
  • Constructor Details

    • AbstractUpdater

      public AbstractUpdater()
  • Method Details

    • update

      public abstract boolean update()
      Check if an update is available (and install it).
      Returns:
      true if an update has been done, false otherwise.
    • computePlan

      Compare some part of the archive and some part of the installed files, then compute the update plan.
      Parameters:
      archive - The new 3D Scan Manager version archive.
      Returns:
      The collection of files to extract from the archive.
      Throws:
      IOException - If the new version archive file can not be read.
      FileNotFoundException - If the new version archive file does not exist.
      NoSuchAlgorithmException - If no Provider supports MD5 or SHA-1 implementation.
      DigestException - If a digest error occurs.
      ClassNotFoundException - If the Class of a serialized object cannot be found.
    • mergeConfigurations

      protected void mergeConfigurations(InputStream patchIn, String filename) throws IOException
      Merge the configuration contained in the specified input stream with the one contained in the specified file.
      Parameters:
      patchIn - The input stream from the patch configuration.
      filename - The name of the file containing the current configuration.
      Throws:
      IOException - If an input/output error occurs.