org.appng.core.model

## Class RepositoryCacheFilesystem

- java.lang.Object
- - org.appng.core.model.RepositoryCacheFilesystem

- All Implemented Interfaces:
    RepositoryCache

      public class RepositoryCacheFilesystem
      extends Object

  Implementation of `RepositoryCache` that retrieves the packages from the local filesystem.
  Author:
    Matthias Herlitzius

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected Map<String,PackageWrapper>` | `applicationWrapperMap`
    `protected byte[]` | `cert`
    `protected byte[]` | `privateKey`
    `protected Repository` | `repository`
    `protected SignatureWrapper` | `signatureWrapper`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `add(PackageArchive archive)` Adds a single `PackageArchive`
    `void` | `deletePackageVersion(String packageName, String packageVersion, String packageTimestamp)` Deletes the specified application version from the repository.
    `List<PackageWrapper>` | `getApplications()` Returns all packages found in the repository.
    `List<PackageWrapper>` | `getApplications(String packageName)` Returns all packages that match the given name in the repository.
    `Certification` | `getCertification()` Returns the `Certification` for the cached repository, if any
    `PackageArchive` | `getPackageArchive(String packageName, String packageVersion, String packageTimestamp)` Returns a `PackageArchive` for the specified package.
    `PackageWrapper` | `getPackageWrapper(String name)` Returns the `PackageWrapper` for the a package.
    `protected Repository` | `getRepository()`
    `List<PackageInfo>` | `getVersions(String name)` Returns all available versions of a package.
    `void` | `initializeWrapper(String packageName)`
    `void` | `reload()` Reloads the repository contents by clearing and updating the cache.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### privateKey

          protected byte[] privateKey

    - #### applicationWrapperMap

          protected final Map<String,PackageWrapper> applicationWrapperMap

    - #### repository

          protected final Repository repository

    - #### cert

          protected byte[] cert

    - #### signatureWrapper

          protected SignatureWrapper signatureWrapper

  - ### Method Detail

    - #### getCertification

          public Certification getCertification()

      Description copied from interface: `RepositoryCache`
      Returns the `Certification` for the cached repository, if any
      Returns:
        the `Certification`

    - #### add

          public boolean add(PackageArchive archive)

      Description copied from interface: `RepositoryCache`
      Adds a single `PackageArchive`
      Parameters:
        `archive` - the archive to add

    - #### initializeWrapper

          public void initializeWrapper(String packageName)

    - #### deletePackageVersion

          public void deletePackageVersion(String packageName,
                                           String packageVersion,
                                           String packageTimestamp)
                                    throws BusinessException

      Description copied from interface: `RepositoryCache`
      Deletes the specified application version from the repository.
      Parameters:
        `packageName` - The package name.
        `packageVersion` - The package version.
        `packageTimestamp` - The package timestamp.
      Throws:
        `BusinessException` - if such a package does not exist

    - #### getPackageArchive

          public PackageArchive getPackageArchive(String packageName,
                                                  String packageVersion,
                                                  String packageTimestamp)
                                           throws BusinessException

      Description copied from interface: `RepositoryCache`
      Returns a `PackageArchive` for the specified package.
      Parameters:
        `packageName` - The package name.
        `packageVersion` - The package version.
        `packageTimestamp` - The package timestamp.
      Returns:
        The `PackageArchive`.
      Throws:
        `BusinessException` - if the archive was not found or is invalid

    - #### reload

          public void reload()
                      throws BusinessException

      Description copied from interface: `RepositoryCache`
      Reloads the repository contents by clearing and updating the cache.
      Specified by:
        `reload` in interface `RepositoryCache`
      Throws:
        `BusinessException`

    - #### getApplications

          public List<PackageWrapper> getApplications()
                                               throws BusinessException

      Description copied from interface: `RepositoryCache`
      Returns all packages found in the repository.
      Specified by:
        `getApplications` in interface `RepositoryCache`
      Returns:
        The package list.
      Throws:
        `BusinessException`

    - #### getApplications

          public List<PackageWrapper> getApplications(String packageName)
                                               throws BusinessException

      Description copied from interface: `RepositoryCache`
      Returns all packages that match the given name in the repository.
      Specified by:
        `getApplications` in interface `RepositoryCache`
      Parameters:
        `packageName` - an optional search-string for the package's name, supporting `*` as a placeholder
      Returns:
        The package list.
      Throws:
        `BusinessException`

    - #### getVersions

          public List<PackageInfo> getVersions(String name)
                                        throws BusinessException

      Description copied from interface: `RepositoryCache`
      Returns all available versions of a package.
      Specified by:
        `getVersions` in interface `RepositoryCache`
      Parameters:
        `name` - The name of the application.
      Returns:
        The `PackageInfo`s.
      Throws:
        `BusinessException` - if such a package does not exist

    - #### getPackageWrapper

          public PackageWrapper getPackageWrapper(String name)

      Description copied from interface: `RepositoryCache`
      Returns the `PackageWrapper` for the a package.
      Specified by:
        `getPackageWrapper` in interface `RepositoryCache`
      Parameters:
        `name` - The name of the package.
      Returns:
        the `PackageWrapper`

    - #### getRepository

          protected Repository getRepository()

Copyright © 2011–2023 aiticon GmbH. All rights reserved.