public class RepositoryCacheFilesystem extends Object
RepositoryCache
that retrieves the packages from the local filesystem.Modifier and Type | Field and Description |
---|---|
protected Map<String,PackageWrapper> |
applicationWrapperMap |
protected byte[] |
cert |
protected byte[] |
privateKey |
protected Repository |
repository |
protected SignatureWrapper |
signatureWrapper |
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.
|
protected byte[] privateKey
protected final Map<String,PackageWrapper> applicationWrapperMap
protected final Repository repository
protected byte[] cert
protected SignatureWrapper signatureWrapper
public Certification getCertification()
RepositoryCache
Certification
for the cached repository, if anyCertification
public boolean add(PackageArchive archive)
RepositoryCache
PackageArchive
archive
- the archive to addpublic void initializeWrapper(String packageName)
public void deletePackageVersion(String packageName, String packageVersion, String packageTimestamp) throws BusinessException
RepositoryCache
packageName
- The package name.packageVersion
- The package version.packageTimestamp
- The package timestamp.BusinessException
- if such a package does not existpublic PackageArchive getPackageArchive(String packageName, String packageVersion, String packageTimestamp) throws BusinessException
RepositoryCache
PackageArchive
for the specified package.packageName
- The package name.packageVersion
- The package version.packageTimestamp
- The package timestamp.PackageArchive
.BusinessException
- if the archive was not found or is invalidpublic void reload() throws BusinessException
RepositoryCache
reload
in interface RepositoryCache
BusinessException
public List<PackageWrapper> getApplications() throws BusinessException
RepositoryCache
getApplications
in interface RepositoryCache
BusinessException
public List<PackageWrapper> getApplications(String packageName) throws BusinessException
RepositoryCache
getApplications
in interface RepositoryCache
packageName
- an optional search-string for the package's name, supporting *
as a placeholderBusinessException
public List<PackageInfo> getVersions(String name) throws BusinessException
RepositoryCache
getVersions
in interface RepositoryCache
name
- The name of the application.PackageInfo
s.BusinessException
- if such a package does not existpublic PackageWrapper getPackageWrapper(String name)
RepositoryCache
PackageWrapper
for the a package.getPackageWrapper
in interface RepositoryCache
name
- The name of the package.PackageWrapper
protected Repository getRepository()
Copyright © 2011–2021 aiticon GmbH. All rights reserved.