use of org.jumpmind.symmetric.service.INodeService in project symmetric-ds by JumpMind.
the class RestService method reinitializeImpl.
private void reinitializeImpl(ISymmetricEngine engine) {
INodeService nodeService = engine.getNodeService();
org.jumpmind.symmetric.model.Node modelNode = nodeService.findIdentity();
if (!this.isRootNode(engine, modelNode)) {
engine.uninstall();
}
engine.start();
}
use of org.jumpmind.symmetric.service.INodeService in project symmetric-ds by JumpMind.
the class SimpleIntegrationTest method test23IgnoreNodeChannel.
@Test(timeout = 120000)
public void test23IgnoreNodeChannel() {
logTestRunning();
INodeService rootNodeService = getServer().getNodeService();
IConfigurationService rootConfigService = getServer().getConfigurationService();
rootNodeService.ignoreNodeChannelForExternalId(true, TestConstants.TEST_CHANNEL_ID, TestConstants.TEST_ROOT_NODE_GROUP, TestConstants.TEST_ROOT_EXTERNAL_ID);
rootConfigService.clearCache();
NodeChannel channel = rootConfigService.getNodeChannel(TestConstants.TEST_CHANNEL_ID, TestConstants.TEST_ROOT_EXTERNAL_ID, false);
assertNotNull(channel);
assertTrue(channel.isIgnoreEnabled());
assertFalse(channel.isSuspendEnabled());
Customer customer = new Customer(201, "Charlie Dude", true, "300 Grub Street", "New York", "NY", 90009, new Date(), new Date(), THIS_IS_A_TEST, BINARY_DATA);
serverTestService.insertCustomer(customer);
clientPull();
assertNull(clientTestService.getCustomer(customer.getCustomerId()));
rootNodeService.ignoreNodeChannelForExternalId(false, TestConstants.TEST_CHANNEL_ID, TestConstants.TEST_ROOT_NODE_GROUP, TestConstants.TEST_ROOT_EXTERNAL_ID);
rootConfigService.clearCache();
clientPull();
assertNull(clientTestService.getCustomer(customer.getCustomerId()));
getClient().getConfigurationService().clearCache();
}
Aggregations