use of org.commonjava.indy.subsys.datafile.conf.DataFileConfiguration in project indy by Commonjava.
the class SetBackSettingsManagerTest method setup.
@Before
public void setup() throws Exception {
storeManager = new MemoryStoreDataManager(true);
final File dataSrc = new File("./src/main/data");
final File data = temp.newFolder("data");
FileUtils.copyDirectory(dataSrc, data);
final DataFileConfiguration config = new DataFileConfiguration(data, temp.newFolder("work"));
final DataFileManager fileManager = new DataFileManager(config, new DataFileEventManager());
final TemplatingEngine templates = new TemplatingEngine(new GStringTemplateEngine(), fileManager);
manager = new SetBackSettingsManager(storeManager, templates, fileManager, new SetbackConfig(true));
}
use of org.commonjava.indy.subsys.datafile.conf.DataFileConfiguration in project indy by Commonjava.
the class DataFileTCKFixtureProvider method before.
@Override
protected void before() throws Throwable {
super.before();
configDir = newFolder("db");
final IndyObjectMapper serializer = new IndyObjectMapper(true);
dataManager = new TestFlatFileDataManager(new DataFileConfiguration().withDataBasedir(configDir), serializer);
dataManager.install();
dataManager.clear(new ChangeSummary(ChangeSummary.SYSTEM_USER, "Setting up test"));
}
use of org.commonjava.indy.subsys.datafile.conf.DataFileConfiguration in project indy by Commonjava.
the class TestProvider method init.
@PostConstruct
public void init() {
try {
this.storageProviderConfig = new DefaultStorageProviderConfiguration(TEMP.newFolder("storage"));
this.dataConfig = new DataFileConfiguration(TEMP.newFolder("data"), TEMP.newFolder("work"));
} catch (final IOException e) {
e.printStackTrace();
Assert.fail("Failed to setup temporary directory structures: " + e.getMessage());
}
this.nfc = new MemoryNotFoundCache();
this.xmlInfra = new XMLInfrastructure();
this.typeMapper = new StandardTypeMapper();
this.indyConfig = new DefaultIndyConfiguration();
this.objectMapper = new IndyObjectMapper(true);
}
use of org.commonjava.indy.subsys.datafile.conf.DataFileConfiguration in project indy by Commonjava.
the class CoreServerProvider method init.
@PostConstruct
public void init() {
try {
folder.create();
this.nfc = new MemoryNotFoundCache();
this.dataFileManager = new DataFileManager(new DataFileConfiguration(folder.newFolder("indy-data")), dataFileEvents);
this.storeManager = new DataFileStoreDataManager(dataFileManager, objectMapper, storeDispatch);
storageConfig.setStorageRootDirectory(folder.newFolder("indy-storage"));
this.xml = new XMLInfrastructure();
this.typeMapper = new StandardTypeMapper();
} catch (IOException e) {
throw new IllegalStateException("Failed to start core server provider: " + e.getMessage(), e);
}
}
use of org.commonjava.indy.subsys.datafile.conf.DataFileConfiguration in project indy by Commonjava.
the class DataFileStoreDataManagerTest method setup.
@Before
public void setup() throws Exception {
fileCfg = new DataFileConfiguration(temp.newFolder("data"), temp.newFolder("work"));
final DataFileManager fileMgr = new DataFileManager(fileCfg, new DataFileEventManager());
mgr = new DataFileStoreDataManager(fileMgr, new IndyObjectMapper(false), new StoreEventDispatcherStub());
}
Aggregations