private void add(Connection connection, Collection connections) throws ConnectionException {
Connection c = null;
try {
c = (Connection) BeanUtils.cloneBean(connection);
} catch (Exception e) {
throw new ConnectionException("Unable to clone bean "+c);
}
c.setId(UIDGenerator.generateId());
connections.add(c);
try {
fileService.createNewFile(c.getName()+propFileExt,connectionsDirPath);
} catch (FileException e) {
throw new ConnectionException(e.toString());
}
}