|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.broadleafcommerce.common.i18n.service.TranslationServiceImpl
@Service(value="blTranslationService") public class TranslationServiceImpl
| Field Summary | |
|---|---|
protected net.sf.ehcache.Cache |
cache
|
protected TranslationDao |
dao
|
protected static org.apache.commons.logging.Log |
LOG
|
| Constructor Summary | |
|---|---|
TranslationServiceImpl()
|
|
| Method Summary | |
|---|---|
void |
deleteTranslationById(Long translationId)
Deletes the given translations |
protected net.sf.ehcache.Cache |
getCache()
|
protected String |
getCacheKey(TranslatedEntity entityType,
String entityId,
String property,
String localeCode)
|
protected String |
getEntityId(Object entity,
TranslatedEntity entityType)
|
protected TranslatedEntity |
getEntityType(Class<?> entityClass)
|
protected TranslatedEntity |
getEntityType(Object entity)
|
protected TranslatedEntity |
getEntityType(String className)
|
String |
getTranslatedValue(Object entity,
String property,
Locale locale)
Returns the translated value of the property for the given entity. |
Translation |
getTranslation(TranslatedEntity entity,
String entityId,
String fieldName,
String localeCode)
Attempts to find the translation object for the given parameters |
List<Translation> |
getTranslations(String ceilingEntityClassname,
String entityId,
String property)
Finds all current translations for the specified field |
Translation |
save(String entityType,
String entityId,
String fieldName,
String localeCode,
String translatedValue)
Creates a new translation object for the requested parameters, saves it, and returns the saved instance. |
Translation |
save(Translation translation)
Persists the given translation |
Translation |
update(Long translationId,
String localeCode,
String translatedValue)
Updates the given translation id with the new locale code and translated value |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final org.apache.commons.logging.Log LOG
protected TranslationDao dao
protected net.sf.ehcache.Cache cache
| Constructor Detail |
|---|
public TranslationServiceImpl()
| Method Detail |
|---|
@Transactional(value="blTransactionManager") public Translation save(Translation translation)
TranslationService
save in interface TranslationService
@Transactional(value="blTransactionManager")
public Translation save(String entityType,
String entityId,
String fieldName,
String localeCode,
String translatedValue)
TranslationService
save in interface TranslationService
@Transactional(value="blTransactionManager")
public Translation update(Long translationId,
String localeCode,
String translatedValue)
TranslationService
update in interface TranslationService@Transactional(value="blTransactionManager") public void deleteTranslationById(Long translationId)
TranslationService
deleteTranslationById in interface TranslationService
public Translation getTranslation(TranslatedEntity entity,
String entityId,
String fieldName,
String localeCode)
TranslationService
getTranslation in interface TranslationService
public List<Translation> getTranslations(String ceilingEntityClassname,
String entityId,
String property)
TranslationService
getTranslations in interface TranslationService
public String getTranslatedValue(Object entity,
String property,
Locale locale)
TranslationService
getTranslatedValue in interface TranslationServiceprotected TranslatedEntity getEntityType(Class<?> entityClass)
protected TranslatedEntity getEntityType(Object entity)
protected TranslatedEntity getEntityType(String className)
protected String getEntityId(Object entity,
TranslatedEntity entityType)
protected String getCacheKey(TranslatedEntity entityType,
String entityId,
String property,
String localeCode)
protected net.sf.ehcache.Cache getCache()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||