Class TranslationServiceImpl
java.lang.Object
io.meeds.social.translation.service.TranslationServiceImpl
- All Implemented Interfaces:
io.meeds.social.translation.service.TranslationService
public class TranslationServiceImpl
extends Object
implements io.meeds.social.translation.service.TranslationService
-
Field Summary
Fields inherited from interface io.meeds.social.translation.service.TranslationService
TRANSLATION_DELETED_EVENT_NAME, TRANSLATION_SAVED_EVENT_NAME -
Constructor Summary
ConstructorsConstructorDescriptionTranslationServiceImpl(TranslationStorage translationStorage, org.exoplatform.services.resources.LocaleConfigService localeConfigService, org.exoplatform.services.listener.ListenerService listenerService) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPlugin(io.meeds.social.translation.plugin.TranslationPlugin translationPlugin) voiddeleteTranslationLabel(String objectType, long objectId, String fieldName, Locale locale) voiddeleteTranslationLabels(String objectType, long objectId) voiddeleteTranslationLabels(String objectType, long objectId, String username) getAllTranslationFields(String objectType, long objectId) getAllTranslationFields(String objectType, long objectId, String username) io.meeds.social.translation.model.TranslationFieldgetTranslationField(String objectType, long objectId, String fieldName) io.meeds.social.translation.model.TranslationFieldgetTranslationField(String objectType, long objectId, String fieldName, String username) getTranslationLabel(String objectType, long objectId, String fieldName, Locale locale) getTranslationLabelOrDefault(String objectType, long objectId, String fieldName, Locale locale) voidremovePlugin(String objectType) voidsaveTranslationLabel(String objectType, long objectId, String fieldName, Locale locale, String label) voidsaveTranslationLabels(String objectType, long objectId, String fieldName, Map<Locale, String> labels) voidsaveTranslationLabels(String objectType, long objectId, String fieldName, Map<Locale, String> labels, String username)
-
Constructor Details
-
TranslationServiceImpl
public TranslationServiceImpl(TranslationStorage translationStorage, org.exoplatform.services.resources.LocaleConfigService localeConfigService, org.exoplatform.services.listener.ListenerService listenerService)
-
-
Method Details
-
addPlugin
public void addPlugin(io.meeds.social.translation.plugin.TranslationPlugin translationPlugin) - Specified by:
addPluginin interfaceio.meeds.social.translation.service.TranslationService
-
removePlugin
- Specified by:
removePluginin interfaceio.meeds.social.translation.service.TranslationService
-
getTranslationField
public io.meeds.social.translation.model.TranslationField getTranslationField(String objectType, long objectId, String fieldName, String username) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException - Specified by:
getTranslationFieldin interfaceio.meeds.social.translation.service.TranslationService- Throws:
IllegalAccessExceptionorg.exoplatform.commons.exception.ObjectNotFoundException
-
getTranslationField
public io.meeds.social.translation.model.TranslationField getTranslationField(String objectType, long objectId, String fieldName) - Specified by:
getTranslationFieldin interfaceio.meeds.social.translation.service.TranslationService
-
getAllTranslationFields
public Map<String,io.meeds.social.translation.model.TranslationField> getAllTranslationFields(String objectType, long objectId, String username) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException - Specified by:
getAllTranslationFieldsin interfaceio.meeds.social.translation.service.TranslationService- Throws:
IllegalAccessExceptionorg.exoplatform.commons.exception.ObjectNotFoundException
-
getAllTranslationFields
public Map<String,io.meeds.social.translation.model.TranslationField> getAllTranslationFields(String objectType, long objectId) throws org.exoplatform.commons.exception.ObjectNotFoundException - Specified by:
getAllTranslationFieldsin interfaceio.meeds.social.translation.service.TranslationService- Throws:
org.exoplatform.commons.exception.ObjectNotFoundException
-
getTranslationLabel
public String getTranslationLabel(String objectType, long objectId, String fieldName, Locale locale) - Specified by:
getTranslationLabelin interfaceio.meeds.social.translation.service.TranslationService
-
getTranslationLabelOrDefault
public String getTranslationLabelOrDefault(String objectType, long objectId, String fieldName, Locale locale) - Specified by:
getTranslationLabelOrDefaultin interfaceio.meeds.social.translation.service.TranslationService
-
saveTranslationLabels
public void saveTranslationLabels(String objectType, long objectId, String fieldName, Map<Locale, String> labels, String username) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException- Specified by:
saveTranslationLabelsin interfaceio.meeds.social.translation.service.TranslationService- Throws:
IllegalAccessExceptionorg.exoplatform.commons.exception.ObjectNotFoundException
-
saveTranslationLabels
public void saveTranslationLabels(String objectType, long objectId, String fieldName, Map<Locale, String> labels) throws org.exoplatform.commons.exception.ObjectNotFoundException- Specified by:
saveTranslationLabelsin interfaceio.meeds.social.translation.service.TranslationService- Throws:
org.exoplatform.commons.exception.ObjectNotFoundException
-
saveTranslationLabel
public void saveTranslationLabel(String objectType, long objectId, String fieldName, Locale locale, String label) throws org.exoplatform.commons.exception.ObjectNotFoundException - Specified by:
saveTranslationLabelin interfaceio.meeds.social.translation.service.TranslationService- Throws:
org.exoplatform.commons.exception.ObjectNotFoundException
-
deleteTranslationLabels
public void deleteTranslationLabels(String objectType, long objectId, String username) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException - Specified by:
deleteTranslationLabelsin interfaceio.meeds.social.translation.service.TranslationService- Throws:
IllegalAccessExceptionorg.exoplatform.commons.exception.ObjectNotFoundException
-
deleteTranslationLabels
public void deleteTranslationLabels(String objectType, long objectId) throws org.exoplatform.commons.exception.ObjectNotFoundException - Specified by:
deleteTranslationLabelsin interfaceio.meeds.social.translation.service.TranslationService- Throws:
org.exoplatform.commons.exception.ObjectNotFoundException
-
deleteTranslationLabel
public void deleteTranslationLabel(String objectType, long objectId, String fieldName, Locale locale) throws org.exoplatform.commons.exception.ObjectNotFoundException - Specified by:
deleteTranslationLabelin interfaceio.meeds.social.translation.service.TranslationService- Throws:
org.exoplatform.commons.exception.ObjectNotFoundException
-