Package com.smartgwt.client.data
Class RequestTransformer
java.lang.Object
com.smartgwt.client.data.RequestTransformer
The RequestTransformer provides the equivalent functionality of overriding
DataSource.transformRequest(DSRequest)
when
instantiating a DataSource on the client. However when obtaining a DataSource instance from the server using DataSource.getDataSource(java.lang.String)
, transformRequest(DSRequest)
and #transformResponse(DSResponse, DSRequest, Object)
cannot be overridden and so the requestTransformer parameter can be passed to DataSource.getDataSource(java.lang.String)
instead.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetDefaultTransformRequest
(DSRequest dsRequest) Return the result of the default transformed request.protected abstract Object
transformRequest
(DSRequest dsRequest) See the docs forDataSource.transformRequest(DSRequest)
.
-
Constructor Details
-
RequestTransformer
public RequestTransformer()
-
-
Method Details
-
transformRequest
See the docs forDataSource.transformRequest(DSRequest)
.- Parameters:
dsRequest
- the DSRequest being processed- Returns:
- data to be sent to the dataURL (JavaScriptObject, String or Record)
-
getDefaultTransformRequest
Return the result of the default transformed request.- Parameters:
dsRequest
- the request- Returns:
- the default transformed request
-