public class ProxyRepository extends AbstractRepository implements RepositoryResolverClient
Repository implementation that takes a
RepositoryResolver instance and the id of a managed repository, and delegate all
calls through to the given repository.
The purpose is to allow Sails to refer to other local repositories using a unique
identifier without having to go through an HTTP layer.
The implementation is independent of DelegatingRepository so that it is freed
from having to provide implementation details in its configuration data. Instead, it only has to provide an
unambiguous local identifier to the proxy.
logger| Constructor and Description |
|---|
ProxyRepository() |
ProxyRepository(RepositoryResolver resolver,
String proxiedIdentity)
Creates a repository instance that proxies to the given repository.
|
ProxyRepository(String proxiedIdentity)
Creates a repository instance that proxies to a repository of the give ID.
|
| Modifier and Type | Method and Description |
|---|---|
RepositoryConnection |
getConnection() |
File |
getDataDir() |
String |
getProxiedIdentity() |
ValueFactory |
getValueFactory() |
protected void |
initializeInternal() |
boolean |
isWritable() |
void |
setDataDir(File dataDir) |
void |
setProxiedIdentity(String value) |
void |
setRepositoryResolver(RepositoryResolver resolver) |
protected void |
shutDownInternal() |
init, initialize, isInitialized, shutDownpublic ProxyRepository()
public ProxyRepository(String proxiedIdentity)
proxiedIdentity - id of the proxied repositorypublic ProxyRepository(RepositoryResolver resolver, String proxiedIdentity)
resolver - manager that the proxied repository is associated withproxiedIdentity - id of the proxied repositorypublic final void setProxiedIdentity(String value)
public String getProxiedIdentity()
public final void setRepositoryResolver(RepositoryResolver resolver)
setRepositoryResolver in interface RepositoryResolverClientpublic void setDataDir(File dataDir)
setDataDir in interface Repositorypublic File getDataDir()
getDataDir in interface Repositorypublic boolean isWritable()
throws RepositoryException
isWritable in interface RepositoryRepositoryExceptionpublic RepositoryConnection getConnection() throws RepositoryException
getConnection in interface RepositoryRepositoryExceptionpublic ValueFactory getValueFactory()
getValueFactory in interface Repositoryprotected void initializeInternal()
throws RepositoryException
initializeInternal in class AbstractRepositoryRepositoryExceptionprotected void shutDownInternal()
throws RepositoryException
shutDownInternal in class AbstractRepositoryRepositoryExceptionCopyright © 2015-2019 Eclipse Foundation. All Rights Reserved.