Class VaultFileSystemImpl
java.lang.Object
org.apache.jackrabbit.vault.fs.impl.VaultFileSystemImpl
- All Implemented Interfaces:
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 Summary
ConstructorsConstructorDescriptionVaultFileSystemImpl(Aggregate rootAggregate, String rootPath, boolean ownMgr) Creates a new os file system that uses the given manager. -
Method Summary
Modifier and TypeMethodDescriptionReturns the attached artifacts manager.Returns the vault configuration that is usedReturns the file at the given path.Returns the file at the given path.getRoot()Returns the root fileReturns the current workspace filtervoidFlushes the file cachebooleanChecks if this tree is still mounted and if the attached session is still live.Starts a new transaction.voidunmount()Releases all resources attached to this Vault filesystem
-
Constructor Details
-
VaultFileSystemImpl
public VaultFileSystemImpl(Aggregate rootAggregate, String rootPath, boolean ownMgr) throws IOException, RepositoryException Creates a new os file system that uses the given manager.- Parameters:
rootAggregate- the root artifacts noderootPath- path of the root node in platform format (compare withPlatformNameFormat)ownMgr-trueif it's own manager- Throws:
IOException- if an I/O error occursRepositoryException- if a repository error occurs.
-
-
Method Details
-
unmount
Description copied from interface:VaultFileSystemReleases all resources attached to this Vault filesystem- Specified by:
unmountin interfaceVaultFileSystem- Throws:
RepositoryException- if an error occurs.
-
isMounted
public boolean isMounted()Description copied from interface:VaultFileSystemChecks if this tree is still mounted and if the attached session is still live.- Specified by:
isMountedin interfaceVaultFileSystem- Returns:
trueif still mounted
-
getRoot
Description copied from interface:VaultFileSystemReturns the root file- Specified by:
getRootin interfaceVaultFileSystem- Returns:
- the root file
-
getAggregateManager
Description copied from interface:VaultFileSystemReturns the attached artifacts manager.- Specified by:
getAggregateManagerin interfaceVaultFileSystem- Returns:
- the attached artifacts manager.
-
getFile
Description copied from interface:VaultFileSystemReturns the file at the given path. If the file does not existsnullis thrown.- Specified by:
getFilein interfaceVaultFileSystem- Parameters:
path- the path of the file- Returns:
- the file or
null - Throws:
IOException- if an I/O error occurs.RepositoryException- if a repository error occurs.
-
getFile
Description copied from interface:VaultFileSystemReturns the file at the given path. The path can be relative and may contain ".." path elements. If the file does not existsnullis returned.- Specified by:
getFilein interfaceVaultFileSystem- Parameters:
parent- the parent file.path- the path of the file- Returns:
- the file or
null - Throws:
IOException- if an I/O error occurs.RepositoryException- if a repository error occurs.
-
startTransaction
Description copied from interface:VaultFileSystemStarts a new transaction.- Specified by:
startTransactionin interfaceVaultFileSystem- Returns:
- a new transaction.
-
invalidate
Description copied from interface:VaultFileSystemFlushes the file cache- Specified by:
invalidatein interfaceVaultFileSystem- Throws:
RepositoryException- if an error occurs
-
getConfig
Description copied from interface:VaultFileSystemReturns the vault configuration that is used- Specified by:
getConfigin interfaceVaultFileSystem- Returns:
- the vault configuration.
-
getWorkspaceFilter
Description copied from interface:VaultFileSystemReturns the current workspace filter- Specified by:
getWorkspaceFilterin interfaceVaultFileSystem- Returns:
- the workspace filter
-