Class PlatformExporter

  • All Implemented Interfaces:
    java.lang.AutoCloseable

    public class PlatformExporter
    extends AbstractExporter
    Implements a Vault filesystem exporter that exports Vault files to a platform file system. It uses the PlatformNameFormat for formatting the jcr file names to local ones.
    • Constructor Detail

      • PlatformExporter

        public PlatformExporter​(java.io.File localFile)
        Constructs a new jar exporter that writes to the given file.
        Parameters:
        localFile - the local parent directory
    • Method Detail

      • pruneMissing

        public boolean pruneMissing()
        Checks if 'prune-missing' is enabled.
        Returns:
        true if prune-missing is enabled
      • setPruneMissing

        public void setPruneMissing​(boolean pruneMissing)
        Sets the 'prune-missing' flag.
        Parameters:
        pruneMissing - the flag
      • close

        public void close()
                   throws java.io.IOException
        Closes the exporter and releases the undelying structures.
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in class AbstractExporter
        Throws:
        java.io.IOException - if an I/O error occurs
      • createDirectory

        public void createDirectory​(java.lang.String relPath)
                             throws java.io.IOException
        Specified by:
        createDirectory in class AbstractExporter
        Throws:
        java.io.IOException
      • writeFile

        public void writeFile​(java.io.InputStream in,
                              java.lang.String relPath)
                       throws java.io.IOException
        Description copied from class: AbstractExporter

        The specified stream remains open after this method returns.

        Specified by:
        writeFile in class AbstractExporter
        Throws:
        java.io.IOException