IComponentsRepository
, ISynchronizer
public class ComponentRepositoryImpl extends AbstractComponentRepository<ComponentRepositoryDB>
AbstractComponentRepository
Revision determination is a little tricky and essentially based on max(package rev, component rev) an approx of the pegrevision (http://svnbook.red-bean.com/nightly/en/svn.advanced.pegrevs.html) with a non-trivial scheme for delta updates. The reason for doing this is subversions preservation of revisions of nested objects in case of moves (renames) and branch copies.
Repository configuration (i.e. component level) properties:
svncr.url | URL of the subversion root folder of the repository. E.g. something like
svn://z2-environment.net/z2_base/trunk/l1 |
svncr.user | User name for Subversion authentication (optional) |
svncr.password | Password for Subversion authentication (optional) |
svncr.priority | Priority of the repository with the repository chain. See
IComponentsRepository . |
System properties that have a meaning:
com.zfabrik.svncr.mode |
(DEPRECATED) If set to "relaxed" will only issue a warning when repository access
fails during sync revision lookup (e.g. on startup) - i.e. if the repo
revision cannot be determined via a repository request. This means that a
given system may continue to run although a repository may not be accessible,
as long no requests have to made because resources are not (yet) available in
the repository cache. Defaults to strict |
AbstractExtComponentRepository.Repo, AbstractExtComponentRepository.RepoMBean
Modifier and Type | Field | Description |
---|---|---|
static java.lang.String |
MODE |
If set to "relaxed" will only issue a warning when repository access
fails during sync revision lookup (e.g.
|
static java.lang.String |
MODE_RELAXED |
Permissable value of
MODE |
static java.lang.String |
MODE_STRICT |
Permissable value of
MODE |
static java.lang.String |
SVNCR_PRIO |
priority of the repository with the repository chain.
|
static java.lang.String |
SVNCR_PWD |
Password for authentication at the repository
|
static java.lang.String |
SVNCR_ROOT |
Folder name in cache.
|
static java.lang.String |
SVNCR_URL |
URL of the subversion root folder for this repository.
|
static java.lang.String |
SVNCR_USER |
User name for authentication at the repository
|
ALL
COMPONENT_REPO_IMPLEMENTATION, COMPONENT_REPO_MODE, COMPONENT_REPO_MODE_RELAXED, COMPONENT_REPO_MODE_STRICT
PRIO, TYPE
Constructor | Description |
---|---|
ComponentRepositoryImpl(java.lang.String name,
java.util.Properties props) |
Modifier and Type | Method | Description |
---|---|---|
void |
download(FSCRDBComponent c,
java.io.File destFolder) |
Download resources of a single component into the given folder
|
protected java.util.Properties |
getExpectedConfiguration() |
provided expected repository configuration.
|
SvnWorkResource |
getRepoSession() |
|
protected long |
getRevision() |
Overall revision of the repository - if available
|
protected java.lang.String |
getURL() |
Some URL style information on the external data source the repository implementation relies on
|
ComponentRepositoryDB |
scan(ComponentRepositoryDB current) |
Provide an updated DB.
|
static ComponentRepositoryImpl |
test_create(java.lang.String name,
java.io.File root,
java.util.Properties props,
com.zfabrik.svnaccess.ISvnRepository svnRepository) |
|
ComponentRepositoryDB |
test_deltaScan(ComponentRepositoryDB db,
long rev) |
|
ComponentRepositoryDB |
test_fullScan(long rev) |
|
com.zfabrik.svnaccess.ISvnRepository |
test_getRepo() |
|
void |
test_setRepository(com.zfabrik.svnaccess.ISvnRepository accessor) |
|
java.lang.String |
toString() |
as, checkOfflineMode, complete, configure, configure, configure, findComponents, findComponents, getCacheRoot, getComponent, getComponent, getContext, getDB, getModules, getModules, getName, getRevision, getRevision, has, isRelaxedMode, preInvalidation, preInvalidation, retrieve, retrieve, setEvictionDelay, start, stop, test_setContext, test_setDb, test_setInited
public static final java.lang.String MODE
strict
public static final java.lang.String MODE_RELAXED
MODE
public static final java.lang.String MODE_STRICT
MODE
public static final java.lang.String SVNCR_URL
public static final java.lang.String SVNCR_USER
public static final java.lang.String SVNCR_PWD
public static final java.lang.String SVNCR_PRIO
IComponentsRepository
.public static final java.lang.String SVNCR_ROOT
public ComponentRepositoryImpl(java.lang.String name, java.util.Properties props)
protected java.util.Properties getExpectedConfiguration()
com.zfabrik.components.provider.util.AbstractExtComponentRepository
FSComponentRepositoryHelper
to make a decision on whether the repository
cache is still valid. Any change in repository configuration between repository
initialization will be taken as reason to completely purge the local repository.
By default this method returns the complete repository configuration.getExpectedConfiguration
in class AbstractExtComponentRepository<FSCRDBComponent,ComponentRepositoryDB>
public ComponentRepositoryDB scan(ComponentRepositoryDB current)
com.zfabrik.components.provider.util.AbstractExtComponentRepository
scan
in class AbstractExtComponentRepository<FSCRDBComponent,ComponentRepositoryDB>
public void download(FSCRDBComponent c, java.io.File destFolder)
com.zfabrik.components.provider.util.AbstractExtComponentRepository
download
in class AbstractExtComponentRepository<FSCRDBComponent,ComponentRepositoryDB>
protected java.lang.String getURL()
com.zfabrik.components.provider.util.AbstractExtComponentRepository
getURL
in class AbstractExtComponentRepository<FSCRDBComponent,ComponentRepositoryDB>
protected long getRevision()
com.zfabrik.components.provider.util.AbstractExtComponentRepository
getRevision
in class AbstractExtComponentRepository<FSCRDBComponent,ComponentRepositoryDB>
public SvnWorkResource getRepoSession()
public java.lang.String toString()
toString
in class AbstractExtComponentRepository<FSCRDBComponent,ComponentRepositoryDB>
public static ComponentRepositoryImpl test_create(java.lang.String name, java.io.File root, java.util.Properties props, com.zfabrik.svnaccess.ISvnRepository svnRepository)
public void test_setRepository(com.zfabrik.svnaccess.ISvnRepository accessor)
public com.zfabrik.svnaccess.ISvnRepository test_getRepo() throws java.io.IOException
java.io.IOException
public ComponentRepositoryDB test_fullScan(long rev) throws java.lang.Exception
java.lang.Exception
public ComponentRepositoryDB test_deltaScan(ComponentRepositoryDB db, long rev) throws java.lang.Exception
java.lang.Exception