use of org.tmatesoft.svn.core.internal.wc.admin.ISVNAdminAreaFactorySelector in project oxTrust by GluuFederation.
the class SubversionService method initSubversionService.
/*
* Initialize singleton instance during startup
*/
public void initSubversionService() {
String svnConfigurationStoreRoot = null;
if (appConfiguration.isPersistSVN()) {
svnConfigurationStoreRoot = appConfiguration.getSvnConfigurationStoreRoot();
}
SVNAdminAreaFactory.setSelector(new ISVNAdminAreaFactorySelector() {
@SuppressWarnings({ "unchecked", "rawtypes" })
public Collection getEnabledFactories(File path, Collection factories, boolean writeAccess) throws SVNException {
Collection enabledFactories = new TreeSet();
for (Iterator factoriesIter = factories.iterator(); factoriesIter.hasNext(); ) {
SVNAdminAreaFactory factory = (SVNAdminAreaFactory) factoriesIter.next();
int version = factory.getSupportedVersion();
if (version == SVNAdminAreaFactory.WC_FORMAT_16) {
enabledFactories.add(factory);
}
}
return enabledFactories;
}
});
if (StringHelper.isEmpty(svnConfigurationStoreRoot)) {
log.warn("The service which commit configuration files into SVN was disabled");
return;
}
SvnHelper.setupLibrary(svnConfigurationStoreRoot);
}
Aggregations