private String updateDQPContext(SessionMetadata s) { String sessionID = s.getSessionId(); DQPWorkContext workContext = DQPWorkContext.getWorkContext(); workContext.setSession(s); return sessionID; }
private DQPWorkContext createWorkContext(final CommandContext context, VDBMetaData vdb) { SessionMetadata session = createTemporarySession(context.getUserName(), "asynch-mat-view-load", vdb); // $NON-NLS-1$ session.setSubject(context.getSubject()); session.setSecurityDomain(context.getSession().getSecurityDomain()); session.setSecurityContext(context.getSession().getSecurityContext()); DQPWorkContext workContext = new DQPWorkContext(); workContext.setAdmin(true); DQPWorkContext current = context.getDQPWorkContext(); workContext.setSession(session); workContext.setPolicies(current.getAllowedDataPolicies()); workContext.setSecurityHelper(current.getSecurityHelper()); return workContext; }