Class ResourcesArchiver
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.plugins.contentio.archive.ResourcesArchiver
- All Implemented Interfaces:
Archiver,LogEnabled,Serviceable
Archives resources in /ametys:root/ametys:resources
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidexport(ZipOutputStream zos) Export data into the destination archiveGet theManifestReaderWritermanagedPartialImports(Collection<String> partialImports) Returns the partial imports, among the given ones, that thisArchiveris able to manage.partialImport(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, 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.Archiver
additionalSuccessImportMail
-
Field Details
-
ID
Archiver id.- See Also:
-
-
Constructor Details
-
ResourcesArchiver
public ResourcesArchiver()
-
-
Method Details
-
service
- Specified by:
servicein interfaceServiceable- Throws:
ServiceException
-
getManifestReaderWriter
Description copied from interface:ArchiverGet theManifestReaderWriter- Specified by:
getManifestReaderWriterin interfaceArchiver- Returns:
- the
ManifestReaderWriter
-
export
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.
-
managedPartialImports
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.
-