Class MyDashboardService

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

public final class MyDashboardService extends Object
Dashboard Service
  • Method Details

    • 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
    • getMyDashboardComponentsRefList

      public fr.paris.lutece.util.ReferenceList getMyDashboardComponentsRefList(Locale locale)
      get ReferenceList containing all Dashboard components
      Returns:
      a ReferenceList containing All Dashboard components
    • getMyDashboardComponentsList

      public List<IMyDashboardComponent> getMyDashboardComponentsList(fr.paris.lutece.portal.service.security.LuteceUser user, Panel panel)
      Get the list of MyDashboardComponent that are available for a given user
      Parameters:
      user - The user
      panel - the panel
      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
    • isPanelEnabled

      public boolean isPanelEnabled()
    • 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
    • getDashboardComponentListFromUser

      public List<IMyDashboardComponent> getDashboardComponentListFromUser(fr.paris.lutece.portal.service.security.LuteceUser user, Panel panel)
      Get the list of dash boards components associated with a given configuration id filtered by panel 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
      panel - The panel
      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