fr.paris.lutece.plugins.mydashboard.service
Class MyDashboardService

java.lang.Object
  extended by fr.paris.lutece.plugins.mydashboard.service.MyDashboardService

public final class MyDashboardService
extends Object

Dashboard Service


Method Summary
 void deleteConfigByUser(fr.paris.lutece.portal.service.security.LuteceUser user)
          Delete a user configuration from its user, and reset the list of configurations saved in session if any
 List<IMyDashboardComponent> getDashboardComponentListFromUser(fr.paris.lutece.portal.service.security.LuteceUser user)
          Get the list of dash boards components associated with a given configuration id.
static MyDashboardService getInstance()
          Return the unique instance
 List<IMyDashboardComponent> getMyDashboardComponentsList(fr.paris.lutece.portal.service.security.LuteceUser user)
          Get the list of MyDashboardComponent that are available for a given user
 List<MyDashboardConfiguration> getUserConfig(fr.paris.lutece.portal.service.security.LuteceUser user)
          Get the list of MyDashboardConfiguration associated with a given user
 String getUserConfigId(fr.paris.lutece.portal.service.security.LuteceUser user)
          Get the id of the dashboard configuration associated with a user
 void updateConfig(MyDashboardConfiguration myDashboardsConfig, boolean bCleanCache)
          Update a dashboard configuration
 void updateConfigList(List<MyDashboardConfiguration> listMyDashboardsConfig)
          Update a list of configuration
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static MyDashboardService getInstance()
Return the unique instance

Returns:
The instance

getMyDashboardComponentsList

public List<IMyDashboardComponent> getMyDashboardComponentsList(fr.paris.lutece.portal.service.security.LuteceUser user)
Get the list of MyDashboardComponent that are available for a given user

Parameters:
user - The user
Returns:
The list of MyDashboard components

getUserConfigId

public String getUserConfigId(fr.paris.lutece.portal.service.security.LuteceUser user)
Get the id of the dashboard configuration associated with a user

Parameters:
user - The user to get the id of the dashboard configuration of
Returns:
The id of the dashboard configuration

getUserConfig

public List<MyDashboardConfiguration> getUserConfig(fr.paris.lutece.portal.service.security.LuteceUser user)
Get the list of MyDashboardConfiguration associated with a given user

Parameters:
user - The user to get the configurations of
Returns:
The list of MyDashboardConfiguration. Note that the returned list is saved in the session if this is a request context

getDashboardComponentListFromUser

public List<IMyDashboardComponent> getDashboardComponentListFromUser(fr.paris.lutece.portal.service.security.LuteceUser user)
Get the list of dash boards components associated with a given configuration id. The list is sorted with the order of each component in the configuration, and contains only enabled and displayed components

Parameters:
user - The user to get the dash board components of
Returns:
The list of dash boards components

deleteConfigByUser

public void deleteConfigByUser(fr.paris.lutece.portal.service.security.LuteceUser user)
Delete a user configuration from its user, and reset the list of configurations saved in session if any

Parameters:
user - The user to remove the configuration of

updateConfig

public void updateConfig(MyDashboardConfiguration myDashboardsConfig,
                         boolean bCleanCache)
Update a dashboard configuration

Parameters:
myDashboardsConfig - The configuration to update
bCleanCache - True to update the dashboard configuration cache, false otherwise

updateConfigList

public void updateConfigList(List<MyDashboardConfiguration> listMyDashboardsConfig)
Update a list of configuration

Parameters:
listMyDashboardsConfig - The list of configuration to update


Copyright © 2014 Mairie de Paris. All Rights Reserved.