else
{
requestParameters.put(WebappConfig.QUERY_PARAM, query.trim());
}
final RequestModel requestModel;
try
{
// Build model for this request
requestModel = new RequestModel(webappConfig);
requestModel.modern = UserAgentUtils.isModernBrowser(request);
// Request type is normally bound to the model, but we need to know
// the type before binding to choose the unknown values resolution strategy
final String requestType = (String)requestParameters.get(WebappConfig.TYPE_PARAM);
final AttributeBinder.AttributeBinderActionBind attributeBinderActionBind =
new AttributeBinder.AttributeBinderActionBind(
requestParameters,
true,
AttributeBinder.AttributeTransformerFromString.INSTANCE,
RequestType.CARROT2DOCUMENTS.name().equals(requestType) ?
unknownToDefaultTransformerWithMaxResults :
unknownToDefaultTransformer);
AttributeBinder.bind(requestModel,
new AttributeBinder.IAttributeBinderAction []
{
attributeBinderActionBind
}, Input.class);
requestModel.afterParametersBound(attributeBinderActionBind.remainingValues,
extractCookies(request));
}
catch (Exception e)
{
logger.info("Skipping, could not map/bind request model attributes: "