Class PortalMenuService

java.lang.Object
fr.paris.lutece.portal.service.portal.PortalMenuService

@ApplicationScoped public class PortalMenuService extends Object
This Service build the portal menu
  • Field Details

  • Method Details

    • getInstance

      @Deprecated(since="8.0", forRemoval=true) public static PortalMenuService getInstance()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use @Inject to obtain the PortalMenuService instance. This method will be removed in future versions.
      Returns the unique instance of the PortalMenuService service.

      This method is deprecated and is provided for backward compatibility only. For new code, use dependency injection with @Inject to obtain the PortalMenuService instance instead.

      Returns:
      The unique instance of PortalMenuService.
    • getName

      public String getName()
      Returns the service name
      Returns:
      The service name
    • getMenuContent

      public String getMenuContent(int nCurrentPageId, int nMode, int nPart, jakarta.servlet.http.HttpServletRequest request)
      Returns the menu bar from the cache or builds it if it not stored in it
      Parameters:
      request - The HTTP request
      nMode - The selected mode
      nPart - The part of the menu to build
      nCurrentPageId - The current page ID
      Returns:
      The list of the menus layed out with the stylesheet correpsonding to the mode
    • processPageEvent

      public void processPageEvent(@Observes PageEvent event)
      Process a page event
      Parameters:
      event - The event to process
    • initializedService

      public void initializedService(@Observes @Initialized(jakarta.enterprise.context.ApplicationScoped.class) jakarta.servlet.ServletContext context)
      This method observes the initialization of the ApplicationScoped context. It ensures that this CDI beans are instantiated at the application startup.

      This method is triggered automatically by CDI when the ApplicationScoped context is initialized, which typically occurs during the startup of the application server.

      Parameters:
      context - the ServletContext that is initialized. This parameter is observed and injected automatically by CDI when the ApplicationScoped context is initialized.