Class ImportSession
- java.lang.Object
-
- org.pentaho.platform.plugin.services.importexport.ImportSession
-
public class ImportSession extends Object
General purpose objects whose lifecycle is that of an formal import session- Author:
- TKafalas
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
ImportSession.ManifestFile
-
Field Summary
Fields Modifier and Type Field Description static IPlatformImporter
iPlatformImporter
-
Constructor Summary
Constructors Constructor Description ImportSession()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addImportedRepositoryFile(org.pentaho.platform.api.repository2.unified.RepositoryFile repositoryFile)
void
addImportedScheduleJobId(String jobId)
static void
clearSession()
Removes the current thread's value for this thread-local variableString
getCurrentManifestKey()
HashSet<String>
getFoldersCreatedImplicitly()
HashSet<org.pentaho.platform.api.repository2.unified.RepositoryFile>
getImportedRepositoryFiles()
List<String>
getImportedScheduleJobIds()
Boolean
getIsNotRunningImport()
org.apache.commons.logging.Log
getLogger()
ExportManifest
getManifest()
ImportSession.ManifestFile
getManifestFile(String filePath, boolean isFileExist)
static ImportSession
getSession()
HashSet<String>
getSkippedFiles()
void
initialize()
Clear out any collections, most likely before starting a new importboolean
isApplyAclSettings()
Boolean
isFileHidden(String filePath)
Deprecated.boolean
isOverwriteAclSettings()
boolean
isRetainOwnership()
org.pentaho.platform.api.repository2.unified.RepositoryFileAcl
processAclForFile(String filePath)
org.pentaho.platform.api.repository2.unified.RepositoryFileExtraMetaData
processExtraMetaDataForFile(String filePath)
void
setAclProperties(boolean applyAclSettingsFlag, boolean retainOwnershipFlag, boolean overwriteAclSettingsFlag)
Sets the AclProperties.void
setApplyAclSettings(boolean applyAclSettings)
void
setCurrentManifestKey(String currentManifestKey)
void
setManifest(ExportManifest manifest)
void
setOverwriteAclSettings(boolean overwriteAclSettings)
void
setRetainOwnership(boolean retainOwnership)
void
setSkippedFiles(HashSet<String> skippedFiles)
-
-
-
Field Detail
-
iPlatformImporter
public static IPlatformImporter iPlatformImporter
-
-
Method Detail
-
getSession
public static ImportSession getSession()
-
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:
-
getManifestFile
public ImportSession.ManifestFile getManifestFile(String filePath, boolean isFileExist)
-
processAclForFile
public org.pentaho.platform.api.repository2.unified.RepositoryFileAcl processAclForFile(String filePath)
-
processExtraMetaDataForFile
public org.pentaho.platform.api.repository2.unified.RepositoryFileExtraMetaData processExtraMetaDataForFile(String filePath)
-
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
-
-
clearSession
public static void clearSession()
Removes the current thread's value for this thread-local variable
-
-