Interface Navigation

All Superinterfaces:
HasViewTypeName, Linkable
All Known Subinterfaces:
CMChannel, CMContext, CMNavigation

public interface Navigation extends Linkable
Common methods implemented by navigation nodes, like CMNavigation. Navigation objects are Linkable too.
  • Method Details

    • getChildren

      List<? extends Linkable> getChildren()
      Returns the children of this navigation object. If no child exist, an empty list will be returned.
      Returns:
      a list of Linkable objects
    • getParentNavigation

      Navigation getParentNavigation()
      Returns the parent of this navigation instance.
    • getTheme

      CMTheme getTheme(@Nullable com.coremedia.cap.user.User developer)
      Returns the theme of this navigation instance or its parent.
      Parameters:
      developer - Use the developer's variant rather than the production theme.
      Returns:
      the theme of this navigation instance or its parent
    • getRootNavigation

      CMNavigation getRootNavigation()
      Returns the root Navigation object (=Site) for this navigation item. If isRoot() is true, getRootNavigation returns this.
      Returns:
      the root Navigation
    • getContext

      CMContext getContext()
      Return the first navigation context within the parent hierarchy which is an instance of CMContext
    • isHidden

      boolean isHidden()

      Use hidden in order to provide nice URLs for content which should not be reachable by navigation.

      Semantic: hidden implies hiddenInSitemap.

    • getVisibleChildren

      List<? extends Linkable> getVisibleChildren()

      Returns the children which are visible in navigational contexts.

      I.e. the same list as getChildren() except Navigation documents whose isHidden() flag is true.

      Returns:
      the children which are visible in navigational contexts.
    • isHiddenInSitemap

      boolean isHiddenInSitemap()

      Returns the value of the document is hidden in sidemap.

      Do not show this channel in a sitemap. We recommend to use this flag in exceptional cases only, because a sitemap is not very helpful if it differs too much from the actual navigation.

    • getSitemapChildren

      List<? extends Linkable> getSitemapChildren()

      Returns the children which are visible in sitemaps.

      Reasonable implementations will delegate to getVisibleChildren() and possibly filter the result. A list which is unrelated to getVisibleChildren() would be confusing.

      Returns:
      the children which are visible in sitemaps.
    • isRoot

      boolean isRoot()
      Returns:
      true if this navigation item has no parents.
    • getAspectsProvider

      com.coremedia.cae.aspect.provider.AspectsProvider getAspectsProvider()
    • getNavigationPathList

      List<? extends Linkable> getNavigationPathList()
      Returns the navigation path of this navigation from the root navigation to this navigation.
      Returns:
      the list of navigations forming the path to this Navigation including this.
    • getCodeResourcesTreeRelation

      com.coremedia.blueprint.base.tree.TreeRelation<com.coremedia.cap.content.Content> getCodeResourcesTreeRelation()
      Returns the tree relation for code resources lookup (themes, css, js).

      In the Blueprint, code resources are declared by channels (CMNavigation properties theme, css, javaScript). Since code resources may be inherited (for details see CodeResourcesCacheKey), we need a whole tree relation for the lookup, rather than a single CMNavigation content. In a plain Blueprint content world this tree relation will usually match getParentNavigation() and getChildren(), whose result beans have a 1:1 relation to content objects.

      Other implementations of Navigation must provide an arbitrary content based tree relation that enables us to lookup code resources to associate with a Navigation instance.