AutoArchive._application¶
Application logic.
Provides the core functionality of the application.
Sub-Packages¶
Modules¶
archiving_application¶
- class AutoArchive._application.archiving_application.ArchivingApplication(componentUi, applicationContext, serviceAccessor)[source]¶
Bases:
objectTakes care of executing user actions - application main use cases.
- Parameters:
componentUi (
CmdlineUi) – Access to user interface.applicationContext (
ApplicationContext) – Application context.serviceAccessor (
IServiceAccessor) – Access to services.
- executeCreateAction(selectedArchiveSpecs) bool[source]¶
Executes create backup(s) action.
Takes
selectedArchiveSpecsand for each it creates a backup. IfselectedArchiveSpecsis empty orOptions.ALLis set toTruethen backups for all knows archives (typically all archive specification files inOptions.ARCHIVE_SPECS_DIRdirectory) plus those inselectedArchiveSpecsare created.- Parameters:
selectedArchiveSpecs (
Sequence<ArchiveSpecInfo>) – archive specification files for which backups shall be created.
- executeListAction(selectedArchiveSpecs) bool[source]¶
Lists information about selected and orphaned archives to standard output.
Similarly to
executeCreateAction()archives inselectedArchiveSpecsare listed. If it is empty orOptions.ALLisTruethen all archives plus selected are listed. Orphaned archives are always listed.List of orphaned archives is obtained by following operation: from the list of stored archives is subtracted the unique list of valid selected archives and valid configured archives.
Output has two possible formats depending on the
Options.VERBOSEoption.- Parameters:
selectedArchiveSpecs (
Sequence<ArchiveSpecInfo>) – archive specification files which shall be listed.
- executePurgeAction(selectedArchiveSpecs) bool[source]¶
Removes all stored information about specified orphaned archives.
If
selectedArchiveSpecsis empty orOptions.ALLisTruethen all orphaned archives are processed.- Parameters:
selectedArchiveSpecs (
Sequence<ArchiveSpecInfo>) – archive specification files which shall be purged.