dp.setType(Property.DYNAMIC_TYPE);
dp.setKey(key.getAttributeValue());
dp.setMapper(MediatorFactoryFinder.getInstance());
config.setMainMediator(dp);
} else {
SynapseMediator sm = (SynapseMediator)
MediatorFactoryFinder.getInstance().getMediator(rules);
if (sm.getList().isEmpty()) {
handleException("Invalid configuration, the main mediator specified by the <rules> element is empty");
} else {
config.setMainMediator(sm);
}
}