Examples of DashboardContentBean


Examples of org.wso2.carbon.dashboard.bean.DashboardContentBean

     * @param backendServerURL
     * @return
     * @throws AxisFault
     */
    public DashboardContentBean getDashboardContent(String userId, String dashboardName, String tDomain, String backendServerURL) throws AxisFault {
        DashboardContentBean dashboardContentBean = new DashboardContentBean();

        dashboardContentBean.setBackendHttpPort(getBackendHttpPort());
        dashboardContentBean.setDefaultGadgetUrlSet(getDefaultGadgetUrlSet(userId));
        dashboardContentBean.setPortalCss(getPortalStylesUrl(userId));
        dashboardContentBean.setReadOnlyMode(isReadOnlyMode(userId));
        dashboardContentBean.setTabLayout(getTabLayout(userId, dashboardName));

        String[] userTabLayout = getTabLayout(userId, dashboardName).split(",");

        ArrayList<Tab> userTabs = new ArrayList<Tab>();
        try {
            for (String userTab : userTabLayout) {
                Tab tab = new Tab();
                tab.setTabName(getTabTitle(userId, userTab, dashboardName));
                tab.setTabId(userTab);
                tab.setGadgetLayout(getGadgetLayout(userId, userTab, dashboardName));
                tab.setGadgets(getGadgetsForTab(userId, dashboardName, tab.getGadgetLayout()));
                //tab.setGadgetUrls(getGadgetUrlsToLayout(userId, userTab, dashboardName, backendServerURL));
                userTabs.add(tab);
            }
        } catch (Exception e) {
            log.error(e.getMessage(), e);
            throw new AxisFault(e.getMessage(), e);
        }

        Tab[] tabs = new Tab[userTabs.size()];
        dashboardContentBean.setTabs(userTabs.toArray(tabs));
        return dashboardContentBean;
    }
View Full Code Here

Examples of org.wso2.carbon.dashboard.bean.DashboardContentBean

     * @param backendServerURL
     * @return
     * @throws AxisFault
     */
    public String getDashboardContentAsJson(String userId, String dashboardName, String tDomain, String backendServerURL) throws AxisFault {
        DashboardContentBean dashboardContentBean = getDashboardContent(userId, dashboardName, tDomain, backendServerURL);
        try {
            return dashboardContentBean.toJSONObject().toString();
        } catch (JSONException e) {
            log.error(e.getMessage(), e);
            throw new AxisFault(e.getMessage(), e);
        }
    }
View Full Code Here

Examples of org.wso2.carbon.dashboard.bean.DashboardContentBean

     * @param tabId
     * @return
     * @throws AxisFault
     */
    public String getTabContentAsJson(String userId, String dashboardName, String tDomain, String backendServerURL, String tabId) throws AxisFault {
        DashboardContentBean dashboardContentBean = getDashboardContent(userId, dashboardName, tDomain, backendServerURL);
        Tab tab = getTabContentFromId(dashboardContentBean, tabId);
        try {
            return tab.toJSONObject().toString();
        } catch (JSONException e) {
            log.error(e.getMessage(), e);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.