Class JcrExporter
- java.lang.Object
-
- org.apache.jackrabbit.vault.fs.io.AbstractExporter
-
- org.apache.jackrabbit.vault.fs.io.JcrExporter
-
- All Implemented Interfaces:
java.lang.AutoCloseable
public class JcrExporter extends AbstractExporter
Implements a Vault filesystem exporter that exports Vault files to a JCR repository. It uses thePlatformNameFormat
for formatting the jcr file names to local ones.
-
-
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 void
close()
Closes the exporter and releases the undelying structures.void
createDirectory(java.lang.String relPath)
void
createDirectory(VaultFile file, java.lang.String relPath)
boolean
isAutoDeleteFiles()
void
open()
Opens the exporter and initializes the undelying structures.void
setAutoDeleteFiles(boolean autoDeleteFiles)
void
writeFile(java.io.InputStream in, java.lang.String relPath)
The specified stream remains open after this method returns.void
writeFile(VaultFile file, java.lang.String relPath)
-
Methods inherited from class org.apache.jackrabbit.vault.fs.io.AbstractExporter
export, export, export, getExportInfo, getRootPath, isNoMetaInf, isRelativePaths, isVerbose, setNoMetaInf, setProperties, setProperty, setProperty, setRelativePaths, setRootPath, setVerbose
-
-
-
-
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 java.io.IOException, RepositoryException
Opens the exporter and initializes the undelying structures.- Specified by:
open
in classAbstractExporter
- Throws:
java.io.IOException
- if an I/O error occursRepositoryException
- if a repository error occurs
-
close
public void close() throws java.io.IOException, RepositoryException
Closes the exporter and releases the undelying structures.- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in classAbstractExporter
- Throws:
java.io.IOException
- if an I/O error occursRepositoryException
- if a repository error occurs
-
createDirectory
public void createDirectory(VaultFile file, java.lang.String relPath) throws RepositoryException, java.io.IOException
- Specified by:
createDirectory
in classAbstractExporter
- Throws:
RepositoryException
java.io.IOException
-
createDirectory
public void createDirectory(java.lang.String relPath) throws java.io.IOException
- Specified by:
createDirectory
in classAbstractExporter
- Throws:
java.io.IOException
-
writeFile
public void writeFile(VaultFile file, java.lang.String relPath) throws RepositoryException, java.io.IOException
- Specified by:
writeFile
in classAbstractExporter
- Throws:
RepositoryException
java.io.IOException
-
writeFile
public void writeFile(java.io.InputStream in, java.lang.String relPath) throws java.io.IOException
Description copied from class:AbstractExporter
The specified stream remains open after this method returns.
- Specified by:
writeFile
in classAbstractExporter
- Throws:
java.io.IOException
-
-