Package org.opencms.importexport
Class CmsVfsImportExportHandler
- java.lang.Object
-
- org.opencms.importexport.CmsVfsImportExportHandler
-
- All Implemented Interfaces:
I_CmsImportExportHandler
public class CmsVfsImportExportHandler extends java.lang.Object implements I_CmsImportExportHandler
Import/export handler implementation for VFS data.- Since:
- 6.0.0
-
-
Constructor Summary
Constructors Constructor Description CmsVfsImportExportHandler()
Creates a new VFS import/export handler.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
exportData(CmsObject cms, I_CmsReport report)
Exports the data from the Cms.long
getContentAge()
Deprecated.usesetExportParams(CmsExportParameters)
insteadjava.lang.String
getDescription()
Returns the description of this import/export handler.CmsExportParameters
getExportParams()
Returns the export parameters.java.util.List<java.lang.String>
getExportPaths()
Deprecated.usesetExportParams(CmsExportParameters)
insteadjava.lang.String
getFileName()
Deprecated.usesetExportParams(CmsExportParameters)
insteadCmsImportParameters
getImportParameters()
Returns the import parameters.void
importData(CmsObject cms, java.lang.String importFile, java.lang.String importPath, I_CmsReport report)
Deprecated.useimportData(CmsObject, I_CmsReport)
insteadvoid
importData(CmsObject cms, I_CmsReport report)
Imports the data into the Cms.boolean
isExportUserdata()
Deprecated.usesetExportParams(CmsExportParameters)
insteadboolean
isIncludeSystem()
Deprecated.usesetExportParams(CmsExportParameters)
insteadboolean
isIncludeUnchanged()
Deprecated.usesetExportParams(CmsExportParameters)
insteadboolean
isProjectOnly()
Deprecated.usesetExportParams(CmsExportParameters)
insteadboolean
isRecursive()
Deprecated.usesetExportParams(CmsExportParameters)
insteadboolean
matches(org.dom4j.Document manifest)
Checks, if this import/export handler matches with a specified manifest document of an import, so that it is able to import the data listed in the manifest document.void
setContentAge(long contentAge)
Deprecated.usesetExportParams(CmsExportParameters)
insteadvoid
setDescription(java.lang.String description)
Sets the description of this import/export handler.void
setExportParams(CmsExportParameters exportParams)
Sets the export parameters.void
setExportPaths(java.util.List<java.lang.String> exportPaths)
Deprecated.usesetExportParams(CmsExportParameters)
insteadvoid
setExportUserdata(boolean exportUserdata)
Deprecated.usesetExportParams(CmsExportParameters)
insteadvoid
setFileName(java.lang.String fileName)
Deprecated.usesetExportParams(CmsExportParameters)
insteadvoid
setImportParameters(CmsImportParameters importParams)
Sets the import parameters.void
setIncludeSystem(boolean excludeSystem)
Deprecated.usesetExportParams(CmsExportParameters)
insteadvoid
setIncludeUnchanged(boolean excludeUnchanged)
Deprecated.usesetExportParams(CmsExportParameters)
insteadvoid
setProjectOnly(boolean projectOnly)
Deprecated.usesetExportParams(CmsExportParameters)
insteadvoid
setRecursive(boolean recursive)
Deprecated.usesetExportParams(CmsExportParameters)
instead
-
-
-
Constructor Detail
-
CmsVfsImportExportHandler
public CmsVfsImportExportHandler()
Creates a new VFS import/export handler.
-
-
Method Detail
-
exportData
public void exportData(CmsObject cms, I_CmsReport report) throws CmsImportExportException, CmsRoleViolationException
Description copied from interface:I_CmsImportExportHandler
Exports the data from the Cms.- Specified by:
exportData
in interfaceI_CmsImportExportHandler
- Parameters:
cms
- the current OpenCms context objectreport
- a Cms report to print log messages- Throws:
CmsImportExportException
- if operation was not successfulCmsRoleViolationException
- if the current user has not the required role- See Also:
I_CmsImportExportHandler.exportData(org.opencms.file.CmsObject, org.opencms.report.I_CmsReport)
-
getContentAge
@Deprecated public long getContentAge()
Deprecated.usesetExportParams(CmsExportParameters)
insteadReturns the timestamp to limit the resources to be exported by date.Only resources that have been modified after this date will be exported.
- Returns:
- the timestamp to limit the resources to be exported by date
-
getDescription
public java.lang.String getDescription()
Description copied from interface:I_CmsImportExportHandler
Returns the description of this import/export handler.The description is useful to print some info about the purpose of this handler.
- Specified by:
getDescription
in interfaceI_CmsImportExportHandler
- Returns:
- the description of this import/export handler
- See Also:
I_CmsImportExportHandler.getDescription()
-
getExportParams
public CmsExportParameters getExportParams()
Returns the export parameters.- Returns:
- the export parameters
-
getExportPaths
@Deprecated public java.util.List<java.lang.String> getExportPaths()
Deprecated.usesetExportParams(CmsExportParameters)
insteadReturns the list with VFS paths to be exported.- Returns:
- the list with VFS paths to be exported
-
getFileName
@Deprecated public java.lang.String getFileName()
Deprecated.usesetExportParams(CmsExportParameters)
insteadReturns the name of the export file in the real file system.- Returns:
- the name of the export file in the real file system
-
getImportParameters
public CmsImportParameters getImportParameters()
Returns the import parameters.- Specified by:
getImportParameters
in interfaceI_CmsImportExportHandler
- Returns:
- the import parameters
-
importData
public void importData(CmsObject cms, I_CmsReport report) throws CmsImportExportException, CmsXmlException, CmsRoleViolationException
Description copied from interface:I_CmsImportExportHandler
Imports the data into the Cms.- Specified by:
importData
in interfaceI_CmsImportExportHandler
- Parameters:
cms
- the current OpenCms context objectreport
- a Cms report to print log messages- Throws:
CmsImportExportException
- if operation was not successfulCmsXmlException
- if the manifest of the import could not be unmarshalledCmsRoleViolationException
- if the current user has not the required role- See Also:
I_CmsImportExportHandler.importData(CmsObject, I_CmsReport)
-
importData
@Deprecated public void importData(CmsObject cms, java.lang.String importFile, java.lang.String importPath, I_CmsReport report) throws CmsXmlException, CmsImportExportException, CmsRoleViolationException, CmsException
Deprecated.useimportData(CmsObject, I_CmsReport)
insteadDescription copied from interface:I_CmsImportExportHandler
Imports the data into the Cms.- Specified by:
importData
in interfaceI_CmsImportExportHandler
- Parameters:
cms
- the current OpenCms context objectimportFile
- the name (absolute path) of the resource (zip file or folder) to be importedimportPath
- the name (absolute path) of the destination folder in the Cms (if required)report
- a Cms report to print log messages- Throws:
CmsXmlException
- if the manifest of the import could not be unmarshalledCmsImportExportException
- if operation was not successfulCmsRoleViolationException
- if the current user has not the required roleCmsException
- in case of errors accessing the VFS- See Also:
I_CmsImportExportHandler.importData(org.opencms.file.CmsObject, java.lang.String, java.lang.String, org.opencms.report.I_CmsReport)
-
isExportUserdata
@Deprecated public boolean isExportUserdata()
Deprecated.usesetExportParams(CmsExportParameters)
insteadReturns the boolean flag to decide whether user/group data should be exported or not.- Returns:
- true, if user/group data should be exported
-
isIncludeSystem
@Deprecated public boolean isIncludeSystem()
Deprecated.usesetExportParams(CmsExportParameters)
insteadReturns the boolean flag to decide whether VFS resources under /system/ should be exported or not.- Returns:
- true, if VFS resources under /system/ should not be exported
-
isIncludeUnchanged
@Deprecated public boolean isIncludeUnchanged()
Deprecated.usesetExportParams(CmsExportParameters)
insteadReturns the boolean flag to decide whether unchanged resources should be exported or not.- Returns:
- true, if unchanged resources should not be exported
-
isProjectOnly
@Deprecated public boolean isProjectOnly()
Deprecated.usesetExportParams(CmsExportParameters)
insteadReturns the projectOnly.- Returns:
- the projectOnly
-
isRecursive
@Deprecated public boolean isRecursive()
Deprecated.usesetExportParams(CmsExportParameters)
insteadReturns the recursive flag.- Returns:
- the recursive flag
-
matches
public boolean matches(org.dom4j.Document manifest)
Description copied from interface:I_CmsImportExportHandler
Checks, if this import/export handler matches with a specified manifest document of an import, so that it is able to import the data listed in the manifest document.- Specified by:
matches
in interfaceI_CmsImportExportHandler
- Parameters:
manifest
- the manifest.xml of the import as a dom4j XML document- Returns:
- true, this handler is able to import the data listed in the manifest document
- See Also:
I_CmsImportExportHandler.matches(org.dom4j.Document)
-
setContentAge
@Deprecated public void setContentAge(long contentAge)
Deprecated.usesetExportParams(CmsExportParameters)
insteadSets the timestamp to limit the resources to be exported by date.Only resources that have been modified after this date will be exported.
- Parameters:
contentAge
- the timestamp to limit the resources to be exported by date
-
setDescription
public void setDescription(java.lang.String description)
Description copied from interface:I_CmsImportExportHandler
Sets the description of this import/export handler.The description is useful to print some info about the purpose of this handler.
- Specified by:
setDescription
in interfaceI_CmsImportExportHandler
- Parameters:
description
- the description of this import/export handler- See Also:
I_CmsImportExportHandler.setDescription(java.lang.String)
-
setExportParams
public void setExportParams(CmsExportParameters exportParams)
Sets the export parameters.- Parameters:
exportParams
- the parameters to set
-
setExportPaths
@Deprecated public void setExportPaths(java.util.List<java.lang.String> exportPaths)
Deprecated.usesetExportParams(CmsExportParameters)
insteadSets the list with VFS paths to be exported.- Parameters:
exportPaths
- the list with VFS paths to be exported
-
setExportUserdata
@Deprecated public void setExportUserdata(boolean exportUserdata)
Deprecated.usesetExportParams(CmsExportParameters)
insteadSets the boolean flag to decide whether user/group data should be exported or not.- Parameters:
exportUserdata
- true, if user/group data should not be exported
-
setFileName
@Deprecated public void setFileName(java.lang.String fileName)
Deprecated.usesetExportParams(CmsExportParameters)
insteadSets the name of the export file in the real file system.- Parameters:
fileName
- the name of the export file in the real file system
-
setImportParameters
public void setImportParameters(CmsImportParameters importParams)
Sets the import parameters.- Specified by:
setImportParameters
in interfaceI_CmsImportExportHandler
- Parameters:
importParams
- the parameters to set
-
setIncludeSystem
@Deprecated public void setIncludeSystem(boolean excludeSystem)
Deprecated.usesetExportParams(CmsExportParameters)
insteadSets the boolean flag to decide whether VFS resources under /system/ should be exported or not.- Parameters:
excludeSystem
- true, if VFS resources under /system/ should not be exported
-
setIncludeUnchanged
@Deprecated public void setIncludeUnchanged(boolean excludeUnchanged)
Deprecated.usesetExportParams(CmsExportParameters)
insteadSets the boolean flag to decide whether unchanged resources should be exported or not.- Parameters:
excludeUnchanged
- true, if unchanged resources should not be exported
-
setProjectOnly
@Deprecated public void setProjectOnly(boolean projectOnly)
Deprecated.usesetExportParams(CmsExportParameters)
insteadSets the projectOnly.- Parameters:
projectOnly
- the projectOnly to set
-
setRecursive
@Deprecated public void setRecursive(boolean recursive)
Deprecated.usesetExportParams(CmsExportParameters)
insteadSets the recursive flag.- Parameters:
recursive
- the recursive flag to set
-
-