Class SortRequestParameterResolver
- java.lang.Object
-
- org.bremersee.apiclient.webflux.contract.spring.SortRequestParameterResolver
-
- All Implemented Interfaces:
Function<Invocation,org.springframework.util.MultiValueMap<String,Object>>
,Predicate<InvocationParameter>
,QueryParametersResolver
- Direct Known Subclasses:
PageableRequestParameterResolver
public class SortRequestParameterResolver extends Object implements QueryParametersResolver, Predicate<InvocationParameter>
The sort request parameter resolver.- Author:
- Christian Bremer
-
-
Constructor Summary
Constructors Constructor Description SortRequestParameterResolver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.util.MultiValueMap<String,Object>
apply(Invocation invocation)
protected org.springframework.util.MultiValueMap<String,Object>
getRequestParameters(org.springframework.data.domain.Sort sort)
Gets request parameters.protected String
getRequestParamValue(org.springframework.data.domain.Sort.Order order)
Gets request param value.boolean
test(InvocationParameter invocationParameter)
SortRequestParameterResolver
withDescValue(String descValue)
With desc value.SortRequestParameterResolver
withRequestParamName(String requestParamName)
With request parameter name.SortRequestParameterResolver
withSeparatorValue(String separatorValue)
With separator value.
-
-
-
Method Detail
-
withRequestParamName
public SortRequestParameterResolver withRequestParamName(String requestParamName)
With request parameter name.- Parameters:
requestParamName
- the request param name- Returns:
- the sort request parameter resolver
-
withSeparatorValue
public SortRequestParameterResolver withSeparatorValue(String separatorValue)
With separator value.- Parameters:
separatorValue
- the separator value- Returns:
- the sort request parameter resolver
-
withDescValue
public SortRequestParameterResolver withDescValue(String descValue)
With desc value.- Parameters:
descValue
- the desc value- Returns:
- the sort request parameter resolver
-
apply
public org.springframework.util.MultiValueMap<String,Object> apply(Invocation invocation)
- Specified by:
apply
in interfaceFunction<Invocation,org.springframework.util.MultiValueMap<String,Object>>
-
test
public boolean test(InvocationParameter invocationParameter)
- Specified by:
test
in interfacePredicate<InvocationParameter>
-
getRequestParameters
protected org.springframework.util.MultiValueMap<String,Object> getRequestParameters(org.springframework.data.domain.Sort sort)
Gets request parameters.- Parameters:
sort
- the sort- Returns:
- the request parameters
-
getRequestParamValue
protected String getRequestParamValue(org.springframework.data.domain.Sort.Order order)
Gets request param value.- Parameters:
order
- the order- Returns:
- the request param value
-
-