Class JcrExporter

  • All Implemented Interfaces:
    java.lang.AutoCloseable

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

      • JcrExporter

        public JcrExporter​(javax.jcr.Node localFile)
        Constructs a new jcr exporter.
        Parameters:
        localFile - the local parent folder
    • Method Detail

      • isAutoDeleteFiles

        public boolean isAutoDeleteFiles()
      • setAutoDeleteFiles

        public void setAutoDeleteFiles​(boolean autoDeleteFiles)
      • open

        public void open()
                  throws java.io.IOException,
                         javax.jcr.RepositoryException
        Opens the exporter and initializes the undelying structures.
        Specified by:
        open in class AbstractExporter
        Throws:
        java.io.IOException - if an I/O error occurs
        javax.jcr.RepositoryException - if a repository error occurs
      • close

        public void close()
                   throws java.io.IOException,
                          javax.jcr.RepositoryException
        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
        javax.jcr.RepositoryException - if a repository error occurs
      • createDirectory

        public void createDirectory​(VaultFile file,
                                    java.lang.String relPath)
                             throws javax.jcr.RepositoryException,
                                    java.io.IOException
        Specified by:
        createDirectory in class AbstractExporter
        Throws:
        javax.jcr.RepositoryException
        java.io.IOException
      • 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​(VaultFile file,
                              java.lang.String relPath)
                       throws javax.jcr.RepositoryException,
                              java.io.IOException
        Specified by:
        writeFile in class AbstractExporter
        Throws:
        javax.jcr.RepositoryException
        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 is automatically closed after this method returns or throws an exception.

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