use of org.kuali.kfs.krad.bo.Note in project cu-kfs by CU-CommunityApps.
the class PayeeACHAccountExtractServiceImpl method addNote.
/*
* Copied this method from VendorBatchServiceImpl and tweaked accordingly.
*/
protected void addNote(Document document, String noteText) {
Note note = createEmptyNote();
note.setNoteText(noteText);
note.setRemoteObjectIdentifier(document.getObjectId());
note.setAuthorUniversalIdentifier(getSystemUser().getPrincipalId());
note.setNoteTypeCode(KFSConstants.NoteTypeEnum.BUSINESS_OBJECT_NOTE_TYPE.getCode());
note.setNotePostedTimestampToCurrent();
document.addNote(note);
}
use of org.kuali.kfs.krad.bo.Note in project cu-kfs by CU-CommunityApps.
the class PaymentWorksBatchUtilityServiceImpl method createNoteRecordingAnyErrors.
@Override
public KfsVendorDataWrapper createNoteRecordingAnyErrors(KfsVendorDataWrapper kfsVendorDataWrapper, String noteText, String noteErrorDescriptor) {
if (noteTextSizeIsWithinLimit(noteText)) {
Note note = createNote(noteText);
kfsVendorDataWrapper.getVendorNotes().add(note);
} else {
LOG.error("createNoteRecordingAnyErrors: The " + noteErrorDescriptor + " Note contained " + noteText.length() + "characters and it can only have " + PaymentWorksConstants.NOTE_TEXT_DEFAULT_MAX_LENGTH);
}
return kfsVendorDataWrapper;
}
use of org.kuali.kfs.krad.bo.Note in project cu-kfs by CU-CommunityApps.
the class PaymentWorksBatchUtilityServiceImpl method createNote.
private Note createNote(String noteText) {
Note newNote = new Note();
newNote.setNoteText(noteText);
newNote.setAuthorUniversalIdentifier(getSystemUser().getPrincipalId());
newNote.setNoteTypeCode(KFSConstants.NoteTypeEnum.BUSINESS_OBJECT_NOTE_TYPE.getCode());
newNote.setNotePostedTimestampToCurrent();
return newNote;
}
use of org.kuali.kfs.krad.bo.Note in project cu-kfs by CU-CommunityApps.
the class MockDocumentUtils method buildMockNote.
public static Note buildMockNote() {
Note note = EasyMock.partialMockBuilder(Note.class).addMockedMethod("setNotePostedTimestampToCurrent").createNiceMock();
note.setNotePostedTimestampToCurrent();
EasyMock.expectLastCall().anyTimes();
EasyMock.replay(note);
return note;
}
use of org.kuali.kfs.krad.bo.Note in project cu-kfs by CU-CommunityApps.
the class MockDocumentUtils method buildMockNote.
public static Note buildMockNote(String noteText) {
Note note = buildMockNote();
note.setNoteText(noteText);
return note;
}
Aggregations