/*
* (non-Javadoc)
* @see org.encuestame.core.service.imp.IDashboardService#updateDashboard(org.encuestame.utils.web.DashboardBean)
*/
public Dashboard updateDashboard(final DashboardBean boardBean) throws EnMeNoResultsFoundException{
final Dashboard board = this.getDashboardById(boardBean.getDashboardId());
Assert.notNull(board);
if (board == null) {
throw new EnMeDashboardNotFoundException("dashboard not found");
}
board.setPageBoardName(boardBean.getDashboardName());
board.setBoardSequence(boardBean.getSequence());
board.setPageLayout(LayoutEnum.getDashboardLayout(boardBean.getLayout()) == null ? LayoutEnum.BB_BLOCK : LayoutEnum.getDashboardLayout(boardBean.getLayout()));
board.setDescription(boardBean.getDashboardDesc());
if (boardBean.getSelected()){
this.markAsSelectedDasboard(board.getBoardId());
}
board.setFavorite(boardBean.getFavorite());
getDashboardDao().saveOrUpdate(board);
return board;
}