Class TransactionImpl
- java.lang.Object
-
- org.apache.jackrabbit.vault.fs.impl.TransactionImpl
-
- All Implemented Interfaces:
VaultFsTransaction
public class TransactionImpl extends Object implements VaultFsTransaction
Provides transactional brackets around a write back transaction to the Vault filesystem. A transaction is always needed due to the fact that several jcr files could belong to the same artifact. This is only used from Vault CLI but not during package import which uses theImporter
instead. TODO: check all vault operations!
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
TransactionImpl.Change
-
Nested classes/interfaces inherited from interface org.apache.jackrabbit.vault.fs.api.VaultFsTransaction
VaultFsTransaction.Info, VaultFsTransaction.Type
-
-
Constructor Summary
Constructors Constructor Description TransactionImpl(VaultFileSystem fs)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description VaultFileOutput
add(String path, VaultInputSource input)
Collection<VaultFsTransaction.Info>
commit()
Commits the transaction and uploads all modifications to the repository.void
delete(VaultFile file)
AutoSave
getAutoSave()
boolean
isVerbose()
void
mkdir(String path)
void
modify(VaultFile file, VaultInputSource input)
void
setVerbose(boolean verbose)
-
-
-
Constructor Detail
-
TransactionImpl
public TransactionImpl(VaultFileSystem fs)
-
-
Method Detail
-
getAutoSave
public AutoSave getAutoSave()
-
isVerbose
public boolean isVerbose()
- Specified by:
isVerbose
in interfaceVaultFsTransaction
-
setVerbose
public void setVerbose(boolean verbose)
- Specified by:
setVerbose
in interfaceVaultFsTransaction
-
delete
public void delete(VaultFile file) throws IOException
- Specified by:
delete
in interfaceVaultFsTransaction
- Throws:
IOException
-
modify
public void modify(VaultFile file, VaultInputSource input) throws IOException
- Specified by:
modify
in interfaceVaultFsTransaction
- Throws:
IOException
-
add
public VaultFileOutput add(String path, VaultInputSource input) throws IOException, RepositoryException
- Specified by:
add
in interfaceVaultFsTransaction
- Throws:
IOException
RepositoryException
-
mkdir
public void mkdir(String path) throws IOException, RepositoryException
- Specified by:
mkdir
in interfaceVaultFsTransaction
- Throws:
IOException
RepositoryException
-
commit
public Collection<VaultFsTransaction.Info> commit() throws RepositoryException, IOException
Description copied from interface:VaultFsTransaction
Commits the transaction and uploads all modifications to the repository.- Specified by:
commit
in interfaceVaultFsTransaction
- Returns:
- a list of modifications
- Throws:
RepositoryException
- if a repository error occursIOException
- if an I/O error occurs
-
-