Package org.camunda.bpm.cockpit.rest.dto
Class AbstractRestQueryParametersDto<T>
- java.lang.Object
-
- org.camunda.bpm.engine.impl.db.ListQueryParameterObject
-
- org.camunda.bpm.cockpit.db.QueryParameters
-
- org.camunda.bpm.cockpit.rest.dto.AbstractRestQueryParametersDto<T>
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
AbstractProcessInstanceQueryDto
,IncidentQueryDto
,ProcessDefinitionQueryDto
public abstract class AbstractRestQueryParametersDto<T> extends QueryParameters
- Author:
- roman.smirnov
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected static String
DEFAULT_ORDER
protected com.fasterxml.jackson.databind.ObjectMapper
objectMapper
protected static String
SORT_ORDER_ASC_VALUE
protected static String
SORT_ORDER_DESC_VALUE
protected String
sortBy
protected String
sortOrder
-
Fields inherited from class org.camunda.bpm.cockpit.db.QueryParameters
historyEnabled, maxResultsLimitEnabled
-
Fields inherited from class org.camunda.bpm.engine.impl.db.ListQueryParameterObject
authCheck, databaseType, firstResult, maxResults, orderingProperties, parameter, tenantCheck
-
-
Constructor Summary
Constructors Constructor Description AbstractRestQueryParametersDto()
AbstractRestQueryParametersDto(javax.ws.rs.core.MultivaluedMap<String,String> queryParameters)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description String
getInternalOrderBy()
String
getOrderBy()
Deprecated.protected abstract String
getOrderByValue(String sortBy)
protected abstract boolean
isValidSortByValue(String value)
protected Object
resolveVariableValue(Object value)
void
setObjectMapper(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
void
setSortBy(String sortBy)
void
setSortOrder(String sortOrder)
protected void
setValueBasedOnAnnotation(String key, String value)
Finds the methods that are annotated with aCamundaQueryParam
with a value that matches the key parameter.protected boolean
sortOptionsValid()
-
Methods inherited from class org.camunda.bpm.cockpit.db.QueryParameters
disableMaxResultsLimit, isHistoryEnabled, isMaxResultsLimitEnabled, setHistoryEnabled
-
Methods inherited from class org.camunda.bpm.engine.impl.db.ListQueryParameterObject
getAuthCheck, getDatabaseType, getFirstResult, getFirstRow, getLastRow, getMaxResults, getOrderingProperties, getParameter, getTenantCheck, setAuthCheck, setDatabaseType, setFirstResult, setMaxResults, setOrderingProperties, setParameter, setTenantCheck
-
-
-
-
Field Detail
-
DEFAULT_ORDER
protected static final String DEFAULT_ORDER
- See Also:
- Constant Field Values
-
SORT_ORDER_ASC_VALUE
protected static final String SORT_ORDER_ASC_VALUE
- See Also:
- Constant Field Values
-
SORT_ORDER_DESC_VALUE
protected static final String SORT_ORDER_DESC_VALUE
- See Also:
- Constant Field Values
-
sortBy
protected String sortBy
-
sortOrder
protected String sortOrder
-
objectMapper
protected com.fasterxml.jackson.databind.ObjectMapper objectMapper
-
-
Method Detail
-
setSortBy
public void setSortBy(String sortBy)
-
setSortOrder
public void setSortOrder(String sortOrder)
-
sortOptionsValid
protected boolean sortOptionsValid()
-
getInternalOrderBy
public String getInternalOrderBy()
-
getOrderBy
@Deprecated public String getOrderBy()
Deprecated.
-
isValidSortByValue
protected abstract boolean isValidSortByValue(String value)
-
setValueBasedOnAnnotation
protected void setValueBasedOnAnnotation(String key, String value)
Finds the methods that are annotated with aCamundaQueryParam
with a value that matches the key parameter. Before invoking these methods, the annotatedStringToTypeConverter
is used to convert the String value to the desired Java type.- Parameters:
key
-value
-
-
setObjectMapper
public void setObjectMapper(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
-