AutoArchive._application — AutoArchive Developer Manual (ver. 2.1.0.dev20260309)

# AutoArchive._application

Application logic.

Provides the core functionality of the application.

## Sub-Packages

- AutoArchive._application.archiving
- AutoArchive._application._action

## Modules

### archiving_application

class AutoArchive._application.archiving_application.ArchivingApplication(componentUi, applicationContext, serviceAccessor)

  Bases: `object`

  Takes 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

    Executes create backup(s) action.

    Takes `selectedArchiveSpecs` and for each it creates a backup. If `selectedArchiveSpecs` is empty or `Options.ALL` is set to `True` then backups for all knows archives (typically all archive specification files in `Options.ARCHIVE_SPECS_DIR` directory) plus those in `selectedArchiveSpecs` are created.

    Parameters:

      selectedArchiveSpecs (`Sequence<ArchiveSpecInfo>`) – archive specification files for which backups shall be created.

  executeListAction(selectedArchiveSpecs) → bool

    Lists information about selected and orphaned archives to standard output.

    Similarly to `executeCreateAction()` archives in `selectedArchiveSpecs` are listed. If it is empty or `Options.ALL` is `True` then 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.VERBOSE` option.

    Parameters:

      selectedArchiveSpecs (`Sequence<ArchiveSpecInfo>`) – archive specification files which shall be listed.

  executeListAvailableArchiversAction() → bool

    Lists archiver types that are available on the system.

    Content of the list depends on which utilities are installed in the system. For example, if ‘bzip2’ is not installed then ‘tarbz2’ type will not be in the list.

  executePurgeAction(selectedArchiveSpecs) → bool

    Removes all stored information about specified orphaned archives.

    If `selectedArchiveSpecs` is empty or `Options.ALL` is `True` then all orphaned archives are processed.

    Parameters:

      selectedArchiveSpecs (`Sequence<ArchiveSpecInfo>`) – archive specification files which shall be purged.