Class VFSDataStore

    • Constructor Detail

      • VFSDataStore

        public VFSDataStore()
    • Method Detail

      • init

        public void init​(String homeDir)
                  throws RepositoryException
        Description copied from class: CachingDataStore
        Initialized the data store. If the path is not set, <repository home>/repository/datastore is used. This directory is automatically created if it does not yet exist. During first initialization, it upload all files from local datastore to backed and local datastore act as a local cache.
        Specified by:
        init in interface DataStore
        Overrides:
        init in class CachingDataStore
        Parameters:
        homeDir - the home directory of the repository
        Throws:
        RepositoryException
      • getFileSystemManagerClassName

        public String getFileSystemManagerClassName()
        Returns the class name of the VFS FileSystemManager instance used in this VFS data store.
        Returns:
      • setFileSystemManagerClassName

        public void setFileSystemManagerClassName​(String fileSystemManagerClassName)
        Sets the class name of the VFS FileSystemManager instance used in this VFS data store. If this is not set, then StandardFileSystemManager is used by default.
        Parameters:
        fileSystemManagerClassName -
      • getFileSystemManager

        public org.apache.commons.vfs2.FileSystemManager getFileSystemManager()
        Returns the VFS FileSystemManager instance used in this VFS data store.
        Returns:
        the VFS FileSystemManager instance used in this VFS data store
      • getFileSystemOptions

        public org.apache.commons.vfs2.FileSystemOptions getFileSystemOptions()
                                                                       throws RepositoryException
        Returns FileSystemOptions instance used when resolving the baseFolder. This may return null if FileSystemOptions instance was not injected or a fileSystemOptionsProperties instance cannot be injected or created. Therefore, the caller should check whether or not this returns null. When returning null, the caller may not use a FileSystemOptions instance.
        Returns:
        FileSystemOptions instance used when resolving the baseFolder
        Throws:
        RepositoryException
      • setFileSystemOptions

        public void setFileSystemOptions​(org.apache.commons.vfs2.FileSystemOptions fileSystemOptions)
        Sets the FileSystemOptions instance used when resolving the baseFolder.
        Parameters:
        fileSystemOptions - FileSystemOptions instance used when resolving the baseFolder
      • setFileSystemOptionsProperties

        public void setFileSystemOptionsProperties​(Properties fileSystemOptionsProperties)
        Sets the properties used when building a FileSystemOptions, using DelegatingFileSystemOptionsBuilder.
        Parameters:
        fileSystemOptionsProperties - properties used when building a FileSystemOptions
      • setFileSystemOptionsPropertiesInString

        public void setFileSystemOptionsPropertiesInString​(String fileSystemOptionsPropertiesInString)
        Sets the properties in a semi-colon delimited string used when building a FileSystemOptions, using DelegatingFileSystemOptionsBuilder.
        Parameters:
        fileSystemOptionsPropertiesInString - properties in String
      • setBaseFolderUri

        public void setBaseFolderUri​(String baseFolderUri)
        Sets the base VFS folder URI.
        Parameters:
        baseFolderUri - base VFS folder URI
      • getAsyncWritePoolSize

        public int getAsyncWritePoolSize()
        Returns the pool size of the async write pool executor.
        Returns:
        the pool size of the async write pool executor
      • setAsyncWritePoolSize

        public void setAsyncWritePoolSize​(int asyncWritePoolSize)
        Sets the pool size of the async write pool executor.
        Parameters:
        asyncWritePoolSize - pool size of the async write pool executor
      • createFileSystemManager

        protected org.apache.commons.vfs2.FileSystemManager createFileSystemManager()
                                                                             throws RepositoryException
        Creates a FileSystemManager instance.
        Returns:
        a FileSystemManager instance.
        Throws:
        RepositoryException - if an error occurs creating the manager.
      • createFileSystemOptions

        protected org.apache.commons.vfs2.FileSystemOptions createFileSystemOptions()
                                                                             throws RepositoryException
        Builds and returns FileSystemOptions instance which is used when resolving the baseFolder during the initialization. If fileSystemOptionsProperties is available, this scans all the property key names starting with FILE_SYSTEM_OPTIONS_PROP_PREFIX and uses the rest of the key name after the FILE_SYSTEM_OPTIONS_PROP_PREFIX as the combination of scheme and property name when building a FileSystemOptions using DelegatingFileSystemOptionsBuilder.
        Returns:
        FileSystemOptions instance which is used when resolving the baseFolder during the initialization
        Throws:
        RepositoryException - if any file system exception occurs
      • getFileSystemOptionsProperties

        protected Properties getFileSystemOptionsProperties()
        Returns properties used when building a FileSystemOptions instance by the properties during the initialization.
        Returns:
        properties used when building a FileSystemOptions instance by the properties during the initialization