Package com.atlassian.jira.util
Class OrderByRequestParserImpl
java.lang.Object
com.atlassian.jira.util.OrderByRequestParserImpl
- All Implemented Interfaces:
OrderByRequestParser
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T extends Enum<T>>
io.atlassian.fugue.Either<ErrorCollection, OrderByRequest<T>> Parses a string representing an order by request into theOrderByRequestobject.
-
Constructor Details
-
OrderByRequestParserImpl
-
-
Method Details
-
parse
public <T extends Enum<T>> io.atlassian.fugue.Either<ErrorCollection,OrderByRequest<T>> parse(String orderByValue, Class<T> fields) Description copied from interface:OrderByRequestParserParses a string representing an order by request into theOrderByRequestobject. Works only if field type of the expected order by request is an enum. Expected representation is as follows:- name
- order by name ascending
- +name
- order by name ascending
- -name
- order by name ascending
Parsing is case insensitive so the above example will succeed if there is a
NAMEvalue in the supplied enum type.- Specified by:
parsein interfaceOrderByRequestParser- Type Parameters:
T- enum type- Parameters:
orderByValue- value to parsefields- all available fields declared in an enum- Returns:
- parsed query or an error collection with a proper message
-