Package org.jboss.dashboard.displayer

Examples of org.jboss.dashboard.displayer.DataDisplayerType


    }

    protected void deserializeDataDisplayer() {
        try {
            if (dataDisplayerUid == null) return;
            DataDisplayerType type = DataDisplayerServices.lookup().getDataDisplayerManager().getDisplayerTypeByUid(dataDisplayerUid);
            if (dataDisplayerXML != null) {
                ImportResults importResults = DataDisplayerServices.lookup().getImportManager().createImportResults();
                dataDisplayer = type.getXmlFormat().parse(dataDisplayerXML, importResults);
                if (importResults.getMessages().hasErrors()) {
                    throw new RuntimeException(importResults.getMessages().get(0).toString());
                }
                Locale locale = LocaleManager.currentLocale();
                dataDisplayer.setDataDisplayerType(type);
View Full Code Here


            return featuresSupported.contains(feature);
        }
    }

    public List<String> getAvailableChartTypes(DataDisplayer displayer) {
        DataDisplayerType displayerType = displayer.getDataDisplayerType();
        return availableChartTypes.get(displayerType.getUid());
    }
View Full Code Here

        DataDisplayerType displayerType = displayer.getDataDisplayerType();
        return availableChartTypes.get(displayerType.getUid());
    }

    public String getDefaultChartType(DataDisplayer displayer) {
        DataDisplayerType displayerType = displayer.getDataDisplayerType();
        return defaultChartTypes.get(displayerType.getUid());
    }
View Full Code Here

        return null;
    }

    public CommandResponse actionChangeDisplayer(CommandRequest request) throws Exception {
        String uid = request.getRequestObject().getParameter("uid");
        DataDisplayerType selectedType = DataDisplayerServices.lookup().getDataDisplayerManager().getDisplayerTypeByUid(uid);
        if (selectedType == null) return null;

        DataDisplayer kpiDisplayer = kpi.getDataDisplayer();
        DataDisplayerType kpiDisplayerType = kpiDisplayer.getDataDisplayerType();

        // If the displayer associated to the kpi is not the new displayer, change it.
        if (!kpiDisplayerType.getUid().equals(selectedType.getUid())) {
            DataDisplayer newDisplayer = selectedType.createDataDisplayer();
            newDisplayer.setDefaultSettings();
            newDisplayer.copyFrom(kpiDisplayer);
            kpi.setDataDisplayer(newDisplayer);
            setKpi(kpi);
View Full Code Here

    /**
     * Get the editor component for the specified data displayer.
     */
    public DataDisplayerEditor getEditor(DataDisplayer target) {
        DataDisplayerType type = target.getDataDisplayerType();
        String name = dataDisplayerEditorMap.get(type.getUid());
        DataDisplayerEditor editor = (DataDisplayerEditor) Factory.lookup(name);
        editor.setDataDisplayer(target);
        return (DataDisplayerEditor) Factory.lookup(name);
    }
View Full Code Here

    /**
     * Get the viewer component for the specified data displayer.
     */
    public DataDisplayerViewer getViewer(DataDisplayer target) {
        DataDisplayerType type = target.getDataDisplayerType();
        String prefix = dataDisplayerViewerMap.get(type.getUid());

        DataDisplayerRenderer lib = target.getDataDisplayerRenderer();
        String name = prefix + "_" + lib.getUid();
        DataDisplayerViewer viewer = (DataDisplayerViewer) Factory.lookup(name);
        viewer.setDataDisplayer(target);
View Full Code Here

    }

    public CommandResponse actionChangeDisplayer(CommandRequest request) throws Exception {

        String uid = request.getRequestObject().getParameter("uid");
        DataDisplayerType selectedType = DataDisplayerServices.lookup().getDataDisplayerManager().getDisplayerTypeByUid(uid);
        if (selectedType == null) return null;

        DataDisplayer kpiDisplayer = kpi.getDataDisplayer();
        DataDisplayerType kpiDisplayerType = kpiDisplayer.getDataDisplayerType();

        // If the displayer associated to the kpi is not the new displayer, change it.
        if (!kpiDisplayerType.getUid().equals(selectedType.getUid())) {
            DataDisplayer newDisplayer = selectedType.createDataDisplayer();
            newDisplayer.setDefaultSettings();
            newDisplayer.copyFrom(kpiDisplayer);
            kpi.setDataDisplayer(newDisplayer);
            setKpi(kpi);
View Full Code Here

        }
        System.out.println("\nData displayer types");
        System.out.println("-------------------------");
        DataDisplayerType[] displayerType = displayerServices.getDataDisplayerManager().getDataDisplayerTypes();
        for (int i = 0; i < displayerType.length; i++) {
            DataDisplayerType dataDisplayerType = displayerType[i];
            System.out.println(dataDisplayerType.getUid());
        }
        System.out.println("\nDisplayer renderers");
        System.out.println("------------------------");
        DataDisplayerRenderer[] displayerRenderers = displayerServices.getDataDisplayerManager().getDataDisplayerRenderers();
        for (int i = 0; i < displayerRenderers.length; i++) {
View Full Code Here

        try {
            dataDisplayerUid = null;
            dataDisplayerXML = null;
            if (dataDisplayer == null) return;

            DataDisplayerType type = dataDisplayer.getDataDisplayerType();
            dataDisplayerUid = type.getUid();
            dataDisplayerXML = type.getXmlFormat().format(dataDisplayer);
        } catch (Exception e) {
            log.error("Error serializing data displayer for KPI: " + id, e);
        }
    }
View Full Code Here

    }

    protected void deserializeDataDisplayer() {
        try {
            if (dataDisplayerUid == null) return;
            DataDisplayerType type = DataDisplayerServices.lookup().getDataDisplayerManager().getDisplayerTypeByUid(dataDisplayerUid);
            if (dataDisplayerXML != null) {
                ImportResults importResults = DataDisplayerServices.lookup().getImportManager().createImportResults();
                dataDisplayer = type.getXmlFormat().parse(dataDisplayerXML, importResults);
                if (importResults.getMessages().hasErrors()) {
                    throw new RuntimeException(importResults.getMessages().get(0).toString());
                }
                Locale locale = LocaleManager.currentLocale();
                dataDisplayer.setDataDisplayerType(type);
View Full Code Here

TOP

Related Classes of org.jboss.dashboard.displayer.DataDisplayerType

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.