Class MenusService
java.lang.Object
fr.paris.lutece.plugins.menus.service.MenusService
This Service manages contactListt actions (create, delete, modify ...) and
notify listeners.
- Author:
- lenaini
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic MenusServiceDeprecated, for removal: This API element is subject to removal in a future version.getSitePath(int nMode) Define the site path : Portal Url when mode isn't admin mode, otherwise AdminPortalUrlvoidinit()Initializes the Menus service This method is called automatically after CDI instantiationvoidinitializedService(jakarta.servlet.ServletContext context) This method observes the initialization of theApplicationScopedcontext.
-
Field Details
-
MODE_SITE
public static final int MODE_SITE- See Also:
-
MODE_ADMIN
public static final int MODE_ADMIN- See Also:
-
MARKER_SITE_PATH
- See Also:
-
-
Constructor Details
-
MenusService
public MenusService()
-
-
Method Details
-
init
@PostConstruct public void init()Initializes the Menus service This method is called automatically after CDI instantiation -
getInstance
Deprecated, for removal: This API element is subject to removal in a future version.Use@Injectto obtain theMenusServiceinstance. This method will be removed in future versions.Returns the unique instance of theMenusServiceservice.This method is deprecated and is provided for backward compatibility only. For new code, use dependency injection with
@Injectto obtain theMenusServiceinstance instead.- Returns:
- The unique instance of
MenusService.
-
getSitePath
Define the site path : Portal Url when mode isn't admin mode, otherwise AdminPortalUrl- Parameters:
nMode- the mode define by the request- Returns:
- site path depending on the mode
-
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 theMenusServiceinstance.