app / me.argraur.notes.helpers / NoteManager

NoteManager

class NoteManager : NoteObserverManager, NoteActionObserver

Manages Notes and NoteObservers

Constructors

<init>

Creates empty NoteManager object, updates notes and notifies observers

NoteManager(context: Context)

Functions

getNotes

Retrieves all notes from database Creates array of Note types based on title, value, color and creation time If current notes array doesn't match new one, update current and notify observers

fun getNotes(): Unit

notifyObserver

fun notifyObserver(): Unit

onAction

Called when action request was created

fun onAction(note: Note, action: Action): Unit

registerObserver

fun registerObserver(observer: NoteObserver): Unit

removeObserver

fun removeObserver(observer: NoteObserver): Unit

Companion Object Functions

getInstance

Creates one and only instance of NoteManager

fun getInstance(context: Context?): NoteManager