public class RepositoryFileImportFileHandler extends Object implements IPlatformImportHandler
Constructor and Description |
---|
RepositoryFileImportFileHandler(List<IMimeType> mimeTypes) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
copyFileToRepository(RepositoryFileImportBundle bundle,
String repositoryPath,
RepositoryFile file)
Copies the file bundle into the repository
|
protected RepositoryFile |
createFile(RepositoryFileImportBundle bundle,
String repositoryPath,
IRepositoryFileData data)
Creates a new file in the repository
|
RepositoryFile |
createFolderJustInTime(String folderPath,
String manifestKey) |
ImportSession |
getImportSession() |
List<String> |
getKnownExtensions() |
org.apache.commons.logging.Log |
getLogger() |
Map<String,IMimeType> |
getMimeTypeMap() |
List<IMimeType> |
getMimeTypes() |
protected Serializable |
getParentId(String repositoryPath)
Returns the Id of the parent folder of the file path provided
|
IUnifiedRepository |
getRepository() |
protected String |
getTitle(String name)
truncate the extension from the file name for the extension only if it is file with known extension
|
void |
importFile(IPlatformImportBundle bnd)
Import the provided IPlatformImportBundle into the platform.
|
void |
setDefaultAclHandler(IRepositoryDefaultAclHandler defaultAclHandler) |
void |
setKnownExtensions(List<String> knownExtensions) |
void |
setRepository(IUnifiedRepository repository) |
protected RepositoryFile |
updateFile(RepositoryFileImportBundle bundle,
RepositoryFile file,
IRepositoryFileData data)
Updates a file in the repository
|
public org.apache.commons.logging.Log getLogger()
public ImportSession getImportSession()
public void importFile(IPlatformImportBundle bnd) throws PlatformImportException
IPlatformImportHandler
importFile
in interface IPlatformImportHandler
PlatformImportException
protected boolean copyFileToRepository(RepositoryFileImportBundle bundle, String repositoryPath, RepositoryFile file) throws PlatformImportException
bundle
- repositoryPath
- file
- PlatformImportException
protected RepositoryFile createFile(RepositoryFileImportBundle bundle, String repositoryPath, IRepositoryFileData data) throws PlatformImportException
bundle
- data
- PlatformImportException
protected RepositoryFile updateFile(RepositoryFileImportBundle bundle, RepositoryFile file, IRepositoryFileData data) throws PlatformImportException
PlatformImportException
protected String getTitle(String name)
name
- protected Serializable getParentId(String repositoryPath)
repositoryPath
- public IUnifiedRepository getRepository()
public void setRepository(IUnifiedRepository repository)
public void setDefaultAclHandler(IRepositoryDefaultAclHandler defaultAclHandler)
public RepositoryFile createFolderJustInTime(String folderPath, String manifestKey) throws PlatformImportException, org.pentaho.metadata.repository.DomainIdNullException, org.pentaho.metadata.repository.DomainAlreadyExistsException, org.pentaho.metadata.repository.DomainStorageException, IOException
PlatformImportException
org.pentaho.metadata.repository.DomainIdNullException
org.pentaho.metadata.repository.DomainAlreadyExistsException
org.pentaho.metadata.repository.DomainStorageException
IOException
public List<IMimeType> getMimeTypes()
getMimeTypes
in interface IPlatformImportHandler
Copyright © 2002–2017 Pentaho Corporation. All rights reserved.