org.opencms.importexport
Class CmsVfsImportExportHandler

java.lang.Object
  extended by 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
CmsVfsImportExportHandler()
          Creates a new VFS import/export handler.
 
Method Summary
 void exportData(CmsObject cms, I_CmsReport report)
          Exports the data from the Cms.
 long getContentAge()
          Deprecated. use setExportParams(CmsExportParameters) instead
 java.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. use setExportParams(CmsExportParameters) instead
 java.lang.String getFileName()
          Deprecated. use setExportParams(CmsExportParameters) instead
 CmsImportParameters getImportParameters()
          Returns the import parameters.
 void importData(CmsObject cms, I_CmsReport report)
          Imports the data into the Cms.
 void importData(CmsObject cms, java.lang.String importFile, java.lang.String importPath, I_CmsReport report)
          Deprecated. use importData(CmsObject, I_CmsReport) instead
 boolean isExportUserdata()
          Deprecated. use setExportParams(CmsExportParameters) instead
 boolean isIncludeSystem()
          Deprecated. use setExportParams(CmsExportParameters) instead
 boolean isIncludeUnchanged()
          Deprecated. use setExportParams(CmsExportParameters) instead
 boolean isProjectOnly()
          Deprecated. use setExportParams(CmsExportParameters) instead
 boolean isRecursive()
          Deprecated. use setExportParams(CmsExportParameters) instead
 boolean 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. use setExportParams(CmsExportParameters) instead
 void 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. use setExportParams(CmsExportParameters) instead
 void setExportUserdata(boolean exportUserdata)
          Deprecated. use setExportParams(CmsExportParameters) instead
 void setFileName(java.lang.String fileName)
          Deprecated. use setExportParams(CmsExportParameters) instead
 void setImportParameters(CmsImportParameters importParams)
          Sets the import parameters.
 void setIncludeSystem(boolean excludeSystem)
          Deprecated. use setExportParams(CmsExportParameters) instead
 void setIncludeUnchanged(boolean excludeUnchanged)
          Deprecated. use setExportParams(CmsExportParameters) instead
 void setProjectOnly(boolean projectOnly)
          Deprecated. use setExportParams(CmsExportParameters) instead
 void setRecursive(boolean recursive)
          Deprecated. use setExportParams(CmsExportParameters) instead
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 interface I_CmsImportExportHandler
Parameters:
cms - the current OpenCms context object
report - a Cms report to print log messages
Throws:
CmsImportExportException - if operation was not successful
CmsRoleViolationException - 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. use setExportParams(CmsExportParameters) instead

Returns 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 interface I_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. use setExportParams(CmsExportParameters) instead

Returns 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. use setExportParams(CmsExportParameters) instead

Returns 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 interface I_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 interface I_CmsImportExportHandler
Parameters:
cms - the current OpenCms context object
report - a Cms report to print log messages
Throws:
CmsImportExportException - if operation was not successful
CmsXmlException - if the manifest of the import could not be unmarshalled
CmsRoleViolationException - 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. use importData(CmsObject, I_CmsReport) instead

Description copied from interface: I_CmsImportExportHandler
Imports the data into the Cms.

Specified by:
importData in interface I_CmsImportExportHandler
Parameters:
cms - the current OpenCms context object
importFile - the name (absolute path) of the resource (zip file or folder) to be imported
importPath - 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 unmarshalled
CmsImportExportException - if operation was not successful
CmsRoleViolationException - if the current user has not the required role
CmsException - 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. use setExportParams(CmsExportParameters) instead

Returns 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. use setExportParams(CmsExportParameters) instead

Returns 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. use setExportParams(CmsExportParameters) instead

Returns 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. use setExportParams(CmsExportParameters) instead

Returns the projectOnly.

Returns:
the projectOnly

isRecursive

@Deprecated
public boolean isRecursive()
Deprecated. use setExportParams(CmsExportParameters) instead

Returns 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 interface I_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. use setExportParams(CmsExportParameters) instead

Sets 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 interface I_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. use setExportParams(CmsExportParameters) instead

Sets 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. use setExportParams(CmsExportParameters) instead

Sets 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. use setExportParams(CmsExportParameters) instead

Sets 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 interface I_CmsImportExportHandler
Parameters:
importParams - the parameters to set

setIncludeSystem

@Deprecated
public void setIncludeSystem(boolean excludeSystem)
Deprecated. use setExportParams(CmsExportParameters) instead

Sets 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. use setExportParams(CmsExportParameters) instead

Sets 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. use setExportParams(CmsExportParameters) instead

Sets the projectOnly.

Parameters:
projectOnly - the projectOnly to set

setRecursive

@Deprecated
public void setRecursive(boolean recursive)
Deprecated. use setExportParams(CmsExportParameters) instead

Sets the recursive flag.

Parameters:
recursive - the recursive flag to set