Package org.fluxtream.core.mvc.models

Examples of org.fluxtream.core.mvc.models.DashboardModel


            List<Dashboard> dashboards = dashboardsService.getDashboards(guestId);
            Collections.sort(dashboards);
            List<DashboardModel> dashboardModels = new ArrayList<DashboardModel>();
            for (final ListIterator eachDashboard = dashboards.listIterator(); eachDashboard.hasNext(); ) {
                final Dashboard dashboard = (Dashboard)eachDashboard.next();
                DashboardModel dashboardModel = toDashboardModel(dashboard, guestId);
                dashboardModels.add(dashboardModel);
            }
            return Response.ok(dashboardModels).build();
        }
        catch (Exception e){
View Full Code Here


            return Response.serverError().entity("Failed to get dashboards: " + e.getMessage()).build();
        }
    }

    private DashboardModel toDashboardModel(final Dashboard dashboard, long guestId) {
        DashboardModel dashboardModel = new DashboardModel();
        dashboardModel.id = dashboard.getId();
        dashboardModel.name = dashboard.name;
        dashboardModel.active = dashboard.active;
        final List<DashboardWidget> availableWidgetsList = widgetsService.getAvailableWidgetsList(guestId);
        final String[] widgetNames = StringUtils.split(dashboard.widgetNames, ",");
View Full Code Here

TOP

Related Classes of org.fluxtream.core.mvc.models.DashboardModel

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.