Class PreferenceVOMapper
java.lang.Object
org.openwms.core.preferences.PreferenceVOMapper
- Direct Known Subclasses:
PreferenceVOMapperImpl
A PreferenceVOMapper maps between
Preference (domain) and PreferenceVO (API VO).- Author:
- Heiko Scherrer
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate <T extends PreferenceVO>
TfillVO(T p, Preference source) <T extends PreferenceVO>
PropertyScoperesolveScope(T preference) Resolves thePropertyScopeof the given VO through thePropertyScopesregistry.voidsetPropertyScopes(PropertyScopes propertyScopes) toDomain(PreferenceVO source) toMO(Preference source) toModuleVO(Preference source) toModuleVOList(Collection<Preference> sources) toRoleVO(Preference source) toRoleVOList(Collection<Preference> sources) toUserVO(Preference source) toUserVOList(Collection<Preference> sources) toVO(Preference source) toVOList(Collection<Preference> sources)
-
Field Details
-
propertyScopes
-
-
Constructor Details
-
PreferenceVOMapper
public PreferenceVOMapper()
-
-
Method Details
-
setPropertyScopes
-
resolveScope
Resolves thePropertyScopeof the given VO through thePropertyScopesregistry. The four typed VO subclasses map onto the built-in scope names; a basePreferenceVOcarries a custom scope by name. In both cases the scope must be registered: if the consumer excluded a built-in scope from its registrar, the corresponding typed VO is rejected consistently with the generic endpoints.- Type Parameters:
T- the VO type- Parameters:
preference- the VO to resolve the scope for- Returns:
- the resolved PropertyScope
- Throws:
IllegalArgumentException- if the VO carries no scope name or an unregistered one
-
toVO
-
toUserVO
-
toRoleVO
-
toModuleVO
-
fillVO
-
toVOList
-
toUserVOList
-
toRoleVOList
-
toModuleVOList
-
toDomain
-
toMO
-