Class SitesArchiver
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.plugins.webcontentio.archive.SitesArchiver
-
- All Implemented Interfaces:
Archiver,LogEnabled,Serviceable
public class SitesArchiver extends AbstractLogEnabled implements Archiver, Serviceable
Archiverfor all sites.
-
-
Field Summary
Fields Modifier and Type Field Description protected ContentsArchiverHelper_contentsArchiverHelperThe helper for archiving contentsprotected DefaultPageFactory_defaultPageFactoryThe default page factoryprotected PageDataTypeExtensionPoint_pageDataTypeExtensionPointThe page data type extension pointprotected SitePluginArchiverExtensionPoint_pluginArchiverExtensionPointThe extension point forSitePluginArchiversprotected AmetysObjectResolver_resolverThe Ametys Object Resolverprotected ResourcesArchiverHelper_resourcesArchiverHelperThe helper for archiving resourcesprotected ServiceExtensionPoint_serviceExtensionPointThe extension point for Servicesprotected SiteManager_siteManagerThe site managerprotected SitemapFactory_sitemapFactoryThe sitemap factoryprotected SiteTypesExtensionPoint_siteTypeEPThe extension point forSiteTypesprotected TagProviderExtensionPoint_tagProviderEPThe extension point forTagProvidersstatic StringIDArchiver id.
-
Constructor Summary
Constructors Constructor Description SitesArchiver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<I18nizableText>additionalSuccessImportMail()Potential additional information to append to the success mail of the import processvoidexport(ZipOutputStream zos)Export data into the destination archiveManifestReaderWritergetManifestReaderWriter()Get theManifestReaderWriterCollection<String>managedPartialImports(Collection<String> partialImports)Returns the partial imports, among the given ones, that thisArchiveris able to manage.ImportReportpartialImport(Path zipPath, Collection<String> partialImports, Merger merger, boolean deleteBefore)Import data (limited to the given partial imports) from the source archivevoidservice(ServiceManager manager)-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
-
-
-
Field Detail
-
ID
public static final String ID
Archiver id.- See Also:
- Constant Field Values
-
_siteManager
protected SiteManager _siteManager
The site manager
-
_contentsArchiverHelper
protected ContentsArchiverHelper _contentsArchiverHelper
The helper for archiving contents
-
_resourcesArchiverHelper
protected ResourcesArchiverHelper _resourcesArchiverHelper
The helper for archiving resources
-
_pluginArchiverExtensionPoint
protected SitePluginArchiverExtensionPoint _pluginArchiverExtensionPoint
The extension point forSitePluginArchivers
-
_tagProviderEP
protected TagProviderExtensionPoint _tagProviderEP
The extension point forTagProviders
-
_resolver
protected AmetysObjectResolver _resolver
The Ametys Object Resolver
-
_defaultPageFactory
protected DefaultPageFactory _defaultPageFactory
The default page factory
-
_sitemapFactory
protected SitemapFactory _sitemapFactory
The sitemap factory
-
_serviceExtensionPoint
protected ServiceExtensionPoint _serviceExtensionPoint
The extension point for Services
-
_siteTypeEP
protected SiteTypesExtensionPoint _siteTypeEP
The extension point forSiteTypes
-
_pageDataTypeExtensionPoint
protected PageDataTypeExtensionPoint _pageDataTypeExtensionPoint
The page data type extension point
-
-
Constructor Detail
-
SitesArchiver
public SitesArchiver()
-
-
Method Detail
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
servicein interfaceServiceable- Throws:
ServiceException
-
getManifestReaderWriter
public ManifestReaderWriter getManifestReaderWriter()
Description copied from interface:ArchiverGet theManifestReaderWriter- Specified by:
getManifestReaderWriterin interfaceArchiver- Returns:
- the
ManifestReaderWriter
-
export
public void export(ZipOutputStream zos) throws IOException
Description copied from interface:ArchiverExport data into the destination archive- Specified by:
exportin interfaceArchiver- Parameters:
zos- the output data stream.- Throws:
IOException- if an error occurs while writing entries to the archive.
-
additionalSuccessImportMail
public List<I18nizableText> additionalSuccessImportMail()
Description copied from interface:ArchiverPotential additional information to append to the success mail of the import process- Specified by:
additionalSuccessImportMailin interfaceArchiver- Returns:
- the mail additional information
-
managedPartialImports
public Collection<String> managedPartialImports(Collection<String> partialImports)
Description copied from interface:ArchiverReturns the partial imports, among the given ones, that thisArchiveris able to manage.- Specified by:
managedPartialImportsin interfaceArchiver- Parameters:
partialImports- The partial imports to filter- Returns:
- The managed partial imports
-
partialImport
public ImportReport partialImport(Path zipPath, Collection<String> partialImports, Merger merger, boolean deleteBefore) throws IOException
Description copied from interface:ArchiverImport data (limited to the given partial imports) from the source archive- Specified by:
partialImportin interfaceArchiver- Parameters:
zipPath- the input zip pathpartialImports- The partial imports to do. The passed collection must already be filtered out byArchiver.managedPartialImports(java.util.Collection<java.lang.String>)merger- TheMergerdeleteBefore-trueif objects need to be deleted before applying the partial imports- Returns:
- The
ImportReport - Throws:
IOException- if an error occurs while reading archive entries.
-
-