use of com.genexus.internet.HttpContext in project JavaClasses by genexuslabs.
the class GXWebGrid method SetWrapped.
public void SetWrapped(int wrapped) {
HttpContext httpContext = (HttpContext) this.context.getHttpContext();
this.wrapped = (wrapped == 1);
if (!this.wrapped) {
this.wrapped = httpContext.drawGridsAtServer();
}
if (!this.wrapped) {
this.wrapped = httpContext.getWrapped();
}
httpContext.setWrapped(this.wrapped);
}
use of com.genexus.internet.HttpContext in project JavaClasses by genexuslabs.
the class GXWebObjectBase method CheckCmpSecurityAccess.
protected boolean CheckCmpSecurityAccess() {
boolean[] flag = new boolean[] { false };
boolean[] permissionFlag = new boolean[] { false };
String permissionPrefix = IntegratedSecurityPermissionPrefix();
com.genexus.internet.HttpRequest req = ((HttpContext) ModelContext.getModelContext().getHttpContext()).getHttpRequest();
if (req == null)
return false;
String reqUrl = req.getRequestURL();
ModelContext modelContext = ModelContext.getModelContext(getClass());
if (IntegratedSecurityLevel() == SECURITY_LOW || IntegratedSecurityLevel() == SECURITY_GXOBJECT) {
GXSecurityProvider.getInstance().checksession(-2, modelContext, reqUrl, permissionFlag);
}
if (IntegratedSecurityLevel() != SECURITY_LOW && IntegratedSecurityLevel() != SECURITY_GXOBJECT) {
GXSecurityProvider.getInstance().checksessionprm(-2, modelContext, reqUrl, permissionPrefix, flag, permissionFlag);
}
return permissionFlag[0];
}
use of com.genexus.internet.HttpContext in project JavaClasses by genexuslabs.
the class BlobsCleaner method getCurrentSession.
private WebSession getCurrentSession() {
WebSession session = null;
com.genexus.internet.HttpContext webContext = (HttpContext) com.genexus.ModelContext.getModelContext().getHttpContext();
if ((webContext != null) && (webContext instanceof com.genexus.webpanels.HttpContextWeb)) {
session = webContext.getWebSession();
setCurrentSessionInUse(session);
}
return session;
}
use of com.genexus.internet.HttpContext in project JavaClasses by genexuslabs.
the class GXStaticWebPanel method createFile.
protected void createFile(String fileName) {
try {
visitedLinks.put(fileName, "");
((HttpContext) context.getHttpContext()).setOutputStream(new BufferedOutputStream(new FileOutputStream(fileName)));
addMessage("Creating " + fileName + "...");
this.fileName = fileName;
} catch (IOException e) {
throw new RuntimeException(e.getMessage());
}
}
use of com.genexus.internet.HttpContext in project JavaClasses by genexuslabs.
the class WebWrapper method setSource.
public void setSource(GXWebPanel panel) {
this.panel = panel;
ModelContext context = panel.getModelContext();
HttpRequest httpReq = ((HttpContext) context.getHttpContext()).getHttpRequest();
IHttpServletRequest httpSerReq = ((HttpContext) context.getHttpContext()).getRequest();
context.setHttpContext(new HttpContextNull());
((HttpContext) context.getHttpContext()).setHttpRequest(httpReq);
((HttpContext) context.getHttpContext()).setRequest(httpSerReq);
((HttpContext) context.getHttpContext()).setContext(context);
panel.setHttpContext(((HttpContext) context.getHttpContext()));
panel.getHttpContext().setCompression(false);
panel.getHttpContext().setBuffered(false);
panel.getHttpContext().useUtf8 = true;
panel.getHttpContext().setOutputStream(new java.io.ByteArrayOutputStream());
}
Aggregations