Class NavigationOrphanRemover

java.lang.Object
org.exoplatform.portal.mop.importer.NavigationOrphanRemover

public class NavigationOrphanRemover extends Object
Removes the nodes of a site navigation that none of the navigation configurations of the site defines, as the import mode removes orphan nodes: every node with ImportMode.OVERWRITE, the nodes nested in a default node with ImportMode.RESTORE_DEFAULTS. The configurations are imported first without removing any node, so that a configuration doesn't remove the nodes another configuration of the site defines. As the import of a fragment, the removal keeps the child nodes of a node that is only in the path of a fragment attachment point.
  • Constructor Summary

    Constructors
    Constructor
    Description
    NavigationOrphanRemover(org.exoplatform.portal.mop.service.NavigationService navigationService, List<org.exoplatform.portal.config.model.PageNavigation> navigations, org.exoplatform.portal.mop.importer.ImportMode importMode)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    static boolean
    removesOrphans(org.exoplatform.portal.mop.importer.ImportMode importMode)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • NavigationOrphanRemover

      public NavigationOrphanRemover(org.exoplatform.portal.mop.service.NavigationService navigationService, List<org.exoplatform.portal.config.model.PageNavigation> navigations, org.exoplatform.portal.mop.importer.ImportMode importMode)
      Parameters:
      navigationService - the navigation service
      navigations - the navigation configurations of one site
      importMode - the import mode requested for the site
  • Method Details

    • removesOrphans

      public static boolean removesOrphans(org.exoplatform.portal.mop.importer.ImportMode importMode)
      Parameters:
      importMode - an import mode
      Returns:
      true when the import mode removes the orphan nodes of a navigation
    • perform

      public void perform()