Package org.kuali.rice.krad.service
Interface NoteService
public interface NoteService
This service provides various operations related to
Note objects.- Author:
- Kuali Rice Team (rice.collab@kuali.org)
-
Method Summary
Modifier and TypeMethodDescriptioncreateNote(Note noteToCopy, GloballyUnique bo, String authorPrincipalId) Creates a new note which is a copy of the given note and is associated with the specified PersistableBusinessObject and Person.voiddeleteNote(Note note) Deletes the specified note.getByRemoteObjectId(String remoteObjectId) Retrieves a list of notes that are associated with the given object id.getNoteByNoteId(Long noteId) Retrieves the note with the given id.Saves the specified note.saveNoteList(List<Note> notes) Saves the given lists of notes.
-
Method Details
-
getByRemoteObjectId
Retrieves a list of notes that are associated with the given object id. This object id will generally be the object id of thethat the note was attached to when it was created.invalid reference
org.kuali.rice.krad.bo.PersistableBusinessObject- Parameters:
remoteObjectId- the object id that the notes being searched for are associated with- Returns:
- the list of notes which are associated with the given object id. If no such notes are found, an empty list will be returned.
-
getNoteByNoteId
Retrieves the note with the given id.- Parameters:
noteId- the note id to search by- Returns:
- the note with the given note id, or null if no note is found
- Throws:
IllegalArgumentException- if the specified id is null
-
saveNoteList
Saves the given lists of notes. If the given list is null or empty, this method will do nothing.- Parameters:
notes- the list of notes to save- Throws:
IllegalStateException- if any of the notes in the list have an invalid remoteObjectId
-
save
Saves the specified note. This method returns a reference to the note that was saved. Callers of this method should reassign their reference to the note passed in with the one that is returned.- Parameters:
note- the note to save- Returns:
- the saved note
- Throws:
IllegalArgumentException- if the specified note is nullIllegalStateException- if the given note's remoteObjectId is not valid
-
deleteNote
Deletes the specified note.- Parameters:
note- the note to delete- Throws:
IllegalArgumentException- if the given note is null
-
createNote
Creates a new note which is a copy of the given note and is associated with the specified PersistableBusinessObject and Person.- Parameters:
noteToCopy- the note to copybo- the business object to associate the Note with- Returns:
- a copy of the given note which
-