Package org.olat.core.dispatcher.mapper

Examples of org.olat.core.dispatcher.mapper.MapperRegistry


       */
      if (pathInfo.startsWith(PATH_MAPPED)) {
        // Session specic file mappers, can't be cached by browser since invalid in next user session.
        // mapped paths (per usersession) -> /m/...
        //TODO:FG: cachable mappers that are user session specific (e.g. course resources)
        MapperRegistry mreg = MapperRegistry.getInstanceFor( UserSession.getUserSession(request) );
         
         // OLAT-5368: an intermediate commit is necessary here to close open transactions which could otherwise
         // run into the 2 min timeout and cause errors. The code does a return after serving the file anyway
         // and would do a commit right there as well - so this doesn't break the transaction semantics.
         DBFactory.getInstance(false).intermediateCommit();
        
        mreg.execute(request, response, subtractContextPath(request, pathInfo));
        return;
      } else if (pathInfo.startsWith(PATH_GLOBAL_MAPPED)) {
        // Dynamic files that can be cached by browsers based on last modified
        // date, but are dynamically created by the application
        gmr.execute(request, response, subtractContextPath(request, pathInfo));
View Full Code Here


          mr = ese.getResultingMediaResource();
          Tracing.logDebug("ExternalSiteEvent is accepted", HtmlStaticPageComponent.class);
          checkRegular = false;
        } else {
          // it is a html page with olatraw parameter => redirect to mapper
          MapperRegistry mapperRegistry = MapperRegistry.getInstanceFor(ureq.getUserSession());
          Mapper mapper = createMapper(rootContainer);
          // NOTE: do not deregister this mapper, since it could be used a lot later (since it is opened in a new browser window)
          String amapPath = mapperRegistry.register(mapper);

          ese.setResultingMediaResource(new RedirectMediaResource(amapPath+"/"+moduleURI));
          Tracing.logDebug("RedirectMediaResource=" + amapPath+"/"+moduleURI, HtmlStaticPageComponent.class);
          ese.accept();
          mr = ese.getResultingMediaResource();
View Full Code Here

TOP

Related Classes of org.olat.core.dispatcher.mapper.MapperRegistry

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.