Class DefaultSitePluginArchiver
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.plugins.contentio.archive.DefaultPluginArchiver
org.ametys.plugins.webcontentio.archive.DefaultSitePluginArchiver
- All Implemented Interfaces:
PluginArchiver
,SitePluginArchiver
,LogEnabled
,Serviceable
Default implementation of a
SitePluginArchiver
. It uses the JCR system view for all data but contents.
For contents, the ContentsArchiverHelper
is used.-
Field Summary
Fields inherited from class org.ametys.plugins.contentio.archive.DefaultPluginArchiver
EXTENSION_ID
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
export
(Site site, String pluginName, javax.jcr.Node pluginNode, ZipOutputStream zos, String prefix) Export plugin data into the destination archivepartialImport
(Site site, String pluginName, javax.jcr.Node allPluginsNode, Path zipPath, String zipEntryPath, Merger merger) Import plugin data from the source archiveMethods inherited from class org.ametys.plugins.contentio.archive.DefaultPluginArchiver
export, getSystemViewHandler, importContentsIfAny, partialImport, service
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.ametys.plugins.contentio.archive.PluginArchiver
deleteBeforePartialImport
-
Constructor Details
-
DefaultSitePluginArchiver
public DefaultSitePluginArchiver()
-
-
Method Details
-
export
public void export(Site site, String pluginName, javax.jcr.Node pluginNode, ZipOutputStream zos, String prefix) throws IOException Description copied from interface:SitePluginArchiver
Export plugin data into the destination archive- Specified by:
export
in interfaceSitePluginArchiver
- Parameters:
site
- the current site.pluginName
- the plugin name.pluginNode
- the pluginNode
.zos
- the output data stream.prefix
- the prefix for ZIP entries.- Throws:
IOException
- if an error occurs while writing entries to the archive.
-
partialImport
public ImportReport partialImport(Site site, String pluginName, javax.jcr.Node allPluginsNode, Path zipPath, String zipEntryPath, Merger merger) throws IOException Description copied from interface:SitePluginArchiver
Import plugin data from the source archive- Specified by:
partialImport
in interfaceSitePluginArchiver
- Parameters:
site
- the current site.pluginName
- the plugin name.allPluginsNode
- theNode
for all plugins.zipPath
- The input ZIP filezipEntryPath
- The input ZIP entrymerger
- TheMerger
- Returns:
- The
ImportReport
- Throws:
IOException
- if an error occurs while reading the archive.
-