Examples of DateSpecifics


Examples of org.rhq.core.clientapi.util.units.DateFormatter.DateSpecifics

        if (!showTime.booleanValue()) {
            key += ".dateonly";
        }

        String formatString = RequestUtils.message((HttpServletRequest) pageContext.getRequest(), key);
        DateSpecifics specs = new DateSpecifics();
        specs.setDateFormat(new SimpleDateFormat(formatString));
        FormattedNumber fmtd = UnitsFormat.format(new UnitNumber(date.doubleValue(), unit, ScaleConstants.SCALE_MILLI),
            pageContext.getRequest().getLocale(), specs);
        return fmtd.toString();
    }
View Full Code Here

Examples of org.rhq.core.clientapi.util.units.DateFormatter.DateSpecifics

                    // a certain way (hopefully in a way that some descendant of java.test.Format will
                    // help with)
                    String fmtString = msgs.getMessage(userLocale, Constants.UNIT_FORMAT_PREFIX_KEY
                        + metricDisplaySummary.getUnits());
                    if (metricDisplaySummary.getUnits().equals(MeasurementUnits.EPOCH_MILLISECONDS.name())) {
                        DateSpecifics dateSpecifics = new DateSpecifics();
                        dateSpecifics.setDateFormat(new SimpleDateFormat(fmtString, userLocale));

                        // TODO jmarques - figure out how to add dateSpecifics in here
                        formattedValues = getMeasurementValueAndUnits(metricDisplaySummary.getMetricValueDoubles(),
                            metricDisplaySummary.getUnits());
                        // dateSpecifics);
View Full Code Here

Examples of org.rhq.core.clientapi.util.units.DateFormatter.DateSpecifics

            if ((alerts != null) && (alerts.size() > 0)) {
                for (Alert alert : alerts) {
                    String link = feed.getBaseUrl() + "/alerts/Alerts.do?mode=viewAlert&id="
                        + alert.getAlertDefinition().getResource().getId() + "&a=" + alert.getId();

                    DateSpecifics specs = new DateSpecifics();
                    specs.setDateFormat(new SimpleDateFormat(res.getMessage(Constants.UNIT_FORMAT_PREFIX_KEY
                        + "epoch-millis")));

                    FormattedNumber fmtd = UnitsFormat.format(new UnitNumber(alert.getCtime(),
                        UnitsConstants.UNIT_DATE, ScaleConstants.SCALE_MILLI), request.getLocale(), specs);
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.