Class AbstractExporter
- java.lang.Object
 - 
- org.apache.jackrabbit.vault.fs.io.AbstractExporter
 
 
- 
- All Implemented Interfaces:
 java.lang.AutoCloseable
- Direct Known Subclasses:
 JarExporter,JcrExporter,PlatformExporter
public abstract class AbstractExporter extends java.lang.Object implements java.lang.AutoCloseableGeneric context for exporters 
- 
- 
Constructor Summary
Constructors Constructor Description AbstractExporter() 
- 
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract voidclose()Closes the exporter and releases the undelying structures.abstract voidcreateDirectory(java.lang.String relPath)abstract voidcreateDirectory(VaultFile file, java.lang.String relPath)voidexport(VaultFile parent)Exports the given vault file and writes the META-INF data.voidexport(VaultFile parent, boolean noClose)Exports the given vault file and writes the META-INF data.voidexport(VaultFile parent, java.lang.String relPath)Exports the vault file to the relative path.ExportInfogetExportInfo()java.lang.StringgetGenerator()java.lang.StringgetRootPath()booleanisNoMetaInf()booleanisRelativePaths()booleanisVerbose()abstract voidopen()Opens the exporter and initializes the undelying structures.voidsetGenerator(java.lang.String generator)voidsetNoMetaInf(boolean noMetaInf)voidsetProperties(java.util.Properties properties)voidsetProperty(java.lang.String name, java.lang.String value)voidsetProperty(java.lang.String name, java.util.Calendar value)voidsetRelativePaths(boolean relativePaths)Defines if the exported files should include their entire path or just be relative to the export root.voidsetRootPath(java.lang.String rootPath)voidsetVerbose(ProgressTrackerListener out)abstract voidwriteFile(java.io.InputStream in, java.lang.String relPath)The specified stream is automatically closed after this method returns or throws an exception.abstract voidwriteFile(VaultFile file, java.lang.String relPath) 
 - 
 
- 
- 
Method Detail
- 
isVerbose
public boolean isVerbose()
 
- 
setVerbose
public void setVerbose(ProgressTrackerListener out)
 
- 
isRelativePaths
public boolean isRelativePaths()
 
- 
setProperty
public void setProperty(java.lang.String name, java.lang.String value) 
- 
setProperty
public void setProperty(java.lang.String name, java.util.Calendar value) 
- 
setProperties
public void setProperties(java.util.Properties properties)
 
- 
getGenerator
public java.lang.String getGenerator()
- Returns:
 - generator information (for diagnostical purposes; usually in
         "name:version" format). 
nullwhen n/a. Defaults to "org.apache.jackrabbit.vault:version". 
 
- 
setGenerator
public void setGenerator(java.lang.String generator)
- Parameters:
 generator- generator information (for diagnostical purposes; usually in "name:version" format).nullwhen n/a.
 
- 
getRootPath
public java.lang.String getRootPath()
 
- 
setRootPath
public void setRootPath(java.lang.String rootPath)
 
- 
isNoMetaInf
public boolean isNoMetaInf()
 
- 
setNoMetaInf
public void setNoMetaInf(boolean noMetaInf)
 
- 
getExportInfo
public ExportInfo getExportInfo()
 
- 
setRelativePaths
public void setRelativePaths(boolean relativePaths)
Defines if the exported files should include their entire path or just be relative to the export root. eg.: exporting /apps/components relative would not include /apps in the path.- Parameters:
 relativePaths- relative flag
 
- 
export
public void export(VaultFile parent) throws javax.jcr.RepositoryException, java.io.IOException
Exports the given vault file and writes the META-INF data.- Parameters:
 parent- the vault file- Throws:
 javax.jcr.RepositoryException- if an error occursjava.io.IOException- if an I/O error occurs
 
- 
export
public void export(VaultFile parent, boolean noClose) throws javax.jcr.RepositoryException, java.io.IOException
Exports the given vault file and writes the META-INF data.- Parameters:
 parent- the vault filenoClose- iftrueexporter will not be closed after export- Throws:
 javax.jcr.RepositoryException- if an error occursjava.io.IOException- if an I/O error occurs
 
- 
export
public void export(VaultFile parent, java.lang.String relPath) throws javax.jcr.RepositoryException, java.io.IOException
Exports the vault file to the relative path.- Parameters:
 parent- the filerelPath- the path- Throws:
 javax.jcr.RepositoryException- if an error occursjava.io.IOException- if an I/O error occurs
 
- 
open
public abstract void open() throws java.io.IOException, javax.jcr.RepositoryExceptionOpens the exporter and initializes the undelying structures.- Throws:
 java.io.IOException- if an I/O error occursjavax.jcr.RepositoryException- if a repository error occurs
 
- 
close
public abstract void close() throws java.io.IOException, javax.jcr.RepositoryExceptionCloses the exporter and releases the undelying structures.- Specified by:
 closein interfacejava.lang.AutoCloseable- Throws:
 java.io.IOException- if an I/O error occursjavax.jcr.RepositoryException- if a repository error occurs
 
- 
createDirectory
public abstract void createDirectory(java.lang.String relPath) throws java.io.IOException- Throws:
 java.io.IOException
 
- 
createDirectory
public abstract void createDirectory(VaultFile file, java.lang.String relPath) throws javax.jcr.RepositoryException, java.io.IOException
- Throws:
 javax.jcr.RepositoryExceptionjava.io.IOException
 
- 
writeFile
public abstract void writeFile(java.io.InputStream in, java.lang.String relPath) throws java.io.IOExceptionThe specified stream is automatically closed after this method returns or throws an exception.
- Parameters:
 in-relPath-- Throws:
 java.io.IOException
 
- 
writeFile
public abstract void writeFile(VaultFile file, java.lang.String relPath) throws javax.jcr.RepositoryException, java.io.IOException
- Throws:
 javax.jcr.RepositoryExceptionjava.io.IOException
 
 - 
 
 -