Class JcrExporter
- java.lang.Object
-
- org.apache.jackrabbit.vault.fs.io.AbstractExporter
-
- org.apache.jackrabbit.vault.fs.io.JcrExporter
-
- All Implemented Interfaces:
AutoCloseable
public class JcrExporter extends AbstractExporter
Implements a Vault filesystem exporter that exports Vault files to a JCR repository. It uses thePlatformNameFormatfor formatting the jcr file names to local ones.
-
-
Field Summary
-
Fields inherited from class org.apache.jackrabbit.vault.fs.io.AbstractExporter
exportInfo
-
-
Constructor Summary
Constructors Constructor Description JcrExporter(Node localFile)Constructs a new jcr exporter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Closes the exporter and releases the undelying structures.voidcreateDirectory(String relPath)voidcreateDirectory(VaultFile file, String relPath)booleanisAutoDeleteFiles()voidopen()Opens the exporter and initializes the undelying structures.voidsetAutoDeleteFiles(boolean autoDeleteFiles)voidwriteFile(InputStream in, String relPath)The specified stream is automatically closed after this method returns or throws an exception.voidwriteFile(VaultFile file, String relPath)-
Methods 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 Detail
-
JcrExporter
public JcrExporter(Node localFile)
Constructs a new jcr exporter.- Parameters:
localFile- the local parent folder
-
-
Method Detail
-
isAutoDeleteFiles
public boolean isAutoDeleteFiles()
-
setAutoDeleteFiles
public void setAutoDeleteFiles(boolean autoDeleteFiles)
-
open
public void open() throws IOException, RepositoryExceptionOpens 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
public void close() throws IOException, RepositoryExceptionCloses the exporter and releases the undelying structures.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein classAbstractExporter- Throws:
IOException- if an I/O error occursRepositoryException- if a repository error occurs
-
createDirectory
public void createDirectory(VaultFile file, String relPath) throws RepositoryException, IOException
- Specified by:
createDirectoryin classAbstractExporter- Throws:
RepositoryExceptionIOException
-
createDirectory
public void createDirectory(String relPath) throws IOException
- Specified by:
createDirectoryin classAbstractExporter- Throws:
IOException
-
writeFile
public void writeFile(VaultFile file, String relPath) throws RepositoryException, IOException
- Specified by:
writeFilein classAbstractExporter- Throws:
RepositoryExceptionIOException
-
writeFile
public void writeFile(InputStream in, String relPath) throws IOException
Description copied from class:AbstractExporterThe specified stream is automatically closed after this method returns or throws an exception.
- Specified by:
writeFilein classAbstractExporter- Throws:
IOException
-
-