Package org.opencms.importexport
Class CmsExportParameters
- java.lang.Object
-
- org.opencms.importexport.CmsExportParameters
-
public class CmsExportParameters extends java.lang.Object
Export parameters.- Since:
- 7.0.4
-
-
Constructor Summary
Constructors Constructor Description CmsExportParameters()
Constructor.CmsExportParameters(java.lang.String exportFile, org.dom4j.Element moduleElement, boolean exportResourceData, boolean exportUserdata, boolean exportProjectData, java.util.List<java.lang.String> resourcesToExport, boolean includeSystem, boolean includeUnchanged, long contentAge, boolean recursive, boolean inProject, CmsModule.ExportMode exportMode)
Constructor.CmsExportParameters(java.lang.String exportFile, org.dom4j.Element moduleElement, boolean exportResourceData, boolean exportUserdata, boolean exportProjectData, java.util.List<java.lang.String> resourcesToExport, boolean includeSystem, boolean includeUnchanged, long contentAge, boolean recursive, boolean inProject, CmsModule.ExportMode exportMode, java.util.List<java.lang.String> additionalResourcesToExportWithMetaData)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAdditionalResources()
Adds the resources from the additional resource list to the actual export resources.java.lang.String
getAdditionalResourceList()
Gets the additional resource list.long
getContentAge()
Returns the content Age.CmsModule.ExportMode
getExportMode()
Returns the export mode that should be used.org.dom4j.Element
getModuleInfo()
Returns the module informations if to export a module.java.lang.String
getPath()
Returns the file path, should be a zip file.java.util.List<java.lang.String>
getResources()
Returns the resources.java.util.List<java.lang.String>
getResourcesToExportWithMetaData()
Returns the resources to export with (some additional) meta-data, even for reduced meta-data export.boolean
isExportAccountData()
Checks if to export account data.boolean
isExportAsFiles()
Indicates if the resources are exported in one export .ZIP file (the default) or as individual files.boolean
isExportProjectData()
Checks if to export project data.boolean
isExportResourceData()
Checks if to export resource data.boolean
isIncludeSystemFolder()
Checks if to include the /system/ Folder.boolean
isIncludeUnchangedResources()
Checks if to include unchanged resources.boolean
isInProject()
Checks if to include only resources in the current project.boolean
isRecursive()
Checks if to recurse the resources to export.boolean
isSkipParentFolders()
If true, parent folders are not written to the manifest.boolean
isXmlValidation()
Checks if the manifest.xml file will be generated with dtd info.void
setAdditionalResourceList(java.lang.String additionalResourceList)
Sets the additional resources for the export.void
setAdditionalResourcesToExportWithMetaData(java.util.List<java.lang.String> resourcesToExportWithMetaData)
Checks if the manifest.xml file will be generated with dtd info.void
setContentAge(long contentAge)
Sets the content Age.void
setExportAccountData(boolean exportAccountData)
Sets if to export account data.void
setExportAsFiles(boolean exportAsFiles)
Controls if the resources are exported in one export .ZIP file (the default) or as individual files.void
setExportMode(CmsModule.ExportMode exportMode)
Sets the export mode.void
setExportProjectData(boolean exportProjectData)
Sets if to export project data.void
setExportResourceData(boolean exportResourceData)
Sets if to export resource data.void
setIncludeSystemFolder(boolean includeSystemFolder)
Sets if to include the /system/ Folder.void
setIncludeUnchangedResources(boolean includeUnchangedResources)
Sets if to include unchanged resources.void
setInProject(boolean inProject)
Sets if to only include files in the current project.void
setModuleInfo(org.dom4j.Element moduleInfo)
Sets the module informations if to export a module.void
setPath(java.lang.String path)
Sets the file path, should be a zip file.void
setRecursive(boolean recursive)
Sets the recursive flag.void
setResources(java.util.List<java.lang.String> resources)
Sets the resources.void
setSkipParentFolders(boolean skipSuperFolders)
Enables / disables skipping of parent folders in the manifest.void
setXmlValidation(boolean xmlValidation)
Sets the xml validation flag.
-
-
-
Constructor Detail
-
CmsExportParameters
public CmsExportParameters()
Constructor.
-
CmsExportParameters
public CmsExportParameters(java.lang.String exportFile, org.dom4j.Element moduleElement, boolean exportResourceData, boolean exportUserdata, boolean exportProjectData, java.util.List<java.lang.String> resourcesToExport, boolean includeSystem, boolean includeUnchanged, long contentAge, boolean recursive, boolean inProject, CmsModule.ExportMode exportMode)
Constructor.- Parameters:
exportFile
- the zip file to export tomoduleElement
- module informations in a Node for module exportexportResourceData
- if the resource data has also to be exportedexportUserdata
- if the account data has also to be exportedexportProjectData
- if the project data has also to be exportedresourcesToExport
- the paths of folders and files to exportincludeSystem
- iftrue
, the system folder is includedincludeUnchanged
-true
, if unchanged files should be includedcontentAge
- export contents changed after this date/timerecursive
- recursive flaginProject
- if only resources in the current project are exportedexportMode
- the export mode to use
-
CmsExportParameters
public CmsExportParameters(java.lang.String exportFile, org.dom4j.Element moduleElement, boolean exportResourceData, boolean exportUserdata, boolean exportProjectData, java.util.List<java.lang.String> resourcesToExport, boolean includeSystem, boolean includeUnchanged, long contentAge, boolean recursive, boolean inProject, CmsModule.ExportMode exportMode, java.util.List<java.lang.String> additionalResourcesToExportWithMetaData)
Constructor.- Parameters:
exportFile
- the zip file to export tomoduleElement
- module informations in a Node for module exportexportResourceData
- if the resource data has also to be exportedexportUserdata
- if the account data has also to be exportedexportProjectData
- if the project data has also to be exportedresourcesToExport
- the paths of folders and files to exportincludeSystem
- iftrue
, the system folder is includedincludeUnchanged
-true
, if unchanged files should be includedcontentAge
- export contents changed after this date/timerecursive
- recursive flaginProject
- if only resources in the current project are exportedexportMode
- the export mode to useadditionalResourcesToExportWithMetaData
- the list of export-site relative paths of folders/files for which meta data should be exported, even if they do not belong the the resourcesToExport.
-
-
Method Detail
-
addAdditionalResources
public void addAdditionalResources()
Adds the resources from the additional resource list to the actual export resources.
-
getAdditionalResourceList
public java.lang.String getAdditionalResourceList()
Gets the additional resource list.- Returns:
- the additional resource list
-
getContentAge
public long getContentAge()
Returns the content Age.- Returns:
- the content Age
-
getExportMode
public CmsModule.ExportMode getExportMode()
Returns the export mode that should be used.- Returns:
- the export mode that should be used.
-
getModuleInfo
public org.dom4j.Element getModuleInfo()
Returns the module informations if to export a module.- Returns:
- the module informations if to export a module
-
getPath
public java.lang.String getPath()
Returns the file path, should be a zip file.- Returns:
- the file path
-
getResources
public java.util.List<java.lang.String> getResources()
Returns the resources.- Returns:
- the resources
-
getResourcesToExportWithMetaData
public java.util.List<java.lang.String> getResourcesToExportWithMetaData()
Returns the resources to export with (some additional) meta-data, even for reduced meta-data export.- Returns:
- the resources to export with (some additional) meta-data, even for reduced meta-data export.
-
isExportAccountData
public boolean isExportAccountData()
Checks if to export account data.- Returns:
true
, if to export account data
-
isExportAsFiles
public boolean isExportAsFiles()
Indicates if the resources are exported in one export .ZIP file (the default) or as individual files.- Returns:
false
if the resources will be exported in a .ZIP file,true
if the resources will be exported as individual files
-
isExportProjectData
public boolean isExportProjectData()
Checks if to export project data.- Returns:
true
, if to export project data
-
isExportResourceData
public boolean isExportResourceData()
Checks if to export resource data.- Returns:
true
, if to export resource data
-
isIncludeSystemFolder
public boolean isIncludeSystemFolder()
Checks if to include the /system/ Folder.- Returns:
true
, if to include the /system/ Folder
-
isIncludeUnchangedResources
public boolean isIncludeUnchangedResources()
Checks if to include unchanged resources.- Returns:
true
, if to include unchanged resources
-
isInProject
public boolean isInProject()
Checks if to include only resources in the current project.- Returns:
true
, if to include only resources in the current project
-
isRecursive
public boolean isRecursive()
Checks if to recurse the resources to export.- Returns:
true
, if to recurse the resources to export
-
isSkipParentFolders
public boolean isSkipParentFolders()
If true, parent folders are not written to the manifest.- Returns:
- true if parent folders should be skipped
-
isXmlValidation
public boolean isXmlValidation()
Checks if the manifest.xml file will be generated with dtd info.- Returns:
- the xml validation flag
-
setAdditionalResourceList
public void setAdditionalResourceList(java.lang.String additionalResourceList)
Sets the additional resources for the export.- Parameters:
additionalResourceList
- the additional resource paths to export, separated by newlines
-
setAdditionalResourcesToExportWithMetaData
public void setAdditionalResourcesToExportWithMetaData(java.util.List<java.lang.String> resourcesToExportWithMetaData)
Checks if the manifest.xml file will be generated with dtd info.- Parameters:
resourcesToExportWithMetaData
- the vfs paths of the resources.
-
setContentAge
public void setContentAge(long contentAge)
Sets the content Age.- Parameters:
contentAge
- the content Age to set
-
setExportAccountData
public void setExportAccountData(boolean exportAccountData)
Sets if to export account data.- Parameters:
exportAccountData
- the flag to set
-
setExportAsFiles
public void setExportAsFiles(boolean exportAsFiles)
Controls if the resources are exported in one export .ZIP file (the default) or as individual files.- Parameters:
exportAsFiles
- iffalse
, then the resources will be exported in a .ZIP file, otherwise as individual files
-
setExportMode
public void setExportMode(CmsModule.ExportMode exportMode)
Sets the export mode.- Parameters:
exportMode
- the export mode to set
-
setExportProjectData
public void setExportProjectData(boolean exportProjectData)
Sets if to export project data.- Parameters:
exportProjectData
- the flag to set
-
setExportResourceData
public void setExportResourceData(boolean exportResourceData)
Sets if to export resource data.- Parameters:
exportResourceData
- the flag to set
-
setIncludeSystemFolder
public void setIncludeSystemFolder(boolean includeSystemFolder)
Sets if to include the /system/ Folder.- Parameters:
includeSystemFolder
- the flag to set
-
setIncludeUnchangedResources
public void setIncludeUnchangedResources(boolean includeUnchangedResources)
Sets if to include unchanged resources.- Parameters:
includeUnchangedResources
- the flag to set
-
setInProject
public void setInProject(boolean inProject)
Sets if to only include files in the current project.- Parameters:
inProject
- the flag to set
-
setModuleInfo
public void setModuleInfo(org.dom4j.Element moduleInfo)
Sets the module informations if to export a module.- Parameters:
moduleInfo
- the module info node to set
-
setPath
public void setPath(java.lang.String path)
Sets the file path, should be a zip file.- Parameters:
path
- the file path
-
setRecursive
public void setRecursive(boolean recursive)
Sets the recursive flag.- Parameters:
recursive
- the flag to set
-
setResources
public void setResources(java.util.List<java.lang.String> resources)
Sets the resources.- Parameters:
resources
- the resources to set
-
setSkipParentFolders
public void setSkipParentFolders(boolean skipSuperFolders)
Enables / disables skipping of parent folders in the manifest.- Parameters:
skipSuperFolders
- true if parent folders should not be written to the manifest
-
setXmlValidation
public void setXmlValidation(boolean xmlValidation)
Sets the xml validation flag. If set, the manifest.xml file will be generated with dtd info.- Parameters:
xmlValidation
- the xml validation flag to set
-
-