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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidexport(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, serviceMethods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLoggerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:SitePluginArchiverExport plugin data into the destination archive- Specified by:
exportin 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:SitePluginArchiverImport plugin data from the source archive- Specified by:
partialImportin interfaceSitePluginArchiver- Parameters:
site- the current site.pluginName- the plugin name.allPluginsNode- theNodefor 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.
-