Package org.broadleafcommerce.common.i18n.domain

Examples of org.broadleafcommerce.common.i18n.domain.TranslatedEntity


        Field entityType = new Field();
        entityType.setName("entityType");

        String ceilingEntity = form.getCeilingEntity();

        TranslatedEntity translatedEntity = TranslatedEntity.getInstance(ceilingEntity);
        if (translatedEntity == null && ceilingEntity.endsWith("Impl")) {
            int pos = ceilingEntity.lastIndexOf("Impl");
            ceilingEntity = ceilingEntity.substring(0, pos);
            translatedEntity = TranslatedEntity.getInstance(ceilingEntity);
        }
        entityType.setValue(translatedEntity.getFriendlyType());
        Field fieldName = new Field();
        fieldName.setName("fieldName");
        fieldName.setValue(form.getPropertyName());
        entityForm.getFields().put("entityType", entityType);
        entityForm.getFields().put("fieldName", fieldName);
View Full Code Here


   
    @Override
    @Transactional("blTransactionManager")
    public Translation save(String entityType, String entityId, String fieldName, String localeCode,
            String translatedValue) {
        TranslatedEntity te = getEntityType(entityType);
       
        Translation translation = getTranslation(te, entityId, fieldName, localeCode);
       
        if (translation == null) {
            translation = dao.create();
View Full Code Here

        return dao.readTranslation(entity, entityId, fieldName, localeCode);
    }
   
    @Override
    public List<Translation> getTranslations(String ceilingEntityClassname, String entityId, String property) {
        TranslatedEntity entityType = getEntityType(ceilingEntityClassname);
        return dao.readTranslations(entityType, entityId, property);
    }
View Full Code Here

    }
   
    @Override
    public String getTranslatedValue(Object entity, String property, Locale locale) {
        // Attempt to get a translated value for this property to override the default value
        TranslatedEntity entityType = getEntityType(entity);
        String entityId = getEntityId(entity, entityType);
       
        String localeCode = locale.getLanguage();
        String localeCountryCode = localeCode;
        if (StringUtils.isNotBlank(locale.getCountry())) {
View Full Code Here

TOP

Related Classes of org.broadleafcommerce.common.i18n.domain.TranslatedEntity

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.