use of org.apache.openmeetings.db.entity.file.FileItemLog in project openmeetings by apache.
the class ConvertingErrorsDialog method onOpen.
@Override
protected void onOpen(IPartialPageRequestHandler handler) {
BaseFileItem f = getModelObject();
setTitle(handler, Model.of(getString(f.getType() == BaseFileItem.Type.Recording ? "887" : "convert.errors.file")));
List<FileItemLog> logs = fileLogDao.get(f);
if (f.getHash() == null) {
message.setVisible(true);
message.setDefaultModelObject(getString("888"));
} else if (!f.exists()) {
message.setVisible(true);
message.setDefaultModelObject(getString(f.getType() == BaseFileItem.Type.Recording ? "1595" : "convert.errors.file.missing"));
} else {
message.setVisible(false);
}
if (!logs.isEmpty()) {
logView.setVisible(false);
logView.setList(logs).setVisible(true);
}
handler.add(container);
super.onOpen(handler);
}
use of org.apache.openmeetings.db.entity.file.FileItemLog in project openmeetings by apache.
the class FileItemLogDao method add.
public FileItemLog add(String name, BaseFileItem f, ProcessResult r) {
log.trace("Adding log: {}, {}, {}", name, f, r);
FileItemLog l = new FileItemLog().setInserted(new Date()).setExitCode(r.getExitCode()).setFileId(f.getId()).setMessage(r.buildLogMessage()).setName(name).setOptional(r.isOptional());
em.persist(l);
return l;
}
Aggregations