Package org.appng.core.model
Interface RepositoryCache
-
- All Known Implementing Classes:
RepositoryCacheFilesystem
,RepositoryCacheSoap
public interface RepositoryCache
Provides access to a application repository.- Author:
- Matthias Herlitzius
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
add(PackageArchive packagearchive)
Adds a singlePackageArchive
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 theCertification
for the cached repository, if anyPackageArchive
getPackageArchive(String packageName, String packageVersion, String packageTimestamp)
Returns aPackageArchive
for the specified package.PackageWrapper
getPackageWrapper(String name)
Returns thePackageWrapper
for the a package.List<PackageInfo>
getVersions(String name)
Returns all available versions of a package.void
reload()
Reloads the repository contents by clearing and updating the cache.
-
-
-
Method Detail
-
reload
void reload() throws BusinessException
Reloads the repository contents by clearing and updating the cache.- Throws:
BusinessException
-
add
boolean add(PackageArchive packagearchive) throws BusinessException
Adds a singlePackageArchive
- Parameters:
packagearchive
- the archive to add- Throws:
BusinessException
-
getApplications
List<PackageWrapper> getApplications() throws BusinessException
Returns all packages found in the repository.- Returns:
- The package list.
- Throws:
BusinessException
-
getApplications
List<PackageWrapper> getApplications(String packageName) throws BusinessException
Returns all packages that match the given name in the repository.- Parameters:
packageName
- an optional search-string for the package's name, supporting*
as a placeholder- Returns:
- The package list.
- Throws:
BusinessException
-
getPackageWrapper
PackageWrapper getPackageWrapper(String name)
Returns thePackageWrapper
for the a package.- Parameters:
name
- The name of the package.- Returns:
- the
PackageWrapper
-
getVersions
List<PackageInfo> getVersions(String name) throws BusinessException
Returns all available versions of a package.- Parameters:
name
- The name of the application.- Returns:
- The
PackageInfo
s. - Throws:
BusinessException
- if such a package does not exist
-
deletePackageVersion
void deletePackageVersion(String packageName, String packageVersion, String packageTimestamp) throws BusinessException
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
PackageArchive getPackageArchive(String packageName, String packageVersion, String packageTimestamp) throws BusinessException
Returns aPackageArchive
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
-
getCertification
Certification getCertification() throws BusinessException
Returns theCertification
for the cached repository, if any- Returns:
- the
Certification
- Throws:
BusinessException
- if an error occurred while building the certification
-
-