public class RepositoryFileImportFileHandler extends Object implements IPlatformImportHandler
Constructor and Description |
---|
RepositoryFileImportFileHandler(List<org.pentaho.platform.api.mimetype.IMimeType> mimeTypes) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
copyFileToRepository(RepositoryFileImportBundle bundle,
String repositoryPath,
org.pentaho.platform.api.repository2.unified.RepositoryFile file)
Copies the file bundle into the repository
|
protected org.pentaho.platform.api.repository2.unified.RepositoryFile |
createFile(RepositoryFileImportBundle bundle,
String repositoryPath,
org.pentaho.platform.api.repository2.unified.IRepositoryFileData data)
Creates a new file in the repository
|
org.pentaho.platform.api.repository2.unified.RepositoryFile |
createFolderJustInTime(String folderPath,
String manifestKey) |
ImportSession |
getImportSession() |
List<String> |
getKnownExtensions() |
org.apache.commons.logging.Log |
getLogger() |
Map<String,org.pentaho.platform.api.mimetype.IMimeType> |
getMimeTypeMap() |
List<org.pentaho.platform.api.mimetype.IMimeType> |
getMimeTypes() |
protected Serializable |
getParentId(String repositoryPath)
Returns the Id of the parent folder of the file path provided
|
org.pentaho.platform.api.repository2.unified.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(org.pentaho.platform.api.repository2.unified.IPlatformImportBundle bnd)
Import the provided IPlatformImportBundle into the platform.
|
void |
setDefaultAclHandler(org.pentaho.platform.api.repository2.unified.IRepositoryDefaultAclHandler defaultAclHandler) |
void |
setKnownExtensions(List<String> knownExtensions) |
void |
setRepository(org.pentaho.platform.api.repository2.unified.IUnifiedRepository repository) |
protected org.pentaho.platform.api.repository2.unified.RepositoryFile |
updateFile(RepositoryFileImportBundle bundle,
org.pentaho.platform.api.repository2.unified.RepositoryFile file,
org.pentaho.platform.api.repository2.unified.IRepositoryFileData data)
Updates a file in the repository
|
public RepositoryFileImportFileHandler(List<org.pentaho.platform.api.mimetype.IMimeType> mimeTypes)
public org.apache.commons.logging.Log getLogger()
public ImportSession getImportSession()
public void importFile(org.pentaho.platform.api.repository2.unified.IPlatformImportBundle bnd) throws PlatformImportException
IPlatformImportHandler
importFile
in interface IPlatformImportHandler
PlatformImportException
protected boolean copyFileToRepository(RepositoryFileImportBundle bundle, String repositoryPath, org.pentaho.platform.api.repository2.unified.RepositoryFile file) throws PlatformImportException
bundle
- repositoryPath
- file
- PlatformImportException
protected org.pentaho.platform.api.repository2.unified.RepositoryFile createFile(RepositoryFileImportBundle bundle, String repositoryPath, org.pentaho.platform.api.repository2.unified.IRepositoryFileData data) throws PlatformImportException
bundle
- data
- PlatformImportException
protected org.pentaho.platform.api.repository2.unified.RepositoryFile updateFile(RepositoryFileImportBundle bundle, org.pentaho.platform.api.repository2.unified.RepositoryFile file, org.pentaho.platform.api.repository2.unified.IRepositoryFileData data) throws PlatformImportException
PlatformImportException
protected String getTitle(String name)
name
- protected Serializable getParentId(String repositoryPath)
repositoryPath
- public org.pentaho.platform.api.repository2.unified.IUnifiedRepository getRepository()
public void setRepository(org.pentaho.platform.api.repository2.unified.IUnifiedRepository repository)
public void setDefaultAclHandler(org.pentaho.platform.api.repository2.unified.IRepositoryDefaultAclHandler defaultAclHandler)
public org.pentaho.platform.api.repository2.unified.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<org.pentaho.platform.api.mimetype.IMimeType> getMimeTypes()
getMimeTypes
in interface IPlatformImportHandler
Copyright © 2018 Hitachi Vantara. All rights reserved.