Class PlatformExporter
java.lang.Object
org.apache.jackrabbit.vault.fs.io.AbstractExporter
org.apache.jackrabbit.vault.fs.io.PlatformExporter
- All Implemented Interfaces:
AutoCloseable
Implements a Vault filesystem exporter that exports Vault files to a platform
file system.
It uses the
PlatformNameFormat for formatting the jcr file
names to local ones.-
Field Summary
Fields inherited from class org.apache.jackrabbit.vault.fs.io.AbstractExporter
exportInfo -
Constructor Summary
ConstructorsConstructorDescriptionPlatformExporter(File localFile) Constructs a new jar exporter that writes to the given file. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes the exporter and releases the undelying structures.voidcreateDirectory(String relPath) voidcreateDirectory(VaultFile file, String relPath) voidopen()Opens the exporter and initializes the undelying structures.booleanChecks if 'prune-missing' is enabled.voidsetPruneMissing(boolean pruneMissing) Sets the 'prune-missing' flag.voidwriteFile(InputStream in, String relPath) The specified stream is automatically closed after this method returns or throws an exception.voidMethods inherited from class org.apache.jackrabbit.vault.fs.io.AbstractExporter
export, export, export, getExportInfo, getGenerator, getPlatformFilePath, getRootPath, isNoMetaInf, isRelativePaths, isVerbose, setGenerator, setNoMetaInf, setProperties, setProperty, setProperty, setRelativePaths, setRootPath, setVerbose, track, track
-
Constructor Details
-
PlatformExporter
Constructs a new jar exporter that writes to the given file.- Parameters:
localFile- the local parent directory
-
-
Method Details
-
pruneMissing
public boolean pruneMissing()Checks if 'prune-missing' is enabled.- Returns:
trueif prune-missing is enabled
-
setPruneMissing
public void setPruneMissing(boolean pruneMissing) Sets the 'prune-missing' flag.- Parameters:
pruneMissing- the flag
-
open
Opens the exporter and initializes the undelying structures.- Specified by:
openin classAbstractExporter- Throws:
IOException- if an I/O error occursRepositoryException- if a repository error occurs
-
close
Closes the exporter and releases the undelying structures.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein classAbstractExporter- Throws:
IOException- if an I/O error occurs
-
createDirectory
- Specified by:
createDirectoryin classAbstractExporter- Throws:
RepositoryExceptionIOException
-
createDirectory
- Specified by:
createDirectoryin classAbstractExporter- Throws:
IOException
-
writeFile
- Specified by:
writeFilein classAbstractExporter- Throws:
RepositoryExceptionIOException
-
writeFile
Description copied from class:AbstractExporterThe specified stream is automatically closed after this method returns or throws an exception.
- Specified by:
writeFilein classAbstractExporter- Throws:
IOException
-