Package io.jmix.core.impl.method
Class BeanArgumentResolver
java.lang.Object
io.jmix.core.impl.method.BeanArgumentResolver
- All Implemented Interfaces:
MethodArgumentResolver
@Component("core_BeanArgumentResolver")
public class BeanArgumentResolver
extends Object
implements MethodArgumentResolver
Allows resolving the current
Locale as method argument.
Current user session locale will be returned if user is authorized otherwise will be returned default system locale-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.springframework.context.ApplicationContext -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionresolveArgument(org.springframework.core.MethodParameter parameter) Resolves a method parameter into an argument value.booleansupportsParameter(org.springframework.core.MethodParameter parameter) Whether the given method parameter is supported by this resolver.
-
Field Details
-
applicationContext
@Autowired protected org.springframework.context.ApplicationContext applicationContext
-
-
Constructor Details
-
BeanArgumentResolver
public BeanArgumentResolver()
-
-
Method Details
-
supportsParameter
public boolean supportsParameter(org.springframework.core.MethodParameter parameter) Description copied from interface:MethodArgumentResolverWhether the given method parameter is supported by this resolver.- Specified by:
supportsParameterin interfaceMethodArgumentResolver- Parameters:
parameter- the method parameter to check- Returns:
trueif this resolver supports the supplied parameter;falseotherwise
-
resolveArgument
Description copied from interface:MethodArgumentResolverResolves a method parameter into an argument value.- Specified by:
resolveArgumentin interfaceMethodArgumentResolver- Parameters:
parameter- the method parameter to resolve. This parameter must have previously been passed toMethodArgumentResolver.supportsParameter(org.springframework.core.MethodParameter)which must have returnedtrue.- Returns:
- the resolved argument value, or
nullif not resolvable
-