public final void processService(final CRBinaryRequestBuilder reqBuilder,
final Map<String, Resolvable> wrappedObjectsToDeploy, final OutputStream stream,
final IResponseTypeSetter responsetypesetter) {
CRBinaryRequestBuilder myReqBuilder = reqBuilder;
CRResolvableBean crBean = null;
CRRequest req;
try {
req = myReqBuilder.getBinaryRequest();
//The StreamingBinaryContainer will
//not render velocity in the content
req.setDoVelocity(false);
// DEPLOY OBJECTS TO REQUEST
for (Iterator<Map.Entry<String, Resolvable>> i = wrappedObjectsToDeploy.entrySet().iterator(); i.hasNext();) {
Map.Entry<String, Resolvable> entry = (Entry<String, Resolvable>) i.next();
req.addObjectForFilterDeployment((String) entry.getKey(), entry.getValue());
}
if (this.crConf.usesContentidUrl()) {
if (req.getContentid() == null) {
Object obj = reqBuilder.getRequest();
if (obj instanceof HttpServletRequest) {
String[] reqURI = ((HttpServletRequest) obj).getRequestURI().split("/");
ArrayList<String> reqList = new ArrayList<String>(Arrays.asList(reqURI));
int index = reqList.indexOf(((HttpServletRequest) obj).getServletPath().replaceAll("/", ""));
if (reqList.size() >= index + 1) {
req.setRequestFilter("object.contentid==" + reqList.get(index + 1).toString());
}
}
}
}
req.setAttributeArray(new String[] { "mimetype" });
// load by url if no contentid
if (req.isUrlRequest()) {
crBean = rp.getBeanByURL(req);
} else {
crBean = rp.getFirstMatchingResolvable(req);
}
if (crBean != null) {