OKMDocumentBean document = new OKMDocumentBean();
document.setLocalFilename(documentPath);
try {
document.setPath(path + "/" + Util.getLocalFileName(documentPath));
} catch (UnsupportedEncodingException ex) {
new OKMException(ex);
}
DocumentLogic.create(configBean.getHost(), configBean.getUser(), configBean.getPassword(), document);
waitWindow.setVisible(false);
new ConfirmationForm("main.document.added",ConfirmationForm.OPERATION_DOCUMENT_ADDED, "");
} else {
waitWindow.setVisible(false);
new ErrorForm(new OKMException(lang.getString("main.error.save.file")));
}
}