Class VaultFileSystemImpl

  • All Implemented Interfaces:
    VaultFileSystem

    public class VaultFileSystemImpl
    extends Object
    implements VaultFileSystem
    The Vault filesystem provides an additional abstraction layer on top of the artifacts manager tree. It is used to map the artifacts node artifacts to individual java.io like files.
    • Constructor Detail

      • VaultFileSystemImpl

        public VaultFileSystemImpl​(Aggregate rootAggregate,
                                   String rootPath,
                                   boolean ownMgr)
                            throws IOException,
                                   javax.jcr.RepositoryException
        Creates a new os file system that uses the given manager.
        Parameters:
        rootAggregate - the root artifacts node
        rootPath - path of root file. used for remapping
        ownMgr - true if it's own manager
        Throws:
        IOException - if an I/O error occurs
        javax.jcr.RepositoryException - if a repository error occurs.
    • Method Detail

      • unmount

        public void unmount()
                     throws javax.jcr.RepositoryException
        Description copied from interface: VaultFileSystem
        Releases all resources attached to this Vault filesystem
        Specified by:
        unmount in interface VaultFileSystem
        Throws:
        javax.jcr.RepositoryException - if an error occurs.
      • isMounted

        public boolean isMounted()
        Description copied from interface: VaultFileSystem
        Checks if this tree is still mounted and if the attached session is still live.
        Specified by:
        isMounted in interface VaultFileSystem
        Returns:
        true if still mounted
      • getFile

        public VaultFile getFile​(String path)
                          throws IOException,
                                 javax.jcr.RepositoryException
        Description copied from interface: VaultFileSystem
        Returns the file at the given path. If the file does not exists null is thrown.
        Specified by:
        getFile in interface VaultFileSystem
        Parameters:
        path - the path of the file
        Returns:
        the file or null
        Throws:
        IOException - if an I/O error occurs.
        javax.jcr.RepositoryException - if a repository error occurs.
      • getFile

        public VaultFile getFile​(VaultFile parent,
                                 String path)
                          throws IOException,
                                 javax.jcr.RepositoryException
        Description copied from interface: VaultFileSystem
        Returns the file at the given path. The path can be relative and may contain ".." path elements. If the file does not exists null is returned.
        Specified by:
        getFile in interface VaultFileSystem
        Parameters:
        parent - the parent file.
        path - the path of the file
        Returns:
        the file or null
        Throws:
        IOException - if an I/O error occurs.
        javax.jcr.RepositoryException - if a repository error occurs.
      • invalidate

        public void invalidate()
                        throws javax.jcr.RepositoryException
        Description copied from interface: VaultFileSystem
        Flushes the file cache
        Specified by:
        invalidate in interface VaultFileSystem
        Throws:
        javax.jcr.RepositoryException - if an error occurs