Search in sources :

Example 56 with Note

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);
}
Also used : Note(org.kuali.kfs.krad.bo.Note)

Example 57 with 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;
}
Also used : Note(org.kuali.kfs.krad.bo.Note)

Example 58 with Note

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;
}
Also used : Note(org.kuali.kfs.krad.bo.Note)

Example 59 with 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() {
    Note note = EasyMock.partialMockBuilder(Note.class).addMockedMethod("setNotePostedTimestampToCurrent").createNiceMock();
    note.setNotePostedTimestampToCurrent();
    EasyMock.expectLastCall().anyTimes();
    EasyMock.replay(note);
    return note;
}
Also used : Note(org.kuali.kfs.krad.bo.Note)

Example 60 with 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;
}
Also used : Note(org.kuali.kfs.krad.bo.Note)

Aggregations

Note (org.kuali.kfs.krad.bo.Note)76 Attachment (org.kuali.kfs.krad.bo.Attachment)14 WorkflowException (org.kuali.rice.kew.api.exception.WorkflowException)12 IOException (java.io.IOException)9 FileNotFoundException (java.io.FileNotFoundException)7 ArrayList (java.util.ArrayList)7 NoteService (org.kuali.kfs.krad.service.NoteService)7 FileInputStream (java.io.FileInputStream)6 KualiDocumentFormBase (org.kuali.kfs.kns.web.struts.form.KualiDocumentFormBase)6 NonTransactional (org.kuali.kfs.sys.service.NonTransactional)6 File (java.io.File)5 Iterator (java.util.Iterator)5 DocumentService (org.kuali.kfs.krad.service.DocumentService)5 Person (org.kuali.rice.kim.api.identity.Person)5 NoteExtendedAttribute (edu.cornell.kfs.sys.businessobject.NoteExtendedAttribute)4 SimpleDateFormat (java.text.SimpleDateFormat)4 Document (org.kuali.kfs.krad.document.Document)4 PurchaseOrderDocument (org.kuali.kfs.module.purap.document.PurchaseOrderDocument)4 HashMap (java.util.HashMap)3 List (java.util.List)3