@Test public void removeExtensionPage() { this.tree.removeExtensionPage(this.carol); assertEquals(new HashSet<>(Arrays.asList(this.carol, this.users)), this.tree.getChildren(carol.getWikiReference())); this.tree.removeExtensionPage(this.john); assertEquals(Collections.singleton(this.users), this.tree.getChildren(this.carol.getWikiReference())); }
protected void removeExtensionPage(DocumentReference documentReference) { InstalledExtensionDocumentTreeNode node = this.nodes.get(documentReference); if (node != null) { if (node.children.isEmpty()) { removeNode(documentReference); } else { node.customizedLocales = null; } } }
InstalledExtensionDocumentTree { protected void removeExtensionPage(DocumentReference documentReference) { InstalledExtensionDocumentTreeNode node = this.nodes.get(documentReference); if (node != null) { if (node.children.isEmpty()) { removeNode(documentReference); } else { node.customizedLocales = null; } } } }
InstalledExtensionDocumentTree { protected void removeExtensionPage(DocumentReference documentReference) { InstalledExtensionDocumentTreeNode node = this.nodes.get(documentReference); if (node != null) { if (node.children.isEmpty()) { removeNode(documentReference); } else { node.customizedLocales = null; } } }  }
InstalledExtensionDocumentTree { protected void removeExtensionPage(DocumentReference documentReference) { InstalledExtensionDocumentTreeNode node = this.nodes.get(documentReference); if (node != null) { if (node.children.isEmpty()) { removeNode(documentReference); } else { node.customizedLocales = null; } } }  Set<DocumentReference> getChildren(EntityReference parentReference); boolean isExtensionPage(DocumentReference documentReference); boolean isCustomizedExtensionPage(DocumentReference documentReference); Set<DocumentReference> getNestedExtensionPages(EntityReference rootReference); Set<DocumentReference> getNestedCustomizedExtensionPages(EntityReference rootReference); }
InstalledExtensionDocumentTree { protected void removeExtensionPage(DocumentReference documentReference) { InstalledExtensionDocumentTreeNode node = this.nodes.get(documentReference); if (node != null) { if (node.children.isEmpty()) { removeNode(documentReference); } else { node.customizedLocales = null; } } }  Set<DocumentReference> getChildren(EntityReference parentReference); boolean isExtensionPage(DocumentReference documentReference); boolean isCustomizedExtensionPage(DocumentReference documentReference); Set<DocumentReference> getNestedExtensionPages(EntityReference rootReference); Set<DocumentReference> getNestedCustomizedExtensionPages(EntityReference rootReference);  }