Class TranslationMessageServiceSecurity
- java.lang.Object
-
- org.cyclos.impl.AbstractServerComponent
-
- org.cyclos.impl.AbstractNetworkedServerComponent
-
- org.cyclos.security.BaseServiceSecurity
-
- org.cyclos.security.contentmanagement.TranslationMessageServiceSecurity
-
- All Implemented Interfaces:
TranslationMessageService,Service
@Security public class TranslationMessageServiceSecurity extends BaseServiceSecurity implements TranslationMessageService
Security forTranslationMessageService
-
-
Field Summary
-
Fields inherited from class org.cyclos.impl.AbstractNetworkedServerComponent
authHandler, conversionHandler, customFieldValueHandler, entityManagerHandler, groupsHandler, productsHandler, restBeanPropertyMapping, userLocatorHandler
-
Fields inherited from class org.cyclos.impl.AbstractServerComponent
accountHandler, configurationHandler, dataTranslationHandler, notificationHandler, profileFieldHandler, transactionHandler, translationHandler
-
-
Constructor Summary
Constructors Constructor Description TranslationMessageServiceSecurity()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcheckManage(Language language)voidcheckView(Language language)ApplicationTranslationDatagetApplicationTranslationData(LanguageVO languageVO)Gets data for translations for the given languagePropertiesgetCustomizedKeysPerLanguage(LanguageVO languageVO)Returns all customized keys for the given language, in form of aPropertiesobjectTranslationKeyDatagetTranslationKeyData(BasicTranslationKeyDTO key)Returns data for the given translation keybooleanhasPermissionToTranslate(Language language)List<LanguageDetailedVO>listTranslatableLanguages()List the languages the current user can translateprotected EntityCheck<?>resolveEntityCheck()Must be implemented in order to return theEntityCheckmanaged by this security component, or null if nonevoidrestoreOriginalTranslation(BasicTranslationKeyDTO key)Reverts any changes on the given keyvoidsaveKey(TranslationKeyDTO key)Save a customized keyPage<TranslationKeyVO>searchKeys(TranslationQuery params)Searches for translation keysvoidsetCustomizedKeysPerLanguage(SetCustomizedTranslationsDTO params)Set the customized keys for a language-
Methods inherited from class org.cyclos.security.BaseServiceSecurity
checkGuest, checkId, checkIds, checkInternalName, checkLoggedIn, checkManagesUser, checkRelatesToUser, checkScope, checkVO, checkVOs, doInitialize, getEntityCheckRegistry, getUser, initialize
-
Methods inherited from class org.cyclos.impl.AbstractNetworkedServerComponent
canManage, checkManagesUser, checkPermission, checkRelatesToUser, checkValue, clearAlreadyValidated, getBaseEntityManagerHandler, getConfiguration, getLoggedBasicUser, getLoggedUser, getProducts, getTranslatedName, getTranslatedValue, hasPermission, hasValue, inSameNetwork, inSameNetworkOrGlobal, isAdmin, isAlreadyValidated, isBroker, isGlobalAdmin, isGlobalAdminInNetwork, isGuest, isLoggedIn, isMember, isMemberOnly, isNetworkAdmin, isOperator, isRelatedToUser, isSystem, isUserManager, isUserManagerOf, message, message, permission, permission, permissionOptionalValue, permissionOptionalValue, toDate, toDateTime, validate
-
Methods inherited from class org.cyclos.impl.AbstractServerComponent
dataTranslationProxy, delete, detach, find, flush, from, getApplicationContext, getFormatter, getFormatter, getFormatter, getLogger, getRemoteAddress, getSessionData, mailContentBuilder, message, message, persist, processBatch, processBatch, refresh, remove, selectFrom, subQuery, update
-
-
-
-
Method Detail
-
checkManage
public void checkManage(Language language)
-
checkView
public void checkView(Language language)
-
getApplicationTranslationData
public ApplicationTranslationData getApplicationTranslationData(LanguageVO languageVO)
Description copied from interface:TranslationMessageServiceGets data for translations for the given language- Specified by:
getApplicationTranslationDatain interfaceTranslationMessageService
-
getCustomizedKeysPerLanguage
public Properties getCustomizedKeysPerLanguage(LanguageVO languageVO)
Description copied from interface:TranslationMessageServiceReturns all customized keys for the given language, in form of aPropertiesobject- Specified by:
getCustomizedKeysPerLanguagein interfaceTranslationMessageService
-
getTranslationKeyData
public TranslationKeyData getTranslationKeyData(BasicTranslationKeyDTO key) throws FrameworkException
Description copied from interface:TranslationMessageServiceReturns data for the given translation key- Specified by:
getTranslationKeyDatain interfaceTranslationMessageService- Throws:
FrameworkException
-
hasPermissionToTranslate
public boolean hasPermissionToTranslate(Language language)
-
listTranslatableLanguages
public List<LanguageDetailedVO> listTranslatableLanguages()
Description copied from interface:TranslationMessageServiceList the languages the current user can translate- Specified by:
listTranslatableLanguagesin interfaceTranslationMessageService
-
restoreOriginalTranslation
public void restoreOriginalTranslation(BasicTranslationKeyDTO key) throws FrameworkException
Description copied from interface:TranslationMessageServiceReverts any changes on the given key- Specified by:
restoreOriginalTranslationin interfaceTranslationMessageService- Throws:
FrameworkException
-
saveKey
public void saveKey(TranslationKeyDTO key) throws FrameworkException
Description copied from interface:TranslationMessageServiceSave a customized key- Specified by:
saveKeyin interfaceTranslationMessageService- Throws:
FrameworkException
-
searchKeys
public Page<TranslationKeyVO> searchKeys(TranslationQuery params)
Description copied from interface:TranslationMessageServiceSearches for translation keys- Specified by:
searchKeysin interfaceTranslationMessageService
-
setCustomizedKeysPerLanguage
public void setCustomizedKeysPerLanguage(SetCustomizedTranslationsDTO params) throws FrameworkException
Description copied from interface:TranslationMessageServiceSet the customized keys for a language- Specified by:
setCustomizedKeysPerLanguagein interfaceTranslationMessageService- Throws:
FrameworkException
-
resolveEntityCheck
protected EntityCheck<?> resolveEntityCheck()
Description copied from class:BaseServiceSecurityMust be implemented in order to return theEntityCheckmanaged by this security component, or null if none- Specified by:
resolveEntityCheckin classBaseServiceSecurity
-
-