Examples of AuraLocaleImpl


Examples of org.auraframework.impl.util.AuraLocaleImpl

        // check for nulls - this happens when AuraContextFilter has not been
        // run
        if (context != null) {
            List<Locale> locales = context.getRequestedLocales();
            if (locales != null && locales.size() > 0) {
                return new AuraLocaleImpl(locales.get(0));
            }
        }
        return new AuraLocaleImpl();
    }
View Full Code Here

Examples of org.auraframework.impl.util.AuraLocaleImpl

        return new AuraLocaleImpl();
    }

    @Override
    public AuraLocale getAuraLocale(Locale defaultLocale) {
        return new AuraLocaleImpl(defaultLocale);
    }
View Full Code Here

Examples of org.auraframework.impl.util.AuraLocaleImpl

        return new AuraLocaleImpl(defaultLocale);
    }

    @Override
    public AuraLocale getAuraLocale(Locale defaultLocale, TimeZone timeZone) {
        return new AuraLocaleImpl(defaultLocale, timeZone);
    }
View Full Code Here

Examples of org.auraframework.impl.util.AuraLocaleImpl

    }

    @Override
    public AuraLocale getAuraLocale(Locale defaultLocale, Locale currencyLocale, Locale dateLocale,
            Locale languageLocale, Locale numberLocale, Locale systemLocale, TimeZone timeZone) {
        return new AuraLocaleImpl(defaultLocale, currencyLocale, dateLocale, languageLocale, numberLocale,
                systemLocale, timeZone);
    }
View Full Code Here

Examples of org.auraframework.impl.util.AuraLocaleImpl

        // verify the converter returns a valid value...
        BigDecimal correctDecimal = new BigDecimal("123456.789");
        Integer correctInteger = new Integer(123);

        // ...for unstyled ints in default Locale
        Integer anInteger = JavaLocalizedTypeUtil.convert("123", Integer.class, false, new AuraLocaleImpl());
        assertNotNull("String to Integer with Locale was null", anInteger);
        assertEquals("String to Integer with Locale was wrong", correctInteger, anInteger);

        // ...for US format decimals
        BigDecimal usDecimal = JavaLocalizedTypeUtil.convert("123,456.789", BigDecimal.class, false,
                new AuraLocaleImpl(Locale.US));
        assertNotNull("U.S. localized String to BigDecimal was null", usDecimal);
        assertEquals("U.S. localized String to BigDecimal problem", correctDecimal, usDecimal);

        // ...for de_DE format decimals
        BigDecimal deDecimal = JavaLocalizedTypeUtil.convert("123.456,789", BigDecimal.class, false,
                new AuraLocaleImpl(Locale.GERMANY));
        assertNotNull("German localized String to BigDecimal was null", deDecimal);
        assertEquals("German localized String to BigDecimal problem", correctDecimal, deDecimal);

        // ...for fr format decimals
        BigDecimal frDecimal = JavaLocalizedTypeUtil.convert("123456,789", BigDecimal.class, false, new AuraLocaleImpl(
                Locale.FRANCE));
        assertNotNull("France localized String to BigDecimal was null", frDecimal);
        assertEquals("France localized String to BigDecimal problem", correctDecimal, frDecimal);
    }
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.