+ getBackupConfig().getBackupDir().getCanonicalPath());
}
IBindingFactory factory = BindingDirectory.getFactory(RepositoryServiceConfiguration.class);
IUnmarshallingContext uctx = factory.createUnmarshallingContext();
RepositoryServiceConfiguration conf =
(RepositoryServiceConfiguration) uctx.unmarshalDocument(new FileInputStream(configFile), null);
if (conf.getRepositoryConfigurations().size() != 1)
{
throw new RepositoryRestoreExeption(
"The oririginal configuration should be contains only one repository entry :"
+ configFile.getCanonicalPath());
}
if (!conf.getRepositoryConfiguration(getBackupConfig().getRepository()).getName().equals(getBackupConfig().getRepository()))
{
throw new RepositoryRestoreExeption(
"The oririginal configuration should be contains only one repository entry with name \""
+ getBackupConfig().getRepository() + "\" :"
+ configFile.getCanonicalPath());
}
return conf.getRepositoryConfiguration(getBackupConfig().getRepository());
}