@Entity public class RepositoryImpl extends Object implements Repository
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 |
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
InstallablePackage s for the given list of package Identifier s |
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()
|
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.
|
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
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. |
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() |
public Integer getId()
Identifiable
getId
in interface Identifiable<Integer>
public void setId(Integer id)
@NotNull(message="{validation.notNull}") @Size(max=64, message="{validation.string.max}") public String getName()
Nameable
public void setName(String name)
@Size(max=8192, message="{validation.string.max}") public String getDescription()
Nameable
getDescription
in interface Nameable
public void setDescription(String description)
public Date getVersion()
Versionable
getVersion
in interface Versionable<Date>
public void setVersion(Date version)
public RepositoryType getRepositoryType()
Repository
getRepositoryType
in interface Repository
RepositoryType
public void setRepositoryType(RepositoryType repositoryType)
public URI getUri()
Repository
Repository
, may refer to to local filesystem or a remote addressgetUri
in interface Repository
public void setUri(URI uri)
public boolean isActive()
Repository
PackageArchive
s can be retrieved from this repositoryisActive
in interface Repository
true
if this repository is active, false
otherwisepublic void setActive(boolean isActive)
public boolean isPublished()
Repository
isPublished
in interface Repository
true
if this repository is published, false
otherwiseRepository.getRepositoryType()
public void setPublished(boolean isPublished)
public boolean isStrict()
Repository
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.isStrict
in interface Repository
public void setStrict(boolean isStrict)
public RepositoryMode getRepositoryMode()
Repository
getRepositoryMode
in interface Repository
RepositoryMode
public void setRepositoryMode(RepositoryMode repositoryMode)
@Size(max=64, message="{validation.string.max}") public String getRemoteRepositoryName()
Repository
RepositoryType.REMOTE
, returns the name of the referred remote
repository.getRemoteRepositoryName
in interface Repository
public void setRemoteRepositoryName(String remoteRepositoryName)
public String getDigest()
Repository
getDigest
in interface Repository
Repository.isPublished()
public void setDigest(String digest)
public List<InstallablePackage> getInstallablePackages(List<Identifier> provisionedPackages) throws BusinessException
Repository
InstallablePackage
s for the given list of package Identifier
sgetInstallablePackages
in interface Repository
provisionedPackages
- the list of package identifiersInstallablePackage
s for the given package identifiersBusinessException
- if an error occurs while retrieving the packagespublic List<PackageVersion> getPackageVersions(List<Identifier> provisionedApplicationsList, String name) throws BusinessException
BusinessException
public Packages getPackages() throws BusinessException
Repository
getPackages
in interface Repository
Packages
offered by this repositoryBusinessException
- if an error occurs while reading the package informationspublic Certification getCertification() throws BusinessException
Repository
Certification
getCertification
in interface Repository
BusinessException
public PackageVersions getPackageVersions(String name) throws BusinessException
Repository
PackageVersions
for the package with the given name, containing a list of PackageInfo
rmationsgetPackageVersions
in interface Repository
name
- the name of the package to get the versions forPackageVersions
BusinessException
- if an error occurs while retrieving the PackageVersions
public PackageArchive getPackageArchive(String applicationName, String applicationVersion, String applicationTimestamp) throws BusinessException
Repository
PackageArchive
with the given name, version and timestampgetPackageArchive
in interface Repository
applicationName
- the name of the archiveapplicationVersion
- the version of the archiveapplicationTimestamp
- the timestamp of the archive, only used if Repository.isStrict()
returns true
.PackageArchive
BusinessException
- 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
Exception
public static ApplicationImpl getApplication(ApplicationInfo applicationInfo)
public static ApplicationImpl getApplication(ApplicationImpl application, ApplicationInfo applicationInfo)
public void reload() throws BusinessException
BusinessException
public 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 form#getTrustedCertChain()}
public Collection<X509Certificate> getTrustedCertChain() throws SigningException
Repository
getTrustedCertChain
in interface Repository
null
SigningException
- if an error occurs while reading the certificate chainCopyright © 2011–2017 aiticon GmbH. All rights reserved.