Class HeadlessNavigationService

java.lang.Object
sk.iway.iwcm.headless.service.HeadlessNavigationService

@Service public class HeadlessNavigationService extends Object
Service for building navigation trees from the WebJET CMS group structure.
  • Constructor Details

    • HeadlessNavigationService

      public HeadlessNavigationService()
  • Method Details

    • isGroupOnCurrentDomain

      public static boolean isGroupOnCurrentDomain(int groupId)
      Checks whether a group belongs to the current domain.
      Parameters:
      groupId - the group ID to validate
      Returns:
      true when the group belongs to the current domain
    • buildNavigation

      public List<NavigationItem> buildNavigation(String rootPath, int startGroupId, int depth, String lng, jakarta.servlet.http.HttpSession session)
      Builds a navigation tree from a given root group or path. Uses GroupsDB.getGroups() recursively (similar to MenuULLI.doTree).
      Parameters:
      rootPath - virtual path of the root group (e.g., "/" for root)
      startGroupId - group ID to start from (alternative to rootPath)
      depth - maximum depth to traverse (0 = unlimited)
      lng - optional language override
      session - HTTP session for user context
      Returns:
      list of top-level navigation items with children