// Attach the file via ConvertsRelation, create a new document or
// create a new version of the document
dprop.setAuthor(aUser).setDate(aDate).setFormat(fileFormat);
+ String authorName = I18nUtils.getMessageLocaleDefault(aUser
+ .getDisplayName());
+ String summary = I18nUtils.getMessageLocaleDefault(
+ MessageKeyEnum.DCT_000005.toString(), authorName);
+ dprop.setDescription(summary);
if (doc.getId() > 0) {
checkinExistingDoc(step, doc, dprop, fileFormat, upfile,
}
docname += "_" + i; // The generated new document title
- dprop.setDescription("Checked in").setName(docname);
+ dprop.setName(docname);
Publication newPub = getStepService().createDocument(step,
dprop);
} else {
// If an attachment with this extension already exists then
// replace it by the new one
- moveFile(upfile,attach.asFile());
+ moveFile(upfile, attach.asFile());
// Update attached file modification date
attach.setDate(new Date());
}