org.camunda.bpm.cockpit.rest.dto
Class AbstractRestQueryParametersDto<T>

java.lang.Object
  extended by org.camunda.bpm.engine.impl.db.ListQueryParameterObject
      extended by org.camunda.bpm.cockpit.db.QueryParameters<T>
          extended by 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<T>

Author:
roman.smirnov
See Also:
Serialized Form

Field Summary
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
 
Fields inherited from class org.camunda.bpm.engine.impl.db.ListQueryParameterObject
authCheck, databaseType, firstResult, maxResults, orderingProperties, parameter, tenantCheck
 
Constructor Summary
AbstractRestQueryParametersDto()
           
AbstractRestQueryParametersDto(javax.ws.rs.core.MultivaluedMap<String,String> queryParameters)
           
 
Method Summary
 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 a CamundaQueryParam with a value that matches the key parameter.
protected  boolean sortOptionsValid()
           
 
Methods inherited from class org.camunda.bpm.cockpit.db.QueryParameters
isHistoryEnabled, 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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
Constructor Detail

AbstractRestQueryParametersDto

public AbstractRestQueryParametersDto()

AbstractRestQueryParametersDto

public AbstractRestQueryParametersDto(javax.ws.rs.core.MultivaluedMap<String,String> queryParameters)
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. 


getOrderByValue

protected abstract String getOrderByValue(String sortBy)

isValidSortByValue

protected abstract boolean isValidSortByValue(String value)

resolveVariableValue

protected Object resolveVariableValue(Object value)

setValueBasedOnAnnotation

protected void setValueBasedOnAnnotation(String key,
                                         String value)
Finds the methods that are annotated with a CamundaQueryParam with a value that matches the key parameter. Before invoking these methods, the annotated StringToTypeConverter 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)


Copyright © 2018 camunda services GmbH. All rights reserved.