pase.server
Class DashboardServiceImpl

java.lang.Object
  extended by pase.server.DashboardServiceImpl
All Implemented Interfaces:
com.flowring.aware.Aware, com.flowring.dao.DashboardDaoAware, DashboardService

public class DashboardServiceImpl
extends java.lang.Object
implements DashboardService, com.flowring.dao.DashboardDaoAware

The main purpose of this class is to implement DashboardService.

Since:
Agentflow 3.0
Author:
Kyle

Constructor Summary
DashboardServiceImpl()
           
 
Method Summary
 boolean addPortletIDByDashboardId(java.lang.String dboardId, java.lang.String portletID)
           
 boolean deleteDashboard(java.lang.String boardId)
           Deletes a Dashboard and its style list.
 boolean deleteDashboardStyle(java.lang.String styleId)
          Deletes a DashboardStyle from table.
 boolean deletePortalIDByPortletID(java.lang.String portletID)
           
 com.flowring.dashboard.Dashboard getDashboard(java.lang.String boardId)
          Returns a Dashboard object by a given Dashboard id.
 java.util.HashMap getDashboardByPortletID(java.lang.String PortletID)
          Get the DashboardID to show Dashboard in Portlet.
 java.util.List getDashboardGroupList()
          Gets a list of group from Dashboard without duplicated.
 java.util.List getDashboardGroupList(java.lang.String proId)
          Gets a list of group from Dashboard by the given process id.
 java.util.List getDashboardGroupListOfUser(java.lang.String memId, boolean isMainRoleOnly)
          Gets a list of group of user's from Dashboard without duplicated.
 java.lang.String getDashboardId(java.lang.String prjId, java.lang.String proId, java.lang.String grpId)
          Gets a Dashboard id by the given value.
 java.util.List getDashboardList()
          Gets a dashboard list.
 java.util.List getDashboardListByConditionType(java.lang.String columnName, int relation, java.lang.String columnValue)
           Gets a dashboard list by condition type.
 java.util.List getDashboardListByGroup(java.lang.String grpId)
          Gets a dashboard list by the given group id, which contains each id's name.
 java.util.List getDashboardProcessList(java.lang.String prjId)
          Gets a list of process from Dashboard by the given project id.
 java.util.List getDashboardProjectList()
          Gets a list of project form Dashboard without duplicate.
 java.util.List getDashboardStyleIdList(java.lang.String boardId)
          Gets DashboardStyle id list of a dashboard by a given value.
 java.util.List getDashboardStyleList(java.lang.String boardId)
          Gets a DashboardStyle list by a given value.
 boolean insertDashboard(com.flowring.dashboard.Dashboard dboard)
           Adds a Dashboard only.
 boolean insertDashboardStyle(com.flowring.dashboard.DashboardStyle dstyle)
          Adds a DashboardStyle into table.
 boolean isDashboardExist(java.lang.String prjId, java.lang.String proId, java.lang.String grpId)
          Test dashboard exist or not by the given value.
 boolean isDashboardStyleSiblingOrderExist(java.lang.String boardId, int siblingOrder)
          Tests whether the dashboard style's SiblingOrder exist or not.
 com.flowring.dashboard.Dashboard newDashboard()
          Create a new Dashboard with a new system id which get from System.
 com.flowring.dashboard.DashboardStyle newDashboardStyle(java.lang.String boardId)
          Create a new DashboardStyle with a new system id which get from System.
 void setDashboardDao(com.flowring.dao.DashboardDao dashboardDao)
          Sets a dashboardDao.
 boolean updateDashboard(com.flowring.dashboard.Dashboard dboard)
           Updates a Dashboard only.
 boolean updateDashboardStyle(com.flowring.dashboard.DashboardStyle dstyle)
          Updates a DashboardStyle from table.
 boolean updateDashOfPortletByPortletId(java.lang.String dboardId, java.lang.String portletId)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DashboardServiceImpl

public DashboardServiceImpl()
Method Detail

getDashboardList

public java.util.List getDashboardList()
Description copied from interface: DashboardService
Gets a dashboard list.

Specified by:
getDashboardList in interface DashboardService
Returns:
each element is a Dashboard object.
See Also:
Dashboard

getDashboardListByConditionType

public java.util.List getDashboardListByConditionType(java.lang.String columnName,
                                                      int relation,
                                                      java.lang.String columnValue)
Description copied from interface: DashboardService

Gets a dashboard list by condition type. For a example:

 String columnName = "GID"; //MUST be a AF_Dashboard column name
 int relation = "LIKE";
 String columnValue = "value";
 
 List dboards = wfci.getDashboardListByConditionType(columnName, relation, columnValue);
 

Specified by:
getDashboardListByConditionType in interface DashboardService
Returns:
each element is a Dashboard object.

getDashboardListByGroup

public java.util.List getDashboardListByGroup(java.lang.String grpId)
Description copied from interface: DashboardService
Gets a dashboard list by the given group id, which contains each id's name.

Specified by:
getDashboardListByGroup in interface DashboardService
Parameters:
grpId - a group id, see PASEGroup.
Returns:
each element is a Dashboard object.
See Also:
PASEGroup, Dashboard

newDashboard

public com.flowring.dashboard.Dashboard newDashboard()
Description copied from interface: DashboardService
Create a new Dashboard with a new system id which get from System.

Specified by:
newDashboard in interface DashboardService
Returns:
a new Dashboard object.

getDashboard

public com.flowring.dashboard.Dashboard getDashboard(java.lang.String boardId)
Description copied from interface: DashboardService
Returns a Dashboard object by a given Dashboard id.

Specified by:
getDashboard in interface DashboardService
Parameters:
boardId - a Dashboard id.
Returns:
a Dashboard object.

getDashboardProjectList

public java.util.List getDashboardProjectList()
Description copied from interface: DashboardService
Gets a list of project form Dashboard without duplicate.

Specified by:
getDashboardProjectList in interface DashboardService
Returns:
each element is a Project object.
See Also:
Project

getDashboardProcessList

public java.util.List getDashboardProcessList(java.lang.String prjId)
Description copied from interface: DashboardService
Gets a list of process from Dashboard by the given project id.

Specified by:
getDashboardProcessList in interface DashboardService
Parameters:
prjId - a project id.
Returns:
each element is a DBProcess object, and each process is a root process.
See Also:
DBProcess

getDashboardGroupList

public java.util.List getDashboardGroupList()
Description copied from interface: DashboardService
Gets a list of group from Dashboard without duplicated.

Specified by:
getDashboardGroupList in interface DashboardService
Returns:
each element is a PASEGroup object.
See Also:
PASEGroup

getDashboardGroupListOfUser

public java.util.List getDashboardGroupListOfUser(java.lang.String memId,
                                                  boolean isMainRoleOnly)
Description copied from interface: DashboardService
Gets a list of group of user's from Dashboard without duplicated.

Specified by:
getDashboardGroupListOfUser in interface DashboardService
Parameters:
memId - a member id.
isMainRoleOnly - if true, only the MainRole will be retrived; if false ,all role will be retrived.
Returns:
each element is a PASEGroup object.
See Also:
PASEGroup

getDashboardGroupList

public java.util.List getDashboardGroupList(java.lang.String proId)
Description copied from interface: DashboardService
Gets a list of group from Dashboard by the given process id.

Specified by:
getDashboardGroupList in interface DashboardService
Parameters:
proId - a process id.
Returns:
each element is a PASEGroup object.
See Also:
PASEGroup

insertDashboard

public boolean insertDashboard(com.flowring.dashboard.Dashboard dboard)
Description copied from interface: DashboardService

Adds a Dashboard only.

NOTE: It will not insert its style list, using insertDashboardStyle(DashboardStyle) to insert its style.

Specified by:
insertDashboard in interface DashboardService
Parameters:
dboard - a Dashboard object.
Returns:
true if insert success; false otherwise.
See Also:
Dashboard

updateDashboard

public boolean updateDashboard(com.flowring.dashboard.Dashboard dboard)
Description copied from interface: DashboardService

Updates a Dashboard only.

NOTE: It will not update its style list, using updateDashboardStyle(DashboardStyle) to update its style.

Specified by:
updateDashboard in interface DashboardService
Parameters:
dboard - a Dashboard object.
Returns:
true if update success; false otherwise.
See Also:
Dashboard

deleteDashboard

public boolean deleteDashboard(java.lang.String boardId)
Description copied from interface: DashboardService

Deletes a Dashboard and its style list.

NOTE: It will delete its style list.

Specified by:
deleteDashboard in interface DashboardService
Parameters:
boardId - a dashboard id.
Returns:
true if delete success; false otherwise.

getDashboardId

public java.lang.String getDashboardId(java.lang.String prjId,
                                       java.lang.String proId,
                                       java.lang.String grpId)
Description copied from interface: DashboardService
Gets a Dashboard id by the given value.

Specified by:
getDashboardId in interface DashboardService
Parameters:
prjId - a project id.
proId - a process id.
grpId - a group id.
Returns:
a dashboard id, or null if not found.
See Also:
Project, DBProcess, PASEGroup

isDashboardExist

public boolean isDashboardExist(java.lang.String prjId,
                                java.lang.String proId,
                                java.lang.String grpId)
Description copied from interface: DashboardService
Test dashboard exist or not by the given value.

Specified by:
isDashboardExist in interface DashboardService
Parameters:
prjId - a project id.
proId - a process id.
grpId - a group id.
Returns:
true if dashboard is exist; false otherwise.
See Also:
Project, DBProcess, PASEGroup

getDashboardStyleList

public java.util.List getDashboardStyleList(java.lang.String boardId)
Description copied from interface: DashboardService
Gets a DashboardStyle list by a given value.

Specified by:
getDashboardStyleList in interface DashboardService
Parameters:
boardId - a Dashboard id.
Returns:
each element is a DashboardStyle object.
See Also:
DashboardStyle

newDashboardStyle

public com.flowring.dashboard.DashboardStyle newDashboardStyle(java.lang.String boardId)
Description copied from interface: DashboardService
Create a new DashboardStyle with a new system id which get from System.

Specified by:
newDashboardStyle in interface DashboardService
Parameters:
boardId - a Dashboard id.
Returns:
a new DashboardsStyle object.

getDashboardStyleIdList

public java.util.List getDashboardStyleIdList(java.lang.String boardId)
Description copied from interface: DashboardService
Gets DashboardStyle id list of a dashboard by a given value.

Specified by:
getDashboardStyleIdList in interface DashboardService
Parameters:
boardId - a dashboard id.
Returns:
each element is a dashboard id.

insertDashboardStyle

public boolean insertDashboardStyle(com.flowring.dashboard.DashboardStyle dstyle)
Description copied from interface: DashboardService
Adds a DashboardStyle into table.

Specified by:
insertDashboardStyle in interface DashboardService
Parameters:
dstyle - a DashboardStyle object.
Returns:
true if insert success; false otherwise.
See Also:
DashboardStyle

updateDashboardStyle

public boolean updateDashboardStyle(com.flowring.dashboard.DashboardStyle dstyle)
Description copied from interface: DashboardService
Updates a DashboardStyle from table.

Specified by:
updateDashboardStyle in interface DashboardService
Parameters:
dstyle - a DashboardStyle object.
Returns:
true if update success; false otherwise.
See Also:
DashboardStyle

deleteDashboardStyle

public boolean deleteDashboardStyle(java.lang.String styleId)
Description copied from interface: DashboardService
Deletes a DashboardStyle from table.

Specified by:
deleteDashboardStyle in interface DashboardService
Parameters:
styleId - a DashboardStyle id.
Returns:
true if delete success; false otherwise.

isDashboardStyleSiblingOrderExist

public boolean isDashboardStyleSiblingOrderExist(java.lang.String boardId,
                                                 int siblingOrder)
Description copied from interface: DashboardService
Tests whether the dashboard style's SiblingOrder exist or not.

Specified by:
isDashboardStyleSiblingOrderExist in interface DashboardService
Parameters:
boardId - a dashboard id.
siblingOrder - a dashboard style's sibling order for view.
Returns:
true if exist; false otherwise.

setDashboardDao

public void setDashboardDao(com.flowring.dao.DashboardDao dashboardDao)
Description copied from interface: com.flowring.dao.DashboardDaoAware
Sets a dashboardDao.

Specified by:
setDashboardDao in interface com.flowring.dao.DashboardDaoAware
Parameters:
dashboardDao - a dashboard dao.
See Also:
DashboardDao

getDashboardByPortletID

public java.util.HashMap getDashboardByPortletID(java.lang.String PortletID)
Description copied from interface: DashboardService
Get the DashboardID to show Dashboard in Portlet.

Specified by:
getDashboardByPortletID in interface DashboardService
Returns:
since version EIP

addPortletIDByDashboardId

public boolean addPortletIDByDashboardId(java.lang.String dboardId,
                                         java.lang.String portletID)
Specified by:
addPortletIDByDashboardId in interface DashboardService

updateDashOfPortletByPortletId

public boolean updateDashOfPortletByPortletId(java.lang.String dboardId,
                                              java.lang.String portletId)
Specified by:
updateDashOfPortletByPortletId in interface DashboardService

deletePortalIDByPortletID

public boolean deletePortalIDByPortletID(java.lang.String portletID)
Specified by:
deletePortalIDByPortletID in interface DashboardService