@POST
 @Path("/session-variable")
 public Response setSessionVariable(
     @QueryParam("key") String key, @QueryParam("value") String value) {
   IPentahoSession session = getPentahoSession();
   session.setAttribute(key, value);
   return Response.ok(session.getAttribute(key)).build();
 }
 /** @throws Exception */
 @Before
 public void setUp() throws Exception {
   standaloneSession = new StandaloneSession("admin");
   standaloneSession.setAttribute("MONDRIAN_SCHEMA_XML_CONTENT", "<mock-schema></mock-schema>");
 }
예제 #3
0
 /**
  * Sets the java.security.principal object into the IPentahoSession object.
  *
  * @param principal The principal from the servlet context
  * @param session The users' IPentahoSession object
  */
 public static void setPrincipal(final Principal principal, final IPentahoSession session) {
   session.setAttribute(SecurityHelper.SESSION_PRINCIPAL, principal);
 }