Пример #1
0
  private void refresh() {
    this.evict();
    this.needRefresh = Boolean.FALSE;

    FormationCompositeDomain rootDomain = repository.findRoot();
    if (rootDomain == null) {
      return;
    }
    FormationComposite rootModel = rootDomain.toModel();
    this.rootId = rootModel.getId();
    this.components.put(rootModel.getId(), rootModel);
    this.visitor.crawlFromRoot(rootModel);
  }
Пример #2
0
 final void crawlFromRoot(FormationComposite root) {
   for (FormationComponent component : root.getFormations()) {
     if (component.isLeaf()) {
       this.onLeafFound((FormationLeaf) component);
     } else {
       FormationComposite composite = (FormationComposite) component;
       this.onCompositeFound(composite);
       this.crawlFromRoot(composite);
     }
   }
 }