throws ApplicationException {
Application a = null;
try {
a = (Application) BeanUtils.cloneBean(application);
} catch (Exception e) {
throw new ApplicationException(
"Impossible to clone application bean:" + application
+ "=> " + e);
}
a.setId(UIDGenerator.generateId());
applications.add(a);
try {
fileService.createNewFile(a.getName() + xmlFileExt, appliDirPath);
} catch (FileException e1) {
throw new ApplicationException(e1.toString());
}
try {
mappingService.saveMapping(a, appliDirPath + a.getName()
+ xmlFileExt);
} catch (MappingException e) {
throw new ApplicationException(e.toString());
}
}