Examples of LocalizationService


Examples of org.apache.fulcrum.localization.LocalizationService

        GlobalCacheService dgcs = (GlobalCacheService)avalonComponentService.lookup(GlobalCacheService.ROLE);
        assertNotNull(dgcs);
        CryptoService cs = (CryptoService)avalonComponentService.lookup(CryptoService.ROLE);
        assertNotNull(cs);
        LocalizationService ls = (LocalizationService)avalonComponentService.lookup(LocalizationService.ROLE);
        assertNotNull(ls);
        IntakeService intake = (IntakeService)avalonComponentService.lookup(IntakeService.ROLE);
        assertNotNull(intake);
        FactoryService fs = (FactoryService)avalonComponentService.lookup(FactoryService.ROLE);
        assertNotNull(fs);
View Full Code Here

Examples of org.apache.fulcrum.localization.LocalizationService

        GlobalCacheService gcs = (GlobalCacheService)serviceManager.getService(GlobalCacheService.ROLE);
        assertNotNull(gcs);
        CryptoService cs = (CryptoService)serviceManager.getService(CryptoService.ROLE);
        assertNotNull(cs);
        LocalizationService ls = (LocalizationService)serviceManager.getService(LocalizationService.ROLE);
        assertNotNull(ls);
        IntakeService intake = (IntakeService)serviceManager.getService(IntakeService.ROLE);
        assertNotNull(intake);
        FactoryService fs = (FactoryService)serviceManager.getService(FactoryService.ROLE);
        assertNotNull(fs);
View Full Code Here

Examples of org.auraframework.service.LocalizationService

        }
        // should this be made accessible in the component?
        Locale loc = null;

        String format = (String) component.getAttributes().getValue("format");
        LocalizationService lclService = Aura.getLocalizationService();

        if (format == null) {
            String dateStyle = (String) component.getAttributes().getValue("dateStyle");
            String timeStyle = (String) component.getAttributes().getValue("timeStyle");
            DateService dateService = DateServiceImpl.get();
            int intDateStyle = dateService.getStyle(dateStyle);
            int intTimeStyle = dateService.getStyle(timeStyle);
            return lclService.formatDateTime(cal.getTime(), loc, tz, intDateStyle, intTimeStyle);
        } else {
            // no pattern, no result
            if (AuraTextUtil.isEmptyOrWhitespace(format)) {
                return "";
            } else {
                try {
                    return lclService.formatDateTime(cal.getTime(), loc, tz, format);
                } catch (IllegalArgumentException e) {
                    return "You must provide a valid format: " + e.getMessage();
                }
            }
View Full Code Here

Examples of org.auraframework.service.LocalizationService

        }
        // should this be made accessible in the component?
        Locale loc = null;

        String format = (String) component.getAttributes().getValue("format");
        LocalizationService lclService = Aura.getLocalizationService();

        if (format == null) {
            String dateStyle = (String) component.getAttributes().getValue("dateStyle");
            DateService dateService = DateServiceImpl.get();
            int intDateStyle = dateService.getStyle(dateStyle);
            return lclService.formatDate(date, loc, tz, intDateStyle);
        } else {
            // no pattern, no result
            if (AuraTextUtil.isEmptyOrWhitespace(format)) {
                return "";
            } else {
                try {
                    return lclService.formatDateTime(date, loc, tz, format);
                } catch (IllegalArgumentException e) {
                    return "You must provide a valid format: " + e.getMessage();
                }
            }
        }
View Full Code Here

Examples of org.eclipse.sapphire.modeling.localization.LocalizationService

        return (WizardPageDef) super.definition();
    }
   
    public String getLabel()
    {
        final LocalizationService localizationService = definition().adapt( LocalizationService.class );
        return localizationService.text( (String)this.labelFunctionResult.value(), CapitalizationType.TITLE_STYLE, false );
    }
View Full Code Here

Examples of org.eclipse.sapphire.modeling.localization.LocalizationService

        return localizationService.text( (String)this.labelFunctionResult.value(), CapitalizationType.TITLE_STYLE, false );
    }
   
    public String getDescription()
    {
        final LocalizationService localizationService = definition().adapt( LocalizationService.class );
        return localizationService.text( (String)this.descriptionFunctionResult.value(), CapitalizationType.NO_CAPS, false );
    }
View Full Code Here

Examples of org.eclipse.sapphire.modeling.localization.LocalizationService

                {
                    label = action.getLabel();
                }
            }
           
            final LocalizationService localizationService = this.definition.adapt( LocalizationService.class );
           
            return localizationService.text( label, capitalizationType, includeMnemonic );
        }

        return null;
    }
View Full Code Here

Examples of org.eclipse.sapphire.modeling.localization.LocalizationService

        return (WizardDef) super.definition();
    }
       
    public String getLabel()
    {
        final LocalizationService localizationService = definition().adapt( LocalizationService.class );
        return localizationService.text( (String) this.labelFunctionResult.value(), CapitalizationType.TITLE_STYLE, false );
    }
View Full Code Here

Examples of org.eclipse.sapphire.modeling.localization.LocalizationService

    public final LocalizationService getLocalizationService( final Locale locale )
    {
        synchronized( this.localizationServices )
        {
            LocalizationService service = this.localizationServices.get( locale );
           
            if( service == null )
            {
                service = initLocalizationService( locale );
               
View Full Code Here

Examples of org.eclipse.sapphire.modeling.localization.LocalizationService

    public final LocalizationService getLocalizationService( final Locale locale )
    {
        synchronized( this.localizationServices )
        {
            LocalizationService service = this.localizationServices.get( locale );
           
            if( service == null )
            {
                service = initLocalizationService( locale );
               
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.