Class WorkspacePluginArchiver
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.plugins.contentio.archive.DefaultPluginArchiver
org.ametys.plugins.workspaces.archive.WorkspacePluginArchiver
- All Implemented Interfaces:
PluginArchiver
,LogEnabled
,Serviceable
Archiver handling the data stored by the workspaces plugin.
Mainly this archiver will separate each projects in its own directory.
Each project folder consisting of different directory for each module.
And the data in the document module will be stored as file tree allowing easy access to each document
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ProjectArchiverHelper
the project archiver helperprotected AmetysObjectResolver
the ametys object resolverFields inherited from class org.ametys.plugins.contentio.archive.DefaultPluginArchiver
EXTENSION_ID
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
export
(String pluginName, javax.jcr.Node pluginNode, ZipOutputStream zos, String prefix) Export plugin data into the destination archiveprotected ContentHandler
getSystemViewHandler
(ContentHandler initialHandler) Returns the actual handler receiving the JCR system view.partialImport
(String pluginName, javax.jcr.Node allPluginsNode, Path zipPath, String zipPluginEntryPath, Merger merger) Import plugin data from the source archivevoid
service
(ServiceManager manager) Methods inherited from class org.ametys.plugins.contentio.archive.DefaultPluginArchiver
importContentsIfAny
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
-
Field Details
-
_resolver
the ametys object resolver -
_projectArchiverHelper
the project archiver helper
-
-
Constructor Details
-
WorkspacePluginArchiver
public WorkspacePluginArchiver()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classDefaultPluginArchiver
- Throws:
ServiceException
-
getSystemViewHandler
Description copied from class:DefaultPluginArchiver
Returns the actual handler receiving the JCR system view. May be used to filter out some parts of the JCR export.- Overrides:
getSystemViewHandler
in classDefaultPluginArchiver
- Parameters:
initialHandler
- the targetContentHandler
.- Returns:
- a ContentHandler.
-
export
public void export(String pluginName, javax.jcr.Node pluginNode, ZipOutputStream zos, String prefix) throws IOException Description copied from interface:PluginArchiver
Export plugin data into the destination archive- Specified by:
export
in interfacePluginArchiver
- Overrides:
export
in classDefaultPluginArchiver
- Parameters:
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(String pluginName, javax.jcr.Node allPluginsNode, Path zipPath, String zipPluginEntryPath, Merger merger) throws IOException Description copied from interface:PluginArchiver
Import plugin data from the source archive- Specified by:
partialImport
in interfacePluginArchiver
- Overrides:
partialImport
in classDefaultPluginArchiver
- Parameters:
pluginName
- the plugin name.allPluginsNode
- theNode
for all plugins.zipPath
- The input ZIP filezipPluginEntryPath
- The input ZIP entrymerger
- TheMerger
- Returns:
- The
ImportReport
- Throws:
IOException
- if an error occurs while reading the archive.
-