public class ProxyRepository extends RepositoryBase 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.
| Constructor and Description |
|---|
ProxyRepository() |
ProxyRepository(RepositoryResolver resolver,
String proxiedIdentity)
Creates a repository instance that proxies to the given repository.
|
| 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() |
initialize, isInitialized, shutDownpublic ProxyRepository()
public 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 RepositoryBaseRepositoryExceptionprotected void shutDownInternal()
throws RepositoryException
shutDownInternal in class RepositoryBaseRepositoryExceptionCopyright © 2001-2014 Aduna. All Rights Reserved.