use of org.folio.circulation.domain.representations.logs.NoticeLogContextItem in project mod-circulation by folio-org.
the class FeeFineScheduledNoticeHandler method buildNoticeLogContext.
@Override
protected NoticeLogContext buildNoticeLogContext(ScheduledNoticeContext context) {
Loan loan = context.getLoan();
ScheduledNotice notice = context.getNotice();
NoticeLogContextItem logContextItem = NoticeLogContextItem.from(loan).withTemplateId(notice.getConfiguration().getTemplateId()).withTriggeringEvent(notice.getTriggeringEvent().getRepresentation()).withNoticePolicyId(context.getPatronNoticePolicyId());
return new NoticeLogContext().withUser(loan.getUser()).withAccountId(context.getAccount().getId()).withItems(singletonList(logContextItem));
}
use of org.folio.circulation.domain.representations.logs.NoticeLogContextItem in project mod-circulation by folio-org.
the class RequestScheduledNoticeHandler method buildNoticeLogContext.
@Override
protected NoticeLogContext buildNoticeLogContext(ScheduledNoticeContext context) {
ScheduledNotice notice = context.getNotice();
Request request = context.getRequest();
NoticeLogContextItem logContextItem = NoticeLogContextItem.from(request).withTemplateId(notice.getConfiguration().getTemplateId()).withTriggeringEvent(notice.getTriggeringEvent().getRepresentation()).withNoticePolicyId(context.getPatronNoticePolicyId());
return new NoticeLogContext().withUser(request.getRequester()).withRequestId(request.getId()).withItems(singletonList(logContextItem));
}
Aggregations