Package org.encuestame.utils.web

Examples of org.encuestame.utils.web.DashboardBean


            @RequestParam(value = "favorite", required = false) Boolean favorite,
            @RequestParam(value = "layout", required = false) String layout,
            HttpServletRequest request,
            HttpServletResponse response){
         try {
             final DashboardBean bean = new DashboardBean();
             bean.setDashboardName(boardName);
             bean.setDashboardDesc(boardDesc);
             bean.setFavorite(favorite);
             bean.setLayout(layout == null ? LayoutEnum.BB_BLOCK.toString() : layout);
             final Map<String, Object> jsonResponse = new HashMap<String, Object>();
             final Dashboard dashboard = getDashboardService().createDashboard(bean);
             jsonResponse.put("dashboard", ConvertDomainBean.convertDashboardDomaintoBean(dashboard));
             setItemResponse(jsonResponse);
         } catch (Exception e) {
View Full Code Here


    /**
     * Test {@link DashboardBean}
     */
    @Test
    public void testDashboardBean(){
        final DashboardBean boardBean = new DashboardBean();
        boardBean.setDashboardId(1L);
        boardBean.setDashboardName("My Dashboard");
        boardBean.setDashboardDesc("My First Dashboard");
        boardBean.setFavorite(Boolean.TRUE);
        boardBean.setLayout("AAA");
        boardBean.setSequence(1);
        boardBean.setFavoriteCounter(5);
        boardBean.setSelected(Boolean.TRUE);
        assertNotNull(boardBean);
        assertNotNull(boardBean.getDashboardId());
        assertNotNull(boardBean.getDashboardName());
        assertNotNull(boardBean.getDashboardDesc());
        assertNotNull(boardBean.getFavorite());
        assertNotNull(boardBean.getLayout());
        assertNotNull(boardBean.getSequence());
        assertNotNull(boardBean.getFavoriteCounter());
        assertNotNull(boardBean.getSelected());
    }
View Full Code Here

      * @return
      */
    public DashboardBean createDashboardBean(final String desc,
            final String name, final Boolean favorite, final Integer counter,
            final String layout, final Boolean selected, final Integer sequence) {
        final DashboardBean myDashboard = new DashboardBean();
        myDashboard.setDashboardDesc(desc);
        myDashboard.setDashboardName(name);
        myDashboard.setFavorite(favorite);
        myDashboard.setFavoriteCounter(counter);
        myDashboard.setLayout(layout);
        myDashboard.setSelected(selected);
        myDashboard.setSequence(sequence);
        return myDashboard;
     }
View Full Code Here

     * @param dashboard
     * @return
     */
    public static final DashboardBean convertDashboardDomaintoBean(
            final Dashboard dashboard) {
        final DashboardBean dashboardBean = new DashboardBean();
        if (dashboard != null) {
            dashboardBean.setDashboardId(dashboard.getBoardId());
            dashboardBean.setDashboardName(dashboard.getPageBoardName());
            dashboardBean.setDashboardDesc(dashboard.getDescription());
            dashboardBean.setFavorite(dashboard.getFavorite());
            dashboardBean.setFavoriteCounter(dashboard.getFavoriteCounter());
            dashboardBean.setLayout((dashboard.getPageLayout() == null ? null
                    : dashboard.getPageLayout().toString()));
            dashboardBean.setSequence(dashboard.getBoardSequence());
            dashboardBean
                    .setSelected(dashboard.getSelectedByDefault() == null ? false
                            : dashboard.getSelectedByDefault());
        }
        return dashboardBean;
    }
View Full Code Here

             final String dashboardDesc,
             final Boolean favorite,
             final LayoutEnum layout,
             final Integer sequence,
             final Integer counter){
         final DashboardBean dashboardBean = new DashboardBean();
         dashboardBean.setDashboardName(dashboardName);
         dashboardBean.setDashboardDesc(dashboardDesc);
         dashboardBean.setFavorite(favorite);
         dashboardBean.setLayout(layout.toString());
         dashboardBean.setSequence(sequence);
         dashboardBean.setFavoriteCounter(counter);
         return dashboardBean;
     }
View Full Code Here

TOP

Related Classes of org.encuestame.utils.web.DashboardBean

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.