Class PortalMenuService
java.lang.Object
fr.paris.lutece.portal.service.portal.PortalMenuService
This Service build the portal menu
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final int -
Method Summary
Modifier and TypeMethodDescriptionstatic PortalMenuServiceDeprecated, for removal: This API element is subject to removal in a future version.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 itgetName()Returns the service namevoidinitializedService(jakarta.servlet.ServletContext context) This method observes the initialization of theApplicationScopedcontext.voidprocessPageEvent(PageEvent event) Process a page event
-
Field Details
-
MENU_INIT
public static final int MENU_INIT- See Also:
-
MENU_MAIN
public static final int MENU_MAIN- See Also:
-
MODE_NORMAL
public static final int MODE_NORMAL- See Also:
-
MODE_ADMIN
public static final int MODE_ADMIN- See Also:
-
-
Method Details
-
getInstance
Deprecated, for removal: This API element is subject to removal in a future version.Use@Injectto obtain thePortalMenuServiceinstance. This method will be removed in future versions.Returns the unique instance of thePortalMenuServiceservice.This method is deprecated and is provided for backward compatibility only. For new code, use dependency injection with
@Injectto obtain thePortalMenuServiceinstance instead.- Returns:
- The unique instance of
PortalMenuService.
-
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 requestnMode- The selected modenPart- The part of the menu to buildnCurrentPageId- The current page ID- Returns:
- The list of the menus layed out with the stylesheet correpsonding to the mode
-
processPageEvent
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 theApplicationScopedcontext. It ensures that this CDI beans are instantiated at the application startup.This method is triggered automatically by CDI when the
ApplicationScopedcontext is initialized, which typically occurs during the startup of the application server.- Parameters:
context- theServletContextthat is initialized. This parameter is observed and injected automatically by CDI when theApplicationScopedcontext is initialized.
-
@Injectto obtain thePortalMenuServiceinstance.