fr.paris.lutece.portal.service.portal
Class PortalMenuService

java.lang.Object
  extended by fr.paris.lutece.portal.service.portal.PortalMenuService
All Implemented Interfaces:
CacheableService, LuteceService

public final class PortalMenuService
extends java.lang.Object
implements CacheableService

This Service build the portal menu


Field Summary
static int MENU_INIT
           
static int MENU_MAIN
           
static int MODE_ADMIN
           
static int MODE_NORMAL
           
 
Method Summary
 int getCacheSize()
          Returns the number of objects handled by the cache
static PortalMenuService getInstance()
          Get the unique instance of the service
 java.lang.String getMenuContent(int nCurrentPageId, int nMode, int nPart, javax.servlet.http.HttpServletRequest request)
          Returns the menu bar from the cache or builds it if it not stored in it
 java.lang.String getName()
          Returns the service name
 boolean isCacheEnable()
          Returns the cache status : enable or disable
 void resetCache()
          Clear the cache
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MENU_INIT

public static final int MENU_INIT
See Also:
Constant Field Values

MENU_MAIN

public static final int MENU_MAIN
See Also:
Constant Field Values

MODE_NORMAL

public static final int MODE_NORMAL
See Also:
Constant Field Values

MODE_ADMIN

public static final int MODE_ADMIN
See Also:
Constant Field Values
Method Detail

getInstance

public static PortalMenuService getInstance()
Get the unique instance of the service

Returns:
The unique instance

isCacheEnable

public boolean isCacheEnable()
Returns the cache status : enable or disable

Specified by:
isCacheEnable in interface CacheableService
Returns:
True if the cache is enable, otherwise false

getCacheSize

public int getCacheSize()
Returns the number of objects handled by the cache

Specified by:
getCacheSize in interface CacheableService
Returns:
the number of objects handled by the cache

resetCache

public void resetCache()
Clear the cache

Specified by:
resetCache in interface CacheableService

getName

public java.lang.String getName()
Returns the service name

Specified by:
getName in interface LuteceService
Returns:
The service name

getMenuContent

public java.lang.String getMenuContent(int nCurrentPageId,
                                       int nMode,
                                       int nPart,
                                       javax.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


Copyright © 2010 Mairie de Paris. All Rights Reserved.