Class FileUpgrader

  • Direct Known Subclasses:
    ZipUpgrader

    public class FileUpgrader
    extends IUpgrader
    An upgrader for file input locations.
    Author:
    Holger Eichelberger
    • Constructor Detail

      • FileUpgrader

        public FileUpgrader​(java.net.URI source,
                            java.lang.String dest,
                            java.util.Map<java.lang.String,​java.lang.String> files,
                            java.lang.String marker,
                            ProgressObserver observer)
        Creates an upgrader instance.
        Parameters:
        source - the source containing the files to upgrade
        dest - the destination bundle location
        files - the file mapping describing the upgrade
        marker - an optional marker file within dest (may be null)
        observer - a progress observer, use ProgressObserver.NO_OBSERVER if no observer shall be informed
    • Method Detail

      • doUpgrade

        protected boolean doUpgrade​(ReasoningResult result)
        Performs the upgrade operations.
        Specified by:
        doUpgrade in class IUpgrader
        Parameters:
        result - the reasoning result to be modified as a side effect
        Returns:
        true if performed, false if node
      • getExtension

        protected java.lang.String getExtension()
        Returns the extension of the source URI.
        Returns:
        the extension, null if we assume that the source URI denotes a directory