// send it to the parent window (e.g. an excel download, but could also be a 302 redirect)
// if the browser has e.g. pdf configured to be displayed inline, we want it to fill the whole area (self window), not the hidden iframe.
// the same for 302.
// -> send a command which offers a new location for the main window.
// create a mapper which maps this mediaresource, and serves it once only
MediaResourceMapper extMRM = new MediaResourceMapper();
extMRM.setMediaResource(mmr);
//FIXME:fj:b deregister old mapper, or reuse current one
String res = MapperRegistry.getInstanceFor(ureq.getUserSession()).register(extMRM)+"/";
// e.g. res = /olat/m/10001/
Command rmrcom = CommandFactory.createParentRedirectForExternalResource(res);
wbackofficeImpl.sendCommandTo(rmrcom);