Class MyDashboardService
java.lang.Object
fr.paris.lutece.plugins.mydashboard.service.MyDashboardService
Dashboard Service
-
Method Summary
Modifier and TypeMethodDescriptionvoiddeleteConfigByUser(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 anygetDashboardComponentListFromUser(fr.paris.lutece.portal.service.security.LuteceUser user) Get the list of dash boards components associated with a given configuration id.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 componentsstatic MyDashboardServiceReturn the unique instancegetMyDashboardComponentsList(fr.paris.lutece.portal.service.security.LuteceUser user) Get the list of MyDashboardComponent that are available for a given usergetMyDashboardComponentsList(fr.paris.lutece.portal.service.security.LuteceUser user, Panel panel) Get the list of MyDashboardComponent that are available for a given userfr.paris.lutece.util.ReferenceListget ReferenceList containing all Dashboard componentsgetUserConfig(fr.paris.lutece.portal.service.security.LuteceUser user) Get the list of MyDashboardConfiguration associated with a given usergetUserConfigId(fr.paris.lutece.portal.service.security.LuteceUser user) Get the id of the dashboard configuration associated with a userbooleanvoidupdateConfig(MyDashboardConfiguration myDashboardsConfig, boolean bCleanCache) Update a dashboard configurationvoidupdateConfigList(List<MyDashboardConfiguration> listMyDashboardsConfig) Update a list of configuration
-
Method Details
-
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
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 userpanel- the panel- Returns:
- The list of MyDashboard components
-
getUserConfigId
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 ofpanel- 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
Update a dashboard configuration- Parameters:
myDashboardsConfig- The configuration to updatebCleanCache- True to update the dashboard configuration cache, false otherwise
-
updateConfigList
Update a list of configuration- Parameters:
listMyDashboardsConfig- The list of configuration to update
-