public ScriptSession get() { WebContext webcx = WebContextFactory.get(); return webcx.getScriptSession(); }
public Object getInstance() throws InstantiationException { // fills for the first time the moduleConfig ActionForm formInstance = (ActionForm) WebContextFactory.get().getSession().getAttribute(formBean); if (formInstance == null) { throw new InstantiationException("Can't find formInstance for " + formBean); } return formInstance; }
public HttpServletRequest get() { WebContext webcx = WebContextFactory.get(); return webcx.getHttpServletRequest(); }
@Override public HttpSession get() { return WebContextFactory.get().getSession(); }
@SuppressWarnings({"unchecked"}) public Map<String, String[]> get() { WebContext webcx = WebContextFactory.get(); return webcx.getHttpServletRequest().getParameterMap(); }
@Override public ScriptSession get() { return WebContextFactory.get().getScriptSession(); }
public HttpServletResponse get() { WebContext webcx = WebContextFactory.get(); return webcx.getHttpServletResponse(); }
public HttpSession get() { WebContext webcx = WebContextFactory.get(); return webcx.getSession(); }
@Override public HttpServletRequest get() { return WebContextFactory.get().getHttpServletRequest(); }
/** * Call {@link ScriptSession#invalidate()} on the {@link ScriptSession} * that called this method. * Used by the page unloader. */ public void pageUnloaded() { WebContext wctx = WebContextFactory.get(); ScriptSession scriptSession = wctx.getScriptSession(); log.debug("pageUnloaded is invalidating scriptSession: " + scriptSession); scriptSession.invalidate(); }
public String getPathToDwrServlet(String contextServletPath) { String actualPath = contextServletPath; if (useAbsolutePath) { HttpServletRequest request = WebContextFactory.get().getHttpServletRequest(); actualPath = LocalUtil.getFullUrlToDwrServlet(request); } return actualPath; }
public String addFileTransfer(FileTransfer generator) throws IOException { String id = idGenerator.generate(); putFileTransfer(id, generator); HttpServletRequest request = WebContextFactory.get().getHttpServletRequest(); return "'" + request.getContextPath() + request.getServletPath() + downloadHandlerUrl + id + "'"; }
public void destroy() { WebContext webcx = WebContextFactory.get(); for(Creator c : creators.values()) { if (c.getScope().equals(Creator.APPLICATION)) { Object creatorInstance = webcx.getServletContext().getAttribute(c.getJavascript()); if (creatorInstance instanceof UninitializingBean) { ((UninitializingBean) creatorInstance).destroy(); } } } }
public Object convertInbound(Class<?> paramType, InboundVariable data) throws ConversionException { if (data.isNull()) { return null; } ScriptSession session = WebContextFactory.get().getScriptSession(); String id = data.getValue(); DefaultJavascriptObject object = new DefaultJavascriptObject(session, id); return Proxy.newProxyInstance(paramType.getClassLoader(), new Class[] { paramType }, object); }
public Object convertInbound(Class<?> paramType, InboundVariable data) throws ConversionException { if (data.isNull()) { return null; } ScriptSession session = WebContextFactory.get().getScriptSession(); String id = data.getValue(); return new DefaultJavascriptFunction(session, id); }
public EntityDWR(){ WebContext ctx = WebContextFactory.get(); ServletContext sc= ctx.getServletContext(); entityWADao = ModelAccess.on(sc).getWebappDaoFactory().getIndividualDao(); }
public Object convertInbound(Class<?> paramType, InboundVariable data) throws ConversionException { if (data.isNull()) { return null; } ScriptSession session = WebContextFactory.get().getScriptSession(); String id = data.getValue(); return new DefaultJavascriptObject(session, id); }
private void initScriptSession() { WebContext webContext = WebContextFactory.get(); HttpServletRequest request = webContext.getHttpServletRequest(); ScriptSession currentSession = webContext.getScriptSession(); String host = request.getServerName(); RiotUser user = AccessController.getCurrentUser(); currentSession.setAttribute("host", host); currentSession.setAttribute("userId", user.getUserId()); }
public PropertyInstance getProperty(String subjectURI, String predicateURI, String objectURI) { WebContext ctx = WebContextFactory.get(); HttpServletRequest req = ctx.getHttpServletRequest(); VitroRequest vreq = new VitroRequest(req); WebappDaoFactory wdf = vreq.getUnfilteredWebappDaoFactory(); return wdf.getPropertyInstanceDao().getProperty(subjectURI, predicateURI, objectURI); }
public int deleteProp(String subjectUri, String predicateUri, String objectUri){ WebContext ctx = WebContextFactory.get(); HttpServletRequest req = ctx.getHttpServletRequest(); VitroRequest vreq = new VitroRequest(req); vreq.getUnfilteredWebappDaoFactory().getPropertyInstanceDao().deleteObjectPropertyStatement(subjectUri, predicateUri, objectUri); return 0; }