org.appng.core.model

## Interface Repository

- All Superinterfaces:
    Identifiable<Integer>, Nameable, Named<Integer>, Serializable, Versionable<Date>
  All Known Implementing Classes:
    RepositoryImpl

      public interface Repository
      extends Named<Integer>, Versionable<Date>

  A Application Repository contains and provides multiple `Application`s for provisioning. In the repository applications are represented through a `InstallablePackage`.
  Author:
    Matthias Herlitzius, Matthias Müller

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `Certification` | `getCertification()` Returns the `Certification`
    `String` | `getDigest()` The digest for this repository, used for local published repositories to grant remote accesss
    `List<InstallablePackage>` | `getInstallablePackages(List<Identifier> provisionedPackages)` Returns a list of `InstallablePackage`s for the given list of package `Identifier`s
    `PackageArchive` | `getPackageArchive(String packageName, String packageVersion, String packageTimestamp)` Returns the `PackageArchive` with the given name, version and timestamp
    `Packages` | `getPackages()` Returns the `Packages` offered by this repository, containing a list of all available `Package`s
    `Packages` | `getPackages(String packageName)` Returns the `Packages` offered by this repository, containing a list of all available `Package`s
    `PackageVersions` | `getPackageVersions(String packageName)` Returns the `PackageVersions` for the package with the given name, containing a list of `PackageInfo` rmations
    `String` | `getRemoteRepositoryName()` In case the type for this repository is `RepositoryType.REMOTE`, returns the name of the referred remote repository.
    `RepositoryMode` | `getRepositoryMode()` The mode for this repository,
    `RepositoryType` | `getRepositoryType()` The type for this repository.
    `Collection<X509Certificate>` | `getTrustedCertChain()` Returns the certificate chain, if this is a remote repository and a certificate chain to be trusted has been defined
    `URI` | `getUri()` The URI for this `Repository`, may refer to to local filesystem or a remote address
    `boolean` | `isActive()` Whether or not `PackageArchive`s can be retrieved from this repository
    `boolean` | `isPublished()` Whether or not this repository is being published via the SOAP interface, so other repositories can refer to it as an remote repository
    `boolean` | `isStrict()` Whether or not this repository uses strict filename validation when scanning for `PackageArchive`s, i.e.

    - ### Methods inherited from interface org.appng.api.model.Nameable

      `getDescription, getName`

    - ### Methods inherited from interface org.appng.api.model.Identifiable

      `getId`

    - ### Methods inherited from interface org.appng.api.model.Versionable

      `getVersion`

- - ### Method Detail

    - #### getRepositoryType

          RepositoryType getRepositoryType()

      The type for this repository.
      Returns:
        the `RepositoryType`

    - #### getUri

          URI getUri()

      The URI for this `Repository`, may refer to to local filesystem or a remote address
      Returns:
        the URI

    - #### isActive

          boolean isActive()

      Whether or not `PackageArchive`s can be retrieved from this repository
      Returns:
        `true` if this repository is active, `false` otherwise

    - #### isStrict

          boolean isStrict()

      Whether or not this repository uses strict filename validation when scanning for `PackageArchive`s, i.e. the naming pattern must be `<name>-<version>-<timestamp>.zip`. If this method returns `false`, the more lax naming pattern `<name>-<version>.zip` is used, omitting the `<timestamp>` part.
      Returns:
        if this repository uses strict filename validation

    - #### isPublished

          boolean isPublished()

      Whether or not this repository is being published via the SOAP interface, so other repositories can refer to it as an remote repository
      Returns:
        `true` if this repository is published, `false` otherwise
      See Also:
        `getRepositoryType()`

    - #### getDigest

          String getDigest()

      The digest for this repository, used for local published repositories to grant remote accesss
      Returns:
        the digest
      See Also:
        `isPublished()`

    - #### getRepositoryMode

          RepositoryMode getRepositoryMode()

      The mode for this repository,
      Returns:
        the `RepositoryMode`

    - #### getRemoteRepositoryName

          String getRemoteRepositoryName()

      In case the type for this repository is `RepositoryType.REMOTE`, returns the name of the referred remote repository.
      Returns:
        the name of the referred remote repository

    - #### getInstallablePackages

          List<InstallablePackage> getInstallablePackages(List<Identifier> provisionedPackages)
                                                   throws BusinessException

      Returns a list of `InstallablePackage`s for the given list of package `Identifier`s
      Parameters:
        `provisionedPackages` - the list of package identifiers
      Returns:
        a list of `InstallablePackage`s for the given package identifiers
      Throws:
        `BusinessException` - if an error occurs while retrieving the packages

    - #### getPackageArchive

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

      Returns the `PackageArchive` with the given name, version and timestamp
      Parameters:
        `packageName` - the name of the archive
        `packageVersion` - the version of the archive
        `packageTimestamp` - the timestamp of the archive, only used if `isStrict()` returns `true`.
      Returns:
        the `PackageArchive`
      Throws:
        `BusinessException` - if no such `PackageArchive` exists or if this repository is not active
      See Also:
        `isStrict()`, `isActive()`

    - #### getPackages

          Packages getPackages()
                        throws BusinessException

      Returns the `Packages` offered by this repository, containing a list of all available `Package`s
      Returns:
        the `Packages` offered by this repository
      Throws:
        `BusinessException` - if an error occurs while reading the package informations

    - #### getPackages

          Packages getPackages(String packageName)
                        throws BusinessException

      Returns the `Packages` offered by this repository, containing a list of all available `Package`s
      Parameters:
        `packageName` - an optional search-string for the package's name, supporting `*` as a placeholder
      Returns:
        the `Packages` offered by this repository
      Throws:
        `BusinessException` - if an error occurs while reading the package informations

    - #### getCertification

          Certification getCertification()
                                  throws BusinessException

      Returns the `Certification`
      Returns:
      Throws:
        `BusinessException`

    - #### getPackageVersions

          PackageVersions getPackageVersions(String packageName)
                                      throws BusinessException

      Returns the `PackageVersions` for the package with the given name, containing a list of `PackageInfo` rmations
      Parameters:
        `packageName` - the name of the package to get the versions for
      Returns:
        the `PackageVersions`
      Throws:
        `BusinessException` - if an error occurs while retrieving the `PackageVersions`

    - #### getTrustedCertChain

          Collection<X509Certificate> getTrustedCertChain()
                                                   throws SigningException

      Returns the certificate chain, if this is a remote repository and a certificate chain to be trusted has been defined
      Returns:
        the immutable certificate chain, or `null`
      Throws:
        `SigningException` - if an error occurs while reading the certificate chain

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