public final class DashboardService extends Object
Modifier and Type | Method and Description |
---|---|
void |
doMoveDashboard(IDashboardComponent dashboard,
int nOldColumn,
int nOldOrder,
boolean bCreate)
Moves the dashboard.
|
void |
doReorderColumn(int nColumn)
Reorders column's dashboard
|
List<IDashboardComponent> |
getAllDashboardComponents()
All known dashboards as declared in SpringContext
|
Map<String,List<IDashboardComponent>> |
getAllSetDashboards(AdminUser user)
Finds all dashboard with column and order set.
|
int |
getColumnCount()
Returns the column count, with
PROPERTY_COLUMN_COUNT . |
List<IDashboardComponent> |
getDashboardComponents(int nColumn) |
String |
getDashboardData(AdminUser user,
int nZone,
javax.servlet.http.HttpServletRequest request)
Gets Data from all components of the zone
|
String |
getDashboardData(List<IDashboardComponent> listDashboards,
AdminUser user,
int nZone,
javax.servlet.http.HttpServletRequest request)
Gets Data from all components of the zone
|
List<IDashboardComponent> |
getDashboards(AdminUser user,
javax.servlet.http.HttpServletRequest request)
Get the list of dashboard from plugins
|
static DashboardService |
getInstance()
Return the unique instance
|
ReferenceList |
getListAvailableColumns()
Returns list with available column
|
ReferenceList |
getListAvailableOrders(int nColumn)
Orders reference list for the given column
|
Map<String,ReferenceList> |
getMapAvailableOrders()
Builds all refList order for all columns
|
List<IDashboardComponent> |
getNotSetDashboards()
Returns all dashboards with no column/order set
|
Map<String,Boolean> |
getOrderedColumnsStatus()
Builds the map to with column id as key, and
true as value if column is well ordered, false otherwise. |
void |
registerDashboardComponent(DashboardComponentEntry entry,
Plugin plugin)
Register a Dashboard Component
|
public static DashboardService getInstance()
public int getColumnCount()
PROPERTY_COLUMN_COUNT
. Default is CONSTANTE_DEFAULT_COLUMN_COUNT
public List<IDashboardComponent> getAllDashboardComponents()
public List<IDashboardComponent> getDashboardComponents(int nColumn)
nColumn
- the column idpublic void registerDashboardComponent(DashboardComponentEntry entry, Plugin plugin)
entry
- The DashboardComponent entry defined in the plugin's XML fileplugin
- The pluginpublic void doMoveDashboard(IDashboardComponent dashboard, int nOldColumn, int nOldOrder, boolean bCreate)
dashboard
- to move, with new valuesnOldColumn
- previous column idnOldOrder
- previous orderbCreate
- true
if this is a new dashboard, false
otherwise.public List<IDashboardComponent> getNotSetDashboards()
public Map<String,List<IDashboardComponent>> getAllSetDashboards(AdminUser user)
user
- the current userpublic String getDashboardData(AdminUser user, int nZone, javax.servlet.http.HttpServletRequest request)
user
- The usernZone
- The dasboard zonerequest
- HttpServletRequestpublic List<IDashboardComponent> getDashboards(AdminUser user, javax.servlet.http.HttpServletRequest request)
user
- the current userrequest
- HttpServletRequestpublic String getDashboardData(List<IDashboardComponent> listDashboards, AdminUser user, int nZone, javax.servlet.http.HttpServletRequest request)
listDashboards
- the list of dashboardsuser
- The usernZone
- The dasboard zonerequest
- HttpServletRequestpublic void doReorderColumn(int nColumn)
nColumn
- the column to reorderpublic Map<String,Boolean> getOrderedColumnsStatus()
true
as value if column is well ordered, false
otherwise.public ReferenceList getListAvailableColumns()
public Map<String,ReferenceList> getMapAvailableOrders()
public ReferenceList getListAvailableOrders(int nColumn)
nColumn
- columnCopyright © 2020 City of Paris. All rights reserved.