Class MainTreeMenuAllPagesService
java.lang.Object
fr.paris.lutece.plugins.menus.service.MainTreeMenuAllPagesService
MainTreeMenuAllPagesService
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the cacheServicestatic MainTreeMenuAllPagesServiceDeprecated, for removal: This API element is subject to removal in a future version.Return the root MenuItemintgetRootParentTree(int nPageId) Define the root tree id of a pagegetTreeMenuItems(int nCurrentPageId) Return the TreeMenuItems from root MenuItemvoidinitializedService(jakarta.servlet.ServletContext context) This method observes the initialization of theApplicationScopedcontext.Return if cacheService is instancied and enable
-
Field Details
-
PROPERTY_DEPTH_MAIN_LEVEL_ALLPAGES
- See Also:
-
PROPERTY_DEPTH_TREE_LEVEL_ALLPAGES
- See Also:
-
-
Constructor Details
-
MainTreeMenuAllPagesService
public MainTreeMenuAllPagesService()
-
-
Method Details
-
getInstance
Deprecated, for removal: This API element is subject to removal in a future version.Use@Injectto obtain theMainTreeMenuAllPagesServiceinstance. This method will be removed in future versions.Returns the unique instance of theMainTreeMenuAllPagesServiceservice.This method is deprecated and is provided for backward compatibility only. For new code, use dependency injection with
@Injectto obtain theMainTreeMenuAllPagesServiceinstance instead.- Returns:
- The unique instance of
MainTreeMenuAllPagesService.
-
getMainMenuItems
Return the root MenuItem- Returns:
- the root MenuItem
-
getTreeMenuItems
Return the TreeMenuItems from root MenuItem- Parameters:
nCurrentPageId- The current page id- Returns:
- the TreeMenuItems from root MenuItem
-
getRootParentTree
public int getRootParentTree(int nPageId) Define the root tree id of a page- Parameters:
nPageId- The page identifier- Returns:
- The parent page identifier or root tree
-
getFullTreeMenuItems
- Returns:
- MenuItem root of tree
-
getCacheService
Get the cacheService- Returns:
- the MainTreeMenuAllPagesCacheService
-
isMainTreeCacheServiceEnable
Return if cacheService is instancied and enable- Returns:
- true if cacheService is instancied and enable, false otherwise
-
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 theMainTreeMenuAllPagesServiceinstance.