org.kuali.rice.krad.service
Interface NoteService

All Known Implementing Classes:
NoteServiceImpl

public interface NoteService

This service provides various operations related to Note objects.

Author:
Kuali Rice Team (rice.collab@kuali.org)

Method Summary
 Note createNote(Note noteToCopy, PersistableBusinessObject bo, String authorPrincipalId)
          Creates a new note which is a copy of the given note and is associated with the specified PersistableBusinessObject and Person.
 void deleteNote(Note note)
          Deletes the specified note.
 List<Note> getByRemoteObjectId(String remoteObjectId)
          Retrieves a list of notes that are associated with the given object id.
 Note getNoteByNoteId(Long noteId)
          Retrieves the note with the given id.
 Note save(Note note)
          Saves the specified note.
 void saveNoteList(List<Note> notes)
          Saves the given lists of notes.
 

Method Detail

getByRemoteObjectId

List<Note> getByRemoteObjectId(String remoteObjectId)
Retrieves a list of notes that are associated with the given object id. This object id will generally be the object id of the PersistableBusinessObject that the note was attached to when it was created.

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

Note getNoteByNoteId(Long noteId)
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

void saveNoteList(List<Note> notes)
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

Note save(Note note)
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 null
IllegalStateException - if the given note's remoteObjectId is not valid

deleteNote

void deleteNote(Note note)
Deletes the specified note.

Parameters:
note - the note to delete
Throws:
IllegalArgumentException - if the given note is null

createNote

Note createNote(Note noteToCopy,
                PersistableBusinessObject bo,
                String authorPrincipalId)
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 copy
bo - the business object to associate the Note with
Returns:
a copy of the given note which


Copyright © 2005-2012 The Kuali Foundation. All Rights Reserved.