Search in sources :

Example 1 with PentahoHttpSession

use of org.pentaho.platform.web.http.session.PentahoHttpSession in project pentaho-platform by pentaho.

the class HttpSessionPentahoSessionIntegrationFilter method generatePentahoSession.

protected IPentahoSession generatePentahoSession(final HttpServletRequest httpRequest) {
    HttpSession httpSession = httpRequest.getSession(false);
    IPentahoSession pentahoSession = null;
    if (httpSession != null) {
        pentahoSession = new PentahoHttpSession(null, httpSession, httpRequest.getLocale(), null);
    } else {
        pentahoSession = new NoDestroyStandaloneSession(null);
    }
    if (callSetAuthenticatedForAnonymousUsers) {
        pentahoSession.setAuthenticated(getAnonymousUser());
    }
    ITempFileDeleter deleter = PentahoSystem.get(ITempFileDeleter.class, pentahoSession);
    if (deleter != null) {
        pentahoSession.setAttribute(ITempFileDeleter.DELETER_SESSION_VARIABLE, deleter);
    }
    return pentahoSession;
}
Also used : ITempFileDeleter(org.pentaho.platform.api.util.ITempFileDeleter) HttpSession(javax.servlet.http.HttpSession) PentahoHttpSession(org.pentaho.platform.web.http.session.PentahoHttpSession) IPentahoSession(org.pentaho.platform.api.engine.IPentahoSession) PentahoHttpSession(org.pentaho.platform.web.http.session.PentahoHttpSession)

Aggregations

HttpSession (javax.servlet.http.HttpSession)1 IPentahoSession (org.pentaho.platform.api.engine.IPentahoSession)1 ITempFileDeleter (org.pentaho.platform.api.util.ITempFileDeleter)1 PentahoHttpSession (org.pentaho.platform.web.http.session.PentahoHttpSession)1