Package com.priint.pubserverapi.note
Interface NoteServiceLocal
public interface NoteServiceLocal
Local interface for managing notes.
This service provides methods for creating, retrieving, updating, and deleting notes.
All operations may throw NoteServiceException if an error occurs
during processing.
-
Method Summary
Modifier and TypeMethodDescriptionCreates a new notecreateComment(NoteId noteId, NoteComment noteComment) Creates a new comment for a noteCreates a newNoteQueryfor querying notes.voidDeletes an existing note by its idvoidDeletes existing notes by their idvoiddeleteComment(NoteCommentId noteCommentId) Delete a note comment (Only the last, added by yourself).getNoteById(NoteId noteId) Retrieves aNoteby note idvoidUpdates an existing notevoidUpdates existing notesvoidupdateComment(NoteComment noteComment) Update a note comment (Only the last, added by yourself).
-
Method Details
-
createNoteQuery
NoteQuery createNoteQuery()Creates a newNoteQueryfor querying notes.- Returns:
- a new
NoteQueryinstance
-
getNoteById
Retrieves aNoteby note id- Parameters:
noteId- note id- Returns:
- an
Optionalcontaining the note if found, or empty if not
-
create
Creates a new note- Parameters:
note- the note to create- Returns:
- note id
- Throws:
NoteServiceException
-
update
Updates an existing note- Parameters:
note- the note to update- Throws:
NoteServiceException
-
update
Updates existing notes- Parameters:
notes- list of the notes to update- Throws:
NoteServiceException
-
delete
Deletes an existing note by its id- Parameters:
noteId- note id- Throws:
NoteServiceException
-
delete
Deletes existing notes by their id- Parameters:
noteId- note id- Throws:
NoteServiceException
-
createComment
Creates a new comment for a note- Parameters:
noteId- the note idnoteComment- a note comment to create- Returns:
- note comment id
- Throws:
NoteServiceException
-
updateComment
Update a note comment (Only the last, added by yourself).- Parameters:
noteComment- a note comment to update- Throws:
NoteServiceException
-
deleteComment
Delete a note comment (Only the last, added by yourself).- Parameters:
noteCommentId- a note comment id- Throws:
NoteServiceException
-