case GATEWAYREQUESTLOG: reportId = "16"; break;
case ACHSETTLEMENT: reportId = "17"; break;
case ACHRETURN: reportId = "18"; break;
case TRIDENTBATCH: reportId = "19"; break;
default:
throw new MesRuntimeException("Report type unsupported: "+request.getType());
}
requestString.append("&dsReportId=").append(reportId);
String reportMode = null;
switch (request.getMode())
{
case SUMMARY: reportMode = "0"; break;
case DETAIL: reportMode = "1"; break;
default:
throw new MesRuntimeException("Report mode unsupported: " + request.getType());
}
requestString.append("&reportType=").append(reportMode);
for(Map.Entry<String, String> pair : request.requestTable.entrySet()) {
try {
requestString = requestString.append("&").append(pair.getKey()).append("=").append(URLEncoder.encode(pair.getValue(), "UTF-8"));
} catch (UnsupportedEncodingException e) {
throw new MesRuntimeException("Unable to URL Encode the following value: "+pair.getValue());
}
}
return requestString.toString();
}