Package 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 multipleApplication
s for provisioning. In the repository applications are represented through aInstallablePackage
.- Author:
- Matthias Herlitzius, Matthias Müller
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Certification
getCertification()
Returns theCertification
String
getDigest()
The digest for this repository, used for local published repositories to grant remote accesssList<InstallablePackage>
getInstallablePackages(List<Identifier> provisionedPackages)
Returns a list ofInstallablePackage
s for the given list of packageIdentifier
sPackageArchive
getPackageArchive(String packageName, String packageVersion, String packageTimestamp)
Returns thePackageArchive
with the given name, version and timestampPackages
getPackages()
Packages
getPackages(String packageName)
PackageVersions
getPackageVersions(String packageName)
Returns thePackageVersions
for the package with the given name, containing a list ofPackageInfo
rmationsString
getRemoteRepositoryName()
In case the type for this repository isRepositoryType.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 definedURI
getUri()
The URI for thisRepository
, may refer to to local filesystem or a remote addressboolean
isActive()
Whether or notPackageArchive
s can be retrieved from this repositoryboolean
isPublished()
Whether or not this repository is being published via the SOAP interface, so other repositories can refer to it as an remote repositoryboolean
isStrict()
Whether or not this repository uses strict filename validation when scanning forPackageArchive
s, i.e.-
Methods inherited from interface org.appng.api.model.Identifiable
getId
-
Methods inherited from interface org.appng.api.model.Nameable
getDescription, getName
-
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 thisRepository
, may refer to to local filesystem or a remote address- Returns:
- the URI
-
isActive
boolean isActive()
Whether or notPackageArchive
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 forPackageArchive
s, i.e. the naming pattern must be<name>-<version>-<timestamp>.zip
. If this method returnsfalse
, 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 isRepositoryType.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 ofInstallablePackage
s for the given list of packageIdentifier
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 thePackageArchive
with the given name, version and timestamp- Parameters:
packageName
- the name of the archivepackageVersion
- the version of the archivepackageTimestamp
- the timestamp of the archive, only used ifisStrict()
returnstrue
.- Returns:
- the
PackageArchive
- Throws:
BusinessException
- if no suchPackageArchive
exists or if this repository is not active- See Also:
isStrict()
,isActive()
-
getPackages
Packages getPackages() throws BusinessException
- 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
- 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 theCertification
- Returns:
- Throws:
BusinessException
-
getPackageVersions
PackageVersions getPackageVersions(String packageName) throws BusinessException
Returns thePackageVersions
for the package with the given name, containing a list ofPackageInfo
rmations- Parameters:
packageName
- the name of the package to get the versions for- Returns:
- the
PackageVersions
- Throws:
BusinessException
- if an error occurs while retrieving thePackageVersions
-
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
-
-