Package org.jboss.dashboard.domain

Examples of org.jboss.dashboard.domain.DomainConfiguration


            }
        }
    }

    protected void processChartDisplayer(AbstractChartDisplayer chartDisplayer, String parentKey, Map<Locale,Properties> bundles) throws Exception {
        DomainConfiguration domainConfig = new DomainConfiguration(chartDisplayer.getDomainProperty());
        processDomain(domainConfig, parentKey + ".domain", bundles);

        RangeConfiguration rangeConfig = new RangeConfiguration(chartDisplayer.getRangeProperty(), chartDisplayer.getRangeScalarFunction(), chartDisplayer.getUnitI18nMap());
        processRange(rangeConfig, parentKey + ".range", bundles);
    }
View Full Code Here


    protected void processTableDisplayer(TableDisplayer tableDisplayer, String parentKey, Map<Locale,Properties> bundles) throws Exception {
        DataSetTable table = tableDisplayer.getTable();
        DataProperty groupByProp = table.getGroupByProperty();
        if (groupByProp != null) {
            DomainConfiguration domainConfig = new DomainConfiguration(groupByProp);
            processDomain(domainConfig, parentKey + ".groupBy", bundles);
        }
        for (int columnIndex=0; columnIndex<table.getColumnCount(); columnIndex++) {
            DataProperty columnProperty = table.getOriginalDataProperty(columnIndex);
            if (columnProperty == null) continue;
View Full Code Here

        DataSetTable dataSetTable = (DataSetTable) table;
        String groupByPropId = request.getRequestObject().getParameter("groupbyproperty");
        String closeGroupByConfig = request.getRequestObject().getParameter("closegroupbyconfig");
        if (groupByPropId != null && !groupByPropId.equals("-1") && showGroupByConfig) {
            // Capture the group by domain configuration.
            DomainConfiguration config = new DomainConfiguration();
            DomainConfigurationParser parser = new DomainConfigurationParser(config);
            parser.parse(request);
            config.apply(dataSetTable.getGroupByProperty());
            dataSetTable.setGroupByShowTotals(Boolean.valueOf(request.getRequestObject().getParameter("groupbyshowtotals")).booleanValue());
            dataSetTable.setGroupByTotalsHtmlStyle(request.getRequestObject().getParameter("groupbytotalshtmlstyle"));           

            // Get for the selected non-group by column the scalar function to apply.
            if (dataSetTable.getNonGroupByColumnIndexes().length > 0) {
View Full Code Here

    }

    public void actionSelectGroupByPropertyFunction(CommandRequest request) throws Exception {
        // Capture the group by domain configuration.
        DataSetTable dataSetTable =(DataSetTable) table;
        DomainConfiguration config = new DomainConfiguration();
        DomainConfigurationParser parser = new DomainConfigurationParser(config);
        parser.parse(request);
        config.apply(dataSetTable.getGroupByProperty());
        dataSetTable.setGroupByShowTotals(Boolean.valueOf(request.getRequestObject().getParameter("groupbyshowtotals")).booleanValue());
        dataSetTable.setGroupByTotalsHtmlStyle(request.getRequestObject().getParameter("groupbytotalshtmlstyle"));

        // Get the selected property for the group by function setup.
        groupBySelectedColumnIndex = Integer.parseInt(request.getRequestObject().getParameter("groupbyfunctionindex"));
View Full Code Here

            // If domain save button has been pressed, update its configuration parameters
            // TODO: Also save if the enter key has been pressed.
            String domainSaveButtonPressed = request.getRequestObject().getParameter(DOMAIN_SAVE_BUTTON_PRESSED);
            boolean updateDomainDetails =  (domainSaveButtonPressed != null) && Boolean.valueOf(domainSaveButtonPressed).booleanValue();
            if (updateDomainDetails) {
                DomainConfiguration domainConfig = displayer.getDomainConfiguration();
                DomainConfigurationParser parser = new DomainConfigurationParser(domainConfig);
                parser.parse(request);
                domainConfig.apply(displayer.getDomainProperty());
            }
        }

        String idRangeDetails = request.getRequestObject().getParameter("idRangeDetails");
        if (idRangeDetails != null) {
View Full Code Here

        DataSetTable dataSetTable = (DataSetTable) table;
        String groupByPropId = request.getRequestObject().getParameter("groupbyproperty");
        String closeGroupByConfig = request.getRequestObject().getParameter("closegroupbyconfig");
        if (groupByPropId != null && !groupByPropId.equals("-1") && showGroupByConfig) {
            // Capture the group by domain configuration.
            DomainConfiguration config = new DomainConfiguration();
            DomainConfigurationParser parser = new DomainConfigurationParser(config);
            parser.parse(request);
            config.apply(dataSetTable.getGroupByProperty());
            dataSetTable.setGroupByShowTotals(Boolean.valueOf(request.getRequestObject().getParameter("groupbyshowtotals")).booleanValue());
            dataSetTable.setGroupByTotalsHtmlStyle(request.getRequestObject().getParameter("groupbytotalshtmlstyle"));           

            // Get for the selected non-group by column the scalar function to apply.
            if (dataSetTable.getNonGroupByColumnIndexes().length > 0) {
View Full Code Here

    }

    public void actionSelectGroupByPropertyFunction(CommandRequest request) throws Exception {
        // Capture the group by domain configuration.
        DataSetTable dataSetTable =(DataSetTable) table;
        DomainConfiguration config = new DomainConfiguration();
        DomainConfigurationParser parser = new DomainConfigurationParser(config);
        parser.parse(request);
        config.apply(dataSetTable.getGroupByProperty());
        dataSetTable.setGroupByShowTotals(Boolean.valueOf(request.getRequestObject().getParameter("groupbyshowtotals")).booleanValue());
        dataSetTable.setGroupByTotalsHtmlStyle(request.getRequestObject().getParameter("groupbytotalshtmlstyle"));

        // Get the selected property for the group by function setup.
        groupBySelectedColumnIndex = Integer.parseInt(request.getRequestObject().getParameter("groupbyfunctionindex"));
View Full Code Here

            // If domain save button has been pressed, update its configuration parameters
            // TODO: Also save if the enter key has been pressed.
            String domainSaveButtonPressed = request.getRequestObject().getParameter(DOMAIN_SAVE_BUTTON_PRESSED);
            boolean updateDomainDetails =  (domainSaveButtonPressed != null) && Boolean.valueOf(domainSaveButtonPressed).booleanValue();
            if (updateDomainDetails) {
                DomainConfiguration domainConfig = new DomainConfiguration();
                DomainConfigurationParser parser = new DomainConfigurationParser(domainConfig);
                parser.parse(request);
                domainConfig.setPropertyId(idDomainDetails);
                domainConfig.apply(displayer.getDomainProperty());
            }
        }

        String idRangeDetails = request.getRequestObject().getParameter("idRangeDetails");
        if (idRangeDetails != null) {
View Full Code Here

            AbstractChartDisplayer displayerToFormat = (AbstractChartDisplayer) displayer;

            // Format the domain.
            printIndent(out, indent++);
            out.println("<domain>");
            DomainConfiguration domainConfig = new DomainConfiguration(displayerToFormat.getDomainProperty());
            displayerToFormat.setDomainConfiguration(domainConfig);
            formatDomain(domainConfig, out, indent);
            printIndent(out, --indent);
            out.println("</domain>");
View Full Code Here

        }
        throw new IllegalArgumentException("Missing <displayer> tag.");
    }

    protected DomainConfiguration parseDomain(NodeList domainNodes) {
        DomainConfiguration domainConfig = new DomainConfiguration();
        for (int k = 0; k < domainNodes.getLength(); k++) {
            Node item = domainNodes.item(k);
            if (item.getNodeName().equals("propertyid") && item.hasChildNodes()) {
                domainConfig.setPropertyId(StringEscapeUtils.unescapeXml(item.getFirstChild().getNodeValue()));
            }
            if (item.getNodeName().equals("name") && item.hasChildNodes()) {
                String name = item.getFirstChild().getNodeValue();
                Locale locale = LocaleManager.currentLocale();
                Node languageNode = item.getAttributes().getNamedItem("language");
                if (languageNode != null) locale = new Locale(languageNode.getNodeValue());
                domainConfig.setPropertyName(StringEscapeUtils.unescapeXml(name), locale);
            }
            if (item.getNodeName().equals("maxnumberofintervals") && item.hasChildNodes()) {
                domainConfig.setMaxNumberOfIntervals(StringEscapeUtils.unescapeXml(item.getFirstChild().getNodeValue()));
            }
            // Label domain.
            if (item.getNodeName().equals("intervalstohide") && item.hasChildNodes()) {
                String interval = item.getFirstChild().getNodeValue();
                Locale locale = LocaleManager.currentLocale();
                Node languageNode = item.getAttributes().getNamedItem("language");
                if (languageNode != null) locale = new Locale(languageNode.getNodeValue());
                domainConfig.setLabelIntervalsToHide(StringEscapeUtils.unescapeXml(interval), locale);
            }
            // Date domain.
            if (item.getNodeName().equals("taminterval") && item.hasChildNodes()) {
                domainConfig.setDateTamInterval(StringEscapeUtils.unescapeXml(item.getFirstChild().getNodeValue()));
            }
            if (item.getNodeName().equals("mindate") && item.hasChildNodes()) {
                domainConfig.setDateMinDate(StringEscapeUtils.unescapeXml(item.getFirstChild().getNodeValue()));
            }
            if (item.getNodeName().equals("maxdate") && item.hasChildNodes()) {
                domainConfig.setDateMaxDate(StringEscapeUtils.unescapeXml(item.getFirstChild().getNodeValue()));
            }
            // Numeric domain.
            if (item.getNodeName().equals("taminterval") && item.hasChildNodes()) {
                domainConfig.setNumericTamInterval(StringEscapeUtils.unescapeXml(item.getFirstChild().getNodeValue()));
            }
            if (item.getNodeName().equals("minvalue") && item.hasChildNodes()) {
                domainConfig.setNumericMinValue(StringEscapeUtils.unescapeXml(item.getFirstChild().getNodeValue()));
            }
            if (item.getNodeName().equals("maxvalue") && item.hasChildNodes()) {
                domainConfig.setNumericMaxValue(StringEscapeUtils.unescapeXml(item.getFirstChild().getNodeValue()));
            }
        }
        return domainConfig;
    }
View Full Code Here

TOP

Related Classes of org.jboss.dashboard.domain.DomainConfiguration

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.