public class RepositoryCacheFactory extends Object
RepositoryCache
.Modifier and Type | Method and Description |
---|---|
RepositoryCache |
getCache(Repository repository)
Returns a
RepositoryCache for the given Repository |
static RepositoryCacheFactory |
init(Properties platformConfig)
Initializes the factory with properties from the platform's configuration
|
static RepositoryCacheFactory |
init(String cert,
String privateKey,
byte[] trustStore,
String storePass,
boolean validateCertChain)
Initializes the factory.
|
static RepositoryCacheFactory |
instance() |
void |
setConnectTimeout(int connectTimeout) |
void |
setReadTimeout(int readTimeout) |
static void |
validateRepositoryURI(Repository repository)
Checks whether the
Repository has a valid URI . |
public static RepositoryCacheFactory init(String cert, String privateKey, byte[] trustStore, String storePass, boolean validateCertChain)
cert
- the certificate to use when verifying a signed remote repository (PEM format)privateKey
- the private key to use when signing a local published repository (PEM format)trustStore
- the truststore used when verifying a signed remote repository (to build a KeyStore
from)storePass
- the truststore's passwordvalidateCertChain
- whether or not signed remote repositories are validated against the configured truststoreRepositoryCacheFactory
public static RepositoryCacheFactory init(Properties platformConfig)
platformConfig
- the platform's configurationRepositoryCacheFactory
init(java.lang.String, java.lang.String, byte[], java.lang.String, boolean)
,
Platform.Property#REPOSITORY_CERT
,
Platform.Property#REPOSITORY_SIGNATURE
,
Platform.Property#REPOSITORY_TRUSTSTORE
,
Platform.Property#REPOSITORY_TRUST_STORE_PASSWORD
,
Platform.Property#REPOSITORY_VERIFY_SIGNATURE
public static RepositoryCacheFactory instance()
public RepositoryCache getCache(Repository repository) throws BusinessException
RepositoryCache
for the given Repository
repository
- the Repository
RepositoryCache
BusinessException
- if an error occurred while retrieving the RepositoryCache
public static void validateRepositoryURI(Repository repository) throws BusinessException
Repository
has a valid URI
.repository
- the Repository
to checkBusinessException
- if the URI
defined by the Repository
is not validRepositoryScheme
,
Repository.getUri()
public void setConnectTimeout(int connectTimeout)
public void setReadTimeout(int readTimeout)
Copyright © 2011–2019 aiticon GmbH. All rights reserved.