@Test public void addNoteTest() { Note note4 = new Note(repo, interpreterFactory, interpreterSettingManager, jobListenerFactory, index, credentials, noteEventListener); note4.setName("this/is/a/folder/note4"); folder.addNote(note4); assert (folder.getNotes().contains(note4)); }
public void addNote(Note note) { logger.info("Add note {} to folder {}", note.getId(), getId()); synchronized (notes) { notes.put(note.getId(), note); } }
Folder { public void addNote(Note note) { logger.info("Add note {} to folder {}", note.getId(), getId()); synchronized (notes) { notes.put(note.getId(), note); } } }
Folder { public void addNote(Note note) { logger.info("Add note {} to folder {}", note.getId(), getId()); synchronized (notes) { notes.put(note.getId(), note); } } Folder(String id); }
Folder { public void addNote(Note note) { logger.info("Add note {} to folder {}", note.getId(), getId()); synchronized (notes) { notes.put(note.getId(), note); } } Folder(String id); String getId(); String getName(); String getParentFolderId(); static String normalizeFolderId(String id); void rename(String newId); void merge(Folder folder); void addFolderListener(FolderListener listener); void notifyRenamed(String oldFolderId); Folder getParent(); Map<String, Folder> getChildren(); void setParent(Folder parent); void addChild(Folder child); void removeChild(String folderId); void addNote(Note note); void addNotes(List<Note> newNotes); void removeNote(Note note); List<Note> getNotes(); List<Note> getNotesRecursively(); int countNotes(); boolean hasChild(); boolean isTrash(); }
Folder { public void addNote(Note note) { logger.info("Add note {} to folder {}", note.getId(), getId()); synchronized (notes) { notes.put(note.getId(), note); } } Folder(String id); String getId(); String getName(); String getParentFolderId(); static String normalizeFolderId(String id); void rename(String newId); void merge(Folder folder); void addFolderListener(FolderListener listener); void notifyRenamed(String oldFolderId); Folder getParent(); Map<String, Folder> getChildren(); void setParent(Folder parent); void addChild(Folder child); void removeChild(String folderId); void addNote(Note note); void addNotes(List<Note> newNotes); void removeNote(Note note); List<Note> getNotes(); List<Note> getNotesRecursively(); int countNotes(); boolean hasChild(); boolean isTrash(); static final String ROOT_FOLDER_ID; static final String TRASH_FOLDER_ID; static final String TRASH_FOLDER_CONFLICT_INFIX; }