public void init( String name, GroupOrganizer organizer, List<String> oldSubFolders, List<Group> groups) { this.setDisplayName(name); this.organizer = organizer; this.subFolders = new ArrayList<String>(oldSubFolders); if (name.length() > 0) { this.subFolders.add(name); } structure = organizer.organize(subFolders, groups); assert structure != null; children.addNotify(); }
private FolderNode( String name, GroupOrganizer organizer, List<String> oldSubFolders, final List<Group> groups, FolderChildren children, InstanceContent content) { super(children, new AbstractLookup(content)); children.setParent(this); this.content = content; this.children = children; content.add( new RemoveCookie() { public void remove() { for (Group g : groups) { if (g.getDocument() != null) { g.getDocument().removeGroup(g); } } } }); init(name, organizer, oldSubFolders, groups); }