Class RepositoryFileImportFileHandler

    • Constructor Detail

      • RepositoryFileImportFileHandler

        public RepositoryFileImportFileHandler​(List<org.pentaho.platform.api.mimetype.IMimeType> mimeTypes)
    • Method Detail

      • getLogger

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

        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
        Updates a file in the repository
        Throws:
        PlatformImportException
      • getTitle

        protected String getTitle​(String name)
        truncate the extension from the file name for the extension only if it is file with known extension
        Parameters:
        name -
        Returns:
        title
      • getParentId

        protected Serializable getParentId​(String repositoryPath)
        Returns the Id of the parent folder of the file path provided
        Parameters:
        repositoryPath -
        Returns:
      • getRepository

        public org.pentaho.platform.api.repository2.unified.IUnifiedRepository getRepository()
      • setRepository

        public void setRepository​(org.pentaho.platform.api.repository2.unified.IUnifiedRepository repository)
      • setDefaultAclHandler

        public void setDefaultAclHandler​(org.pentaho.platform.api.repository2.unified.IRepositoryDefaultAclHandler defaultAclHandler)
      • createFolderJustInTime

        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
        Throws:
        PlatformImportException
        org.pentaho.metadata.repository.DomainIdNullException
        org.pentaho.metadata.repository.DomainAlreadyExistsException
        org.pentaho.metadata.repository.DomainStorageException
        IOException
      • getMimeTypeMap

        public Map<String,​org.pentaho.platform.api.mimetype.IMimeType> getMimeTypeMap()
      • setKnownExtensions

        public void setKnownExtensions​(List<String> knownExtensions)
      • getKnownExtensions

        public List<String> getKnownExtensions()