public Note setNote( final Note newNote ) {
		if( null == newNote ) {
			return null;
		}

		final long noteId = newNote.getId();
		final Note oldNote = notes.put( noteId, newNote );

		if( null == oldNote ) {
			notifyNotesChangedListeners();
		}

		if( !newNote.equals( oldNote ) ) {
			notifyNoteChangedListeners( newNote );
		}

		return oldNote;
	}