use of de.metas.ui.web.window.datatypes.json.JSONDocumentChangeLog in project metasfresh-webui-api by metasfresh.
the class WindowRestController method getDocumentChangeLog.
private JSONDocumentChangeLog getDocumentChangeLog(final DocumentPath documentPath) {
final TableRecordReference recordRef = documentCollection.getTableRecordReference(documentPath);
final JSONDocumentChangeLog json = documentChangeLogService.getJSONDocumentChangeLog(recordRef, userSession.getAD_Language());
json.setPath(JSONDocumentPath.ofWindowDocumentPath(documentPath));
return json;
}
use of de.metas.ui.web.window.datatypes.json.JSONDocumentChangeLog in project metasfresh-webui-api by metasfresh.
the class DocumentChangeLogService method toJson.
private JSONDocumentChangeLog toJson(RecordChangeLog changeLog, final String adLanguage) {
final JSONDocumentChangeLog json = new JSONDocumentChangeLog();
json.setCreatedByUsername(usersRepo.retrieveUserFullname(changeLog.getCreatedByUserId()));
json.setLastChangedByUsername(usersRepo.retrieveUserFullname(changeLog.getLastChangedByUserId()));
final ZonedDateTime created = TimeUtil.asZonedDateTime(changeLog.getCreatedTimestamp());
json.setCreatedTimestamp(formatTimestamp(created, adLanguage));
final ZonedDateTime updated = TimeUtil.asZonedDateTime(changeLog.getLastChangedTimestamp());
json.setLastChangedTimestamp(formatTimestamp(updated, adLanguage));
return json;
}
Aggregations