Class ImportSession


  • public class ImportSession
    extends Object
    General purpose objects whose lifecycle is that of an formal import session
    Author:
    TKafalas
    • Constructor Detail

      • ImportSession

        public ImportSession()
    • Method Detail

      • initialize

        public void initialize()
        Clear out any collections, most likely before starting a new import
      • getLogger

        public org.apache.commons.logging.Log getLogger()
      • isFileHidden

        @Deprecated
        public Boolean isFileHidden​(String filePath)
        Deprecated.
        Check if the file is hidden by manifest definition and import flags. Returns null if the manifest is not present or the manifest is being ignored.
        Parameters:
        isApplyAclSettings -
        isRetainOwnership -
        filePath -
        Returns:
      • processAclForFile

        public org.pentaho.platform.api.repository2.unified.RepositoryFileAcl processAclForFile​(String filePath)
      • processExtraMetaDataForFile

        public org.pentaho.platform.api.repository2.unified.RepositoryFileExtraMetaData processExtraMetaDataForFile​(String filePath)
      • getSkippedFiles

        public HashSet<String> getSkippedFiles()
        Returns:
        the skippedFiles
      • setSkippedFiles

        public void setSkippedFiles​(HashSet<String> skippedFiles)
        Parameters:
        skippedFiles - the skippedFiles to set
      • getIsNotRunningImport

        public Boolean getIsNotRunningImport()
        Returns:
        the isNotRunningImport
      • getManifest

        public ExportManifest getManifest()
        Returns:
        the manifest
      • setManifest

        public void setManifest​(ExportManifest manifest)
        Parameters:
        manifest - the manifest to set
      • isApplyAclSettings

        public boolean isApplyAclSettings()
        Returns:
        the applyAclSettings
      • setApplyAclSettings

        public void setApplyAclSettings​(boolean applyAclSettings)
        Parameters:
        applyAclSettings - the applyAclSettings to set
      • isRetainOwnership

        public boolean isRetainOwnership()
        Returns:
        the retainOwnership
      • setRetainOwnership

        public void setRetainOwnership​(boolean retainOwnership)
        Parameters:
        retainOwnership - the retainOwnership to set
      • isOverwriteAclSettings

        public boolean isOverwriteAclSettings()
        Returns:
        the overwriteAclSettings
      • setOverwriteAclSettings

        public void setOverwriteAclSettings​(boolean overwriteAclSettings)
        Parameters:
        overwriteAclSettings - the overwriteAclSettings to set
      • getCurrentManifestKey

        public String getCurrentManifestKey()
        Returns:
        The key to finding the current file the export manifest.
      • setCurrentManifestKey

        public void setCurrentManifestKey​(String currentManifestKey)
        Parameters:
        Set - the key for looking up the current file in the manifest
      • getFoldersCreatedImplicitly

        public HashSet<String> getFoldersCreatedImplicitly()
        Returns:
        A set of folders (complete path) that were created on the fly due to files that had a path that included these folders. The list is kept so that if the folder entry, itself, is encountered later on in the zip file, the importer will know that this file was already processed as a new file, and not process it as a pre-existing file.
      • setAclProperties

        public void setAclProperties​(boolean applyAclSettingsFlag,
                                     boolean retainOwnershipFlag,
                                     boolean overwriteAclSettingsFlag)
        Sets the AclProperties.
        Parameters:
        applyAclSettingsFlag -
        retainOwnershipFlag -
        overwriteAclSettingsFlag -
      • addImportedRepositoryFile

        public void addImportedRepositoryFile​(org.pentaho.platform.api.repository2.unified.RepositoryFile repositoryFile)
        Parameters:
        repositoryFile -
      • getImportedRepositoryFiles

        public HashSet<org.pentaho.platform.api.repository2.unified.RepositoryFile> getImportedRepositoryFiles()
        Returns:
      • addImportedScheduleJobId

        public void addImportedScheduleJobId​(String jobId)
        Parameters:
        jobId -
      • getImportedScheduleJobIds

        public List<String> getImportedScheduleJobIds()
        Returns:
      • clearSession

        public static void clearSession()
        Removes the current thread's value for this thread-local variable