Class XmlStreamVersionProvider

java.lang.Object
org.craftercms.commons.upgrade.impl.providers.AbstractVersionProvider<String>
org.craftercms.studio.impl.v2.upgrade.providers.XmlFileVersionProvider
org.craftercms.studio.impl.v2.upgrade.providers.XmlStreamVersionProvider
All Implemented Interfaces:
org.craftercms.commons.upgrade.VersionProvider<String>

public class XmlStreamVersionProvider extends XmlFileVersionProvider
Extension of XmlFileVersionProvider that consumes a XMLEventReader in order to stop reading the XML once the version tag has been found.
  • Constructor Details

  • Method Details

    • getVersionFromFile

      protected String getVersionFromFile(String site, String filePath) throws Exception
      Description copied from class: XmlFileVersionProvider
      Get the version from the XML file. This method assumes the file existence has been checked previously.
      Overrides:
      getVersionFromFile in class XmlFileVersionProvider
      Parameters:
      site - Site name
      filePath - Path of the file containing the version
      Returns:
      the version of the file, as found in the XML file <version> tag
      Throws:
      Exception