Class ArchiveHandler
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.plugins.contentio.archive.ArchiveHandler
- All Implemented Interfaces:
LogEnabled
,Component
,Contextualizable
,Serviceable
public class ArchiveHandler
extends AbstractLogEnabled
implements Component, Serviceable, Contextualizable
Archive data on disk.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
contextualize
(Context context) void
Exports withArchiverExtensionPoint
mechanism into the givenFile
getArchiveFile
(String name) Gets the archive fileGets the archive filesGets the folder containing all the managed archivesgetPartialImports
(String archiveName) Gets the partial imports of the given archiveImports all data from the given ZIP archivepartialImport
(File input, Collection<String> partialImports, Merger merger) Imports partial data from the given ZIP archivevoid
service
(ServiceManager manager) Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
ROLE
Avalon role. -
METADATA_PREFIX
The prefix path for exporting metadata content- See Also:
-
_context
The context
-
-
Constructor Details
-
ArchiveHandler
public ArchiveHandler()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
contextualize
- Specified by:
contextualize
in interfaceContextualizable
- Throws:
ContextException
-
getArchiveFolder
Gets the folder containing all the managed archives- Returns:
- the folder containing all the managed archives
-
getArchiveFiles
Gets the archive files- Returns:
- the archive files
-
getArchiveFile
Gets the archive file- Parameters:
name
- The archive name- Returns:
- the archive file
-
getPartialImports
Gets the partial imports of the given archive- Parameters:
archiveName
- The archive name- Returns:
- the partial imports
- Throws:
IOException
- if an I/O error occured
-
export
Exports withArchiverExtensionPoint
mechanism into the givenFile
- Parameters:
output
- The output ZIP file- Throws:
IOException
- if an IO exception occured
-
importAll
Imports all data from the given ZIP archive- Parameters:
input
- the ZIP archivemerger
- theMerger
- Returns:
- The
ImportReport
- Throws:
IOException
- if an I/O error occurs
-
partialImport
public ImportReport partialImport(File input, Collection<String> partialImports, Merger merger) throws IOException Imports partial data from the given ZIP archive- Parameters:
input
- the ZIP archivepartialImports
- the partial importsmerger
- theMerger
- Returns:
- The
ImportReport
- Throws:
IOException
- if an I/O error occurs
-