@Entity public class RepositoryImpl extends Object implements Repository, Auditable<Integer>
Repository implementation.| Constructor and Description |
|---|
RepositoryImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
deletePackageVersion(String applicationName,
String applicationVersion,
String applicationTimestamp) |
byte[] |
getAcceptedCerts() |
static ApplicationImpl |
getApplication(ApplicationImpl application,
ApplicationInfo applicationInfo) |
static ApplicationImpl |
getApplication(ApplicationInfo applicationInfo) |
Certification |
getCertification()
Returns the
Certification |
@Size(max=8192,message="{validation.string.max}") String |
getDescription()
Returns the description.
|
String |
getDigest()
The digest for this repository, used for local published repositories to grant remote accesss
|
Integer |
getId()
Returns the id.
|
List<InstallablePackage> |
getInstallablePackages(List<Identifier> provisionedPackages)
Returns a list of
InstallablePackages for the given list of package Identifiers |
@NotNull(message="{validation.notNull}") @Size(max=64,message="{validation.string.max}") String |
getName()
Returns the name.
|
PackageArchive |
getPackageArchive(String applicationName,
String applicationVersion,
String applicationTimestamp)
Returns the
PackageArchive with the given name, version and timestamp |
Packages |
getPackages()
|
Packages |
getPackages(String packageName)
|
List<PackageVersion> |
getPackageVersions(List<Identifier> provisionedApplicationsList,
String name) |
PackageVersions |
getPackageVersions(String name)
Returns the
PackageVersions for the package with the given name, containing a list of PackageInfo
rmations |
Collection<X509Certificate> |
getRemoteCerts()
Returns the certificate chain, if this is a signed remote repository.
|
@Size(max=64,message="{validation.string.max}") 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 |
Date |
getVersion()
Returns the version.
|
boolean |
isActive()
Whether or not
PackageArchives 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
PackageArchives, i.e. |
void |
reload()
Reloads the application repository.
|
void |
setAcceptedCerts(byte[] acceptedCerts) |
void |
setActive(boolean isActive) |
void |
setDescription(String description) |
void |
setDigest(String digest) |
void |
setId(Integer id) |
void |
setName(String name) |
void |
setPublished(boolean isPublished) |
void |
setRemoteRepositoryName(String remoteRepositoryName) |
void |
setRepositoryMode(RepositoryMode repositoryMode) |
void |
setRepositoryType(RepositoryType repositoryType) |
void |
setStrict(boolean isStrict) |
void |
setTrustedCertChain(Collection<X509Certificate> trustedCerts)
Sets the certificate chain to trust for this repository
|
void |
setUri(URI uri) |
void |
setVersion(Date version) |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetAuditNamepublic Integer getId()
IdentifiablegetId in interface Identifiable<Integer>public void setId(Integer id)
@NotNull(message="{validation.notNull}")
@Size(max=64,
message="{validation.string.max}")
public @NotNull(message="{validation.notNull}") @Size(max=64,message="{validation.string.max}") String getName()
Nameablepublic void setName(String name)
@Size(max=8192,
message="{validation.string.max}")
public @Size(max=8192,message="{validation.string.max}") String getDescription()
NameablegetDescription in interface Nameablepublic void setDescription(String description)
public Date getVersion()
VersionablegetVersion in interface Versionable<Date>public void setVersion(Date version)
public RepositoryType getRepositoryType()
RepositorygetRepositoryType in interface RepositoryRepositoryTypepublic void setRepositoryType(RepositoryType repositoryType)
public URI getUri()
RepositoryRepository, may refer to to local filesystem or a remote addressgetUri in interface Repositorypublic void setUri(URI uri)
public boolean isActive()
RepositoryPackageArchives can be retrieved from this repositoryisActive in interface Repositorytrue if this repository is active, false otherwisepublic void setActive(boolean isActive)
public boolean isPublished()
RepositoryisPublished in interface Repositorytrue if this repository is published, false otherwiseRepository.getRepositoryType()public void setPublished(boolean isPublished)
public boolean isStrict()
RepositoryPackageArchives, 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.isStrict in interface Repositorypublic void setStrict(boolean isStrict)
public RepositoryMode getRepositoryMode()
RepositorygetRepositoryMode in interface RepositoryRepositoryModepublic void setRepositoryMode(RepositoryMode repositoryMode)
@Size(max=64,
message="{validation.string.max}")
public @Size(max=64,message="{validation.string.max}") String getRemoteRepositoryName()
RepositoryRepositoryType.REMOTE, returns the name of the referred remote
repository.getRemoteRepositoryName in interface Repositorypublic void setRemoteRepositoryName(String remoteRepositoryName)
public String getDigest()
RepositorygetDigest in interface RepositoryRepository.isPublished()public void setDigest(String digest)
public List<InstallablePackage> getInstallablePackages(List<Identifier> provisionedPackages) throws BusinessException
RepositoryInstallablePackages for the given list of package IdentifiersgetInstallablePackages in interface RepositoryprovisionedPackages - the list of package identifiersInstallablePackages for the given package identifiersBusinessException - if an error occurs while retrieving the packagespublic List<PackageVersion> getPackageVersions(List<Identifier> provisionedApplicationsList, String name) throws BusinessException
BusinessExceptionpublic Packages getPackages() throws BusinessException
RepositorygetPackages in interface RepositoryPackages offered by this repositoryBusinessException - if an error occurs while reading the package informationspublic Packages getPackages(String packageName) throws BusinessException
RepositorygetPackages in interface RepositorypackageName - an optional search-string for the package's name, supporting * as a placeholderPackages offered by this repositoryBusinessException - if an error occurs while reading the package informationspublic Certification getCertification() throws BusinessException
RepositoryCertificationgetCertification in interface RepositoryBusinessExceptionpublic PackageVersions getPackageVersions(String name) throws BusinessException
RepositoryPackageVersions for the package with the given name, containing a list of PackageInfo
rmationsgetPackageVersions in interface Repositoryname - the name of the package to get the versions forPackageVersionsBusinessException - if an error occurs while retrieving the PackageVersionspublic PackageArchive getPackageArchive(String applicationName, String applicationVersion, String applicationTimestamp) throws BusinessException
RepositoryPackageArchive with the given name, version and timestampgetPackageArchive in interface RepositoryapplicationName - the name of the archiveapplicationVersion - the version of the archiveapplicationTimestamp - the timestamp of the archive, only used if Repository.isStrict() returns true.PackageArchiveBusinessException - if no such PackageArchive exists or if this repository is not activeRepository.isStrict(),
Repository.isActive()public void deletePackageVersion(String applicationName, String applicationVersion, String applicationTimestamp) throws Exception
Exceptionpublic static ApplicationImpl getApplication(ApplicationInfo applicationInfo)
public static ApplicationImpl getApplication(ApplicationImpl application, ApplicationInfo applicationInfo)
public void reload()
throws BusinessException
BusinessExceptionpublic byte[] getAcceptedCerts()
public void setAcceptedCerts(byte[] acceptedCerts)
public Collection<X509Certificate> getRemoteCerts() throws SigningException, BusinessException
SigningException - if an error occurs while retrieving the certificate chainBusinessException - if an the remote repository could not be reachedpublic void setTrustedCertChain(Collection<X509Certificate> trustedCerts) throws SigningException
trustedCerts - the certificate chainSigningException - if an error occurs while encoding the certificates to their binary formgetTrustedCertChain()public Collection<X509Certificate> getTrustedCertChain() throws SigningException
RepositorygetTrustedCertChain in interface RepositorynullSigningException - if an error occurs while reading the certificate chainCopyright © 2011–2021 aiticon GmbH. All rights reserved.