}
@Override
public synchronized void merge(Device device) throws ConfigurationException {
if (!configurationExists())
throw new ConfigurationNotFoundException();
String deviceDN = deviceRef(device.getDeviceName());
Device prev = loadDevice(deviceDN);
try {
modifyAttributes(deviceDN, storeDiffs(prev, device, new ArrayList<ModificationItem>()));
mergeChilds(prev, device, deviceDN);
updateCertificates(prev, device);
} catch (NameNotFoundException e) {
throw new ConfigurationNotFoundException(e);
} catch (NamingException e) {
throw new ConfigurationException(e);
} catch (CertificateException e) {
throw new ConfigurationException(e);
}