Package org.jboss.dashboard.kpi

Examples of org.jboss.dashboard.kpi.KPI


    public List<KPI> getSelectedKPIs(DataProvider dataProvider) throws Exception {
        List<KPI> results = getSelectedKPIs();
        Iterator<KPI> it = results.iterator();
        while (it.hasNext()) {
            KPI kpi = it.next();
            if (kpi != null && !kpi.getDataProvider().equals(dataProvider)) {
                it.remove();
            }
        }
        return results;
    }
View Full Code Here


                        int numberOfKPIs = 0;
                        setAttribute("usedByOtherKpis", Boolean.FALSE);
                        Iterator it1 = kpis.iterator();
                        while (it1.hasNext()) {
                            KPI kpi = (KPI) it1.next();
                            if (kpi.getDataProvider().equals(dataProvider)) numberOfKPIs++;
                        }

                        String providerType = dataProvider.getDataProviderType().getDescription(getLocale());
                        ResourceBundle i18n = ResourceBundle.getBundle("org.jboss.dashboard.displayer.messages", getLocale());
                        String deleteMessage = i18n.getString(DataProviderHandler.I18N_PREFFIX + "confirmDelete");
View Full Code Here

    public Set<DataProvider> getDataProviders() {
        Set<DataProvider> results = new HashSet<DataProvider>();
        Iterator it = getSection().getPanels().iterator();
        while (it.hasNext()) {
            KPI kpi = getKPI((Panel) it.next());

            // The KPI is null if the panel is not assigned to a region.
            if (kpi != null) results.add(kpi.getDataProvider());
        }
        return results;
    }
View Full Code Here

                        if (dataProvider == null) continue;

                        setAttribute("usedByOtherKpis", Boolean.FALSE);
                        Iterator it1 = kpis.iterator();
                        while (it1.hasNext()) {
                            KPI kpi = (KPI) it1.next();
                            if (kpi.getDataProvider().equals(dataProvider))
                                setAttribute("usedByOtherKpis", Boolean.TRUE);
                        }
                        setAttribute("index", new Integer(i));
                        setAttribute("code", StringEscapeUtils.escapeHtml(dataProvider.getCode()));
                        setAttribute("dataProviderName", StringEscapeUtils.escapeHtml(dataProvider.getDescription(getLocale())));
View Full Code Here

                        int numberOfKPIs = 0;
                        setAttribute("usedByOtherKpis", Boolean.FALSE);
                        Iterator it1 = kpis.iterator();
                        while (it1.hasNext()) {
                            KPI kpi = (KPI) it1.next();
                            if (kpi.getDataProvider().equals(dataProvider)) numberOfKPIs++;
                        }

                        String providerType = dataProvider.getDataProviderType().getDescription(getLocale());
                        ResourceBundle i18n = ResourceBundle.getBundle("org.jboss.dashboard.displayer.messages", getLocale());
                        String deleteMessage = i18n.getString(DataProviderHandler.I18N_PREFFIX + "confirmDelete");
View Full Code Here

    public KPI getKPI(Panel panel) {
        if (!belongsToDashboard(panel)) return null;
        if (!(panel.getInstance().getProvider().getDriver().getClass().getName().endsWith("KPIDriver"))) return null;

        // Get the current working copy for the given panel.
        KPI workingKPI = kpis.get(panel.getInstanceId());
        if (workingKPI != null) return workingKPI;

        // Get a KPI working copy for this dashboard.
        KPI loadedKPI = getKPI(panel.getInstance());
        kpis.put(panel.getInstanceId(), loadedKPI);
        return loadedKPI;
    }
View Full Code Here

    }

    public Set<DataProvider> getDataProviders() {
        Set<DataProvider> results = new HashSet<DataProvider>();
        for (Long instanceId: kpis.keySet()) {
            KPI kpi = getKPI(instanceId);

            // The KPI is null if the panel is not assigned to a region.
            if (kpi != null) results.add(kpi.getDataProvider());
        }
        return results;
    }
View Full Code Here

        if (element instanceof DataProvider) {
            DataProvider dp = (DataProvider) element;
            return dp.getCode() + ", " + dp.getDescription(l);
        }
        if (element instanceof KPI) {
            KPI kpi = (KPI) element;
            return kpi.getCode() + ", " + kpi.getDescription(l);
        }
        return element.toString();
    }
View Full Code Here

TOP

Related Classes of org.jboss.dashboard.kpi.KPI

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.