Class ZipExportProcessor

    • Field Detail

      • withManifest

        protected boolean withManifest
      • localeExportList

        protected List<String> localeExportList
    • Constructor Detail

      • ZipExportProcessor

        public ZipExportProcessor​(String path,
                                  org.pentaho.platform.api.repository2.unified.IUnifiedRepository repository,
                                  boolean withManifest)
        Encapsulates the logic of registering import handlers, generating the manifest, and performing the export
    • Method Detail

      • getSession

        protected org.pentaho.platform.api.engine.IPentahoSession getSession()
      • addToManifest

        protected void addToManifest​(org.pentaho.platform.api.repository2.unified.RepositoryFile repositoryFile)
                              throws ExportException
        create an entry in the export manifest for this file or folder
        Parameters:
        repositoryFile -
        Throws:
        ExportException
      • isExportCandidate

        protected boolean isExportCandidate​(String path)
      • getFixedZipEntryName

        protected String getFixedZipEntryName​(org.pentaho.platform.api.repository2.unified.RepositoryFile repositoryFile,
                                              String filePath)
        Take repository file path and local file path and return computed zip entry path
        Parameters:
        repositoryFile -
        filePath -
        Returns:
      • getZipEntryName

        protected String getZipEntryName​(org.pentaho.platform.api.repository2.unified.RepositoryFile repositoryFile,
                                         String filePath)
      • createLocales

        protected void createLocales​(org.pentaho.platform.api.repository2.unified.RepositoryFile repositoryFile,
                                     String filePath,
                                     boolean isFolder,
                                     OutputStream outputStream)
                              throws IOException
        for each locale stored in in Jcr create a .locale file with the stored node properties
        Parameters:
        repositoryFile -
        filePath -
        isFolder -
        outputStream -
        Throws:
        IOException
      • getLocaleExportList

        public List<String> getLocaleExportList()
        get the list of files we are interested in supporting locale from Spring
        Returns:
      • setLocaleExportList

        public void setLocaleExportList​(List<String> localeExportList)
      • setExportManifest

        public void setExportManifest​(ExportManifest exportManifest)