Class DashboardService
- java.lang.Object
-
- fr.paris.lutece.portal.service.dashboard.DashboardService
-
public final class DashboardService extends Object
Dashboard Service
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddoMoveDashboard(IDashboardComponent dashboard, int nOldColumn, int nOldOrder, boolean bCreate)Moves the dashboard.voiddoReorderColumn(int nColumn)Reorders column's dashboardList<IDashboardComponent>getAllDashboardComponents()All known dashboards as declared in SpringContextMap<String,List<IDashboardComponent>>getAllSetDashboards(AdminUser user)Finds all dashboard with column and order set.intgetColumnCount()Returns the column count, withPROPERTY_COLUMN_COUNT.List<IDashboardComponent>getDashboardComponents(int nColumn)StringgetDashboardData(AdminUser user, int nZone, javax.servlet.http.HttpServletRequest request)Gets Data from all components of the zoneStringgetDashboardData(List<IDashboardComponent> listDashboards, AdminUser user, int nZone, javax.servlet.http.HttpServletRequest request)Gets Data from all components of the zoneList<IDashboardComponent>getDashboards(AdminUser user, javax.servlet.http.HttpServletRequest request)Get the list of dashboard from pluginsstatic DashboardServicegetInstance()Return the unique instanceReferenceListgetListAvailableColumns()Returns list with available columnReferenceListgetListAvailableOrders(int nColumn)Orders reference list for the given columnMap<String,ReferenceList>getMapAvailableOrders()Builds all refList order for all columnsList<IDashboardComponent>getNotSetDashboards()Returns all dashboards with no column/order setMap<String,Boolean>getOrderedColumnsStatus()Builds the map to with column id as key, andtrueas value if column is well ordered,falseotherwise.voidregisterDashboardComponent(DashboardComponentEntry entry, Plugin plugin)Register a Dashboard Component
-
-
-
Method Detail
-
getInstance
public static DashboardService getInstance()
Return the unique instance- Returns:
- The instance
-
getColumnCount
public int getColumnCount()
Returns the column count, withPROPERTY_COLUMN_COUNT. Default isCONSTANTE_DEFAULT_COLUMN_COUNT- Returns:
- the column count
-
getAllDashboardComponents
public List<IDashboardComponent> getAllDashboardComponents()
All known dashboards as declared in SpringContext- Returns:
- dashboards list
-
getDashboardComponents
public List<IDashboardComponent> getDashboardComponents(int nColumn)
- Parameters:
nColumn- the column id- Returns:
- all dashboards for this column
-
registerDashboardComponent
public void registerDashboardComponent(DashboardComponentEntry entry, Plugin plugin)
Register a Dashboard Component- Parameters:
entry- The DashboardComponent entry defined in the plugin's XML fileplugin- The plugin
-
doMoveDashboard
public void doMoveDashboard(IDashboardComponent dashboard, int nOldColumn, int nOldOrder, boolean bCreate)
Moves the dashboard.- Parameters:
dashboard- to move, with new valuesnOldColumn- previous column idnOldOrder- previous orderbCreate-trueif this is a new dashboard,falseotherwise.
-
getNotSetDashboards
public List<IDashboardComponent> getNotSetDashboards()
Returns all dashboards with no column/order set- Returns:
- all dashboards with no column/order set
-
getAllSetDashboards
public Map<String,List<IDashboardComponent>> getAllSetDashboards(AdminUser user)
Finds all dashboard with column and order set.- Parameters:
user- the current user- Returns:
- a map where key is the column id, and value is the column's dashboard list.
-
getDashboardData
public String getDashboardData(AdminUser user, int nZone, javax.servlet.http.HttpServletRequest request)
Gets Data from all components of the zone- Parameters:
user- The usernZone- The dasboard zonerequest- HttpServletRequest- Returns:
- Data of all components of the zone
-
getDashboards
public List<IDashboardComponent> getDashboards(AdminUser user, javax.servlet.http.HttpServletRequest request)
Get the list of dashboard from plugins- Parameters:
user- the current userrequest- HttpServletRequest- Returns:
- the list of dashboards
-
getDashboardData
public String getDashboardData(List<IDashboardComponent> listDashboards, AdminUser user, int nZone, javax.servlet.http.HttpServletRequest request)
Gets Data from all components of the zone- Parameters:
listDashboards- the list of dashboardsuser- The usernZone- The dasboard zonerequest- HttpServletRequest- Returns:
- Data of all components of the zone
-
doReorderColumn
public void doReorderColumn(int nColumn)
Reorders column's dashboard- Parameters:
nColumn- the column to reorder
-
getOrderedColumnsStatus
public Map<String,Boolean> getOrderedColumnsStatus()
Builds the map to with column id as key, andtrueas value if column is well ordered,falseotherwise.- Returns:
- the map
-
getListAvailableColumns
public ReferenceList getListAvailableColumns()
Returns list with available column- Returns:
- all available columns
-
getMapAvailableOrders
public Map<String,ReferenceList> getMapAvailableOrders()
Builds all refList order for all columns- Returns:
- the map with column id as key
-
getListAvailableOrders
public ReferenceList getListAvailableOrders(int nColumn)
Orders reference list for the given column- Parameters:
nColumn- column- Returns:
- the refList
-
-