Class DefaultEnumerationService
java.lang.Object
de.hybris.platform.servicelayer.internal.service.AbstractService
de.hybris.platform.enumeration.impl.DefaultEnumerationService
- All Implemented Interfaces:
EnumerationService,Serializable,org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanNameAware,org.springframework.beans.factory.InitializingBean
Default implementation of
EnumerationService- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class de.hybris.platform.servicelayer.internal.service.AbstractService
AbstractService.SerializableDTO -
Field Summary
Fields inherited from class de.hybris.platform.servicelayer.internal.service.AbstractService
tenant -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetEnumerationName(HybrisEnumValue enumValue) Provides name for enumeration value (in the current language).getEnumerationName(HybrisEnumValue enumValue, Locale locale) Provides name for enumeration value using the given locale.<T extends HybrisEnumValue>
TgetEnumerationValue(Class<T> enumClass, String valueCode) Returns the Enumeration with matching given enumeration class and value.<T extends HybrisEnumValue>
TgetEnumerationValue(String enumerationCode, String valueCode) Returns the Enumeration with matching given enumeration code and value.<T extends HybrisEnumValue>
List<T>getEnumerationValues(Class<T> enumClass) Returns all Enumerations for given enumeration class.<T extends HybrisEnumValue>
List<T>getEnumerationValues(String enumerationCode) Returns all Enumerations with matching given enumeration code.voidsetEnumerationName(HybrisEnumValue enumValue, String name) Changes name for enumeration value (in the current language).voidsetEnumerationName(HybrisEnumValue enumValue, String name, Locale locale) Changes name for enumeration value using the given locale.voidsetModelService(ModelService modelService) voidsetTypeService(TypeService typeService) Methods inherited from class de.hybris.platform.servicelayer.internal.service.AbstractService
afterPropertiesSet, getCurrentTenant, setBeanName, setCurrentTenant, writeReplace
-
Constructor Details
-
DefaultEnumerationService
public DefaultEnumerationService()
-
-
Method Details
-
getEnumerationValues
Returns all Enumerations with matching given enumeration code.- Specified by:
getEnumerationValuesin interfaceEnumerationService- Parameters:
enumerationCode- the code of the Enumeration type, e.g. ArticleApprovalStatus.- Returns:
- List of
HybrisEnumValue
-
getEnumerationValues
Description copied from interface:EnumerationServiceReturns all Enumerations for given enumeration class.- Specified by:
getEnumerationValuesin interfaceEnumerationService- Parameters:
enumClass- the enumeration class, e.g. ArticleApprovalStatus. This can either be fixed or dynamic enumeration class.- Returns:
- List of
HybrisEnumValue
-
getEnumerationValue
Returns the Enumeration with matching given enumeration code and value.- Specified by:
getEnumerationValuein interfaceEnumerationService- Parameters:
enumerationCode- the code of the Enumeration type, e.g. ArticleApprovalStatus.valueCode- the value code of the Enumeration item, e.g. check, approval, etc...- Returns:
- Enumeration value as
HybrisEnumValueimplementation
-
getEnumerationValue
Description copied from interface:EnumerationServiceReturns the Enumeration with matching given enumeration class and value.- Specified by:
getEnumerationValuein interfaceEnumerationService- Parameters:
enumClass- the enumeration class, e.g. ArticleApprovalStatus. This can either be fixed or dynamic enumeration class.valueCode- the value code of the Enumeration item, e.g. check, approval, etc...- Returns:
- Enumeration value as
HybrisEnumValueimplementation
-
getEnumerationName
Provides name for enumeration value (in the current language).- Specified by:
getEnumerationNamein interfaceEnumerationService- Parameters:
enumValue- the value- Returns:
- the enum localized name
-
setEnumerationName
Changes name for enumeration value (in the current language).- Specified by:
setEnumerationNamein interfaceEnumerationService- Parameters:
enumValue- the valuename- the new name
-
setTypeService
-
setModelService
-
getEnumerationName
Provides name for enumeration value using the given locale.- Specified by:
getEnumerationNamein interfaceEnumerationService- Parameters:
enumValue- the valuelocale- the locale to match- Returns:
- the enum localized name
-
setEnumerationName
Changes name for enumeration value using the given locale.- Specified by:
setEnumerationNamein interfaceEnumerationService- Parameters:
enumValue- the valuename- the new namelocale- the locale to match
-