Package com.tll.server

Examples of com.tll.server.AdminContext


          throw new ServletException("Unable to obtain the persist context");
        }
        final IUserService userService = pc.getEntityServiceFactory().instance(IUserService.class);
        final User user = (User) userService.loadUserByUsername(appContext.getDfltUserEmail());
        log.debug("Creating mock admin context from default user email specified in config..");
        final AdminContext ac = new AdminContext();
        ac.setUser(user);
        session.setAttribute(AdminContext.KEY, ac);
        log.info("Server-side admin context created and stored in the servlet context");
      }
    }
    finally {
View Full Code Here


    // create an AdminContext for this servlet session
    log.debug("Creating admin context from acegi security context..");
    final User user = (User) SecurityContextHolder.getContext().getAuthentication().getPrincipal();
    assert user != null;
    final AdminContext ac = new AdminContext();
    ac.setUser(user);
    request.getSession(false).setAttribute(AdminContext.KEY, ac);
  }
View Full Code Here

TOP

Related Classes of com.tll.server.AdminContext

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.