// now that the content source has been changed,
// restart its adapter and reschedule its sync job because the config might have changed.
try {
ContentServerPluginContainer pc = ContentManagerHelper.getPluginContainer();
pc.unscheduleProviderSyncJob(contentSource);
pc.getAdapterManager().restartAdapter(contentSource);
pc.scheduleProviderSyncJob(contentSource);
if (syncNow) {
pc.syncProviderNow(contentSource);
}