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
Modifier and TypeFieldDescriptionprotected org.springframework.context.ApplicationContext
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionresolveArgument
(org.springframework.core.MethodParameter parameter) Resolves a method parameter into an argument value.boolean
supportsParameter
(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:MethodArgumentResolver
Whether the given method parameter is supported by this resolver.- Specified by:
supportsParameter
in interfaceMethodArgumentResolver
- Parameters:
parameter
- the method parameter to check- Returns:
true
if this resolver supports the supplied parameter;false
otherwise
-
resolveArgument
Description copied from interface:MethodArgumentResolver
Resolves a method parameter into an argument value.- Specified by:
resolveArgument
in 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
null
if not resolvable
-