Search in sources :

Example 1 with FileItemLog

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);
}
Also used : BaseFileItem(org.apache.openmeetings.db.entity.file.BaseFileItem) FileItemLog(org.apache.openmeetings.db.entity.file.FileItemLog)

Example 2 with FileItemLog

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;
}
Also used : FileItemLog(org.apache.openmeetings.db.entity.file.FileItemLog) Date(java.util.Date)

Aggregations

FileItemLog (org.apache.openmeetings.db.entity.file.FileItemLog)2 Date (java.util.Date)1 BaseFileItem (org.apache.openmeetings.db.entity.file.BaseFileItem)1