public Object acceptWBL(WriteableBeanLocator toaccept) { toaccept.set("sakai-EntityView", view); return null; } });
public Object acceptWBL(WriteableBeanLocator toaccept) { toaccept.set("sakai-EntityView", view); return null; }}); }
public void set(String beanname, Object toset) { wbl.set(beanname, toset); }
public void setChildObject(Object parent, Object newchild) { ((WriteableBeanLocator)parent).set(propname, newchild); }
public static void copyBeans(Map source, WriteableBeanLocator target) { for (Iterator sit = source.keySet().iterator(); sit.hasNext();) { String name = (String) sit.next(); Object bean = source.get(name); target.set(name, bean); } }
public void setProperty(Object parent, String name, Object value) { if (!(parent instanceof WriteableBeanLocator)) { throw new AssertionException("Attempt to set non-writeable property " + name + " of BeanLocator"); } else ((WriteableBeanLocator) parent).set(name, value); }
public void set(String beanname, Object toset) { checkRootPath(beanname); wbl.set(beanname, toset); }
public Object getObject() throws Exception { WriteableBeanLocator wbl = RSACbeanlocator.getDeadBeanLocator(); if (wbl.locateBean(beanName) != null) { throw new IllegalStateException("Incorrect use of EntityBeanLocator detected. " + "This implementation is designed to work only with the RSACBeanLocator, " + "and must cause the delivered BeanLocator to be immediately cached " + "in the RSAC on first use per request"); } EntityBeanLocatorImpl togo = new EntityBeanLocatorImpl(this); wbl.set(beanName, togo); if (entityClazz == null) { Object newsample = togo.locateBean(EntityBeanLocator.NEW_PREFIX); entityClazz = newsample.getClass(); } return togo; }
public static void startServletRequest(HttpServletRequest request, HttpServletResponse response, RSACBeanLocator rsacbl, String factorybeanname) { // Logger.log.info("Got rsacbg " + rsacbl); if (!rsacbl.isStarted()) { rsacbl.startRequest(); } WriteableBeanLocator locator = rsacbl.getBeanLocator(); HttpServletFactory factory = (HttpServletFactory) locator.locateBean(factorybeanname); factory.setHttpServletRequest(request); factory.setHttpServletResponse(response); locator.set(factorybeanname, factory); // notify the "seed list" of the change. setRequestApplicationContext(request, locator); }
private RequestLauncher allocateRequestLauncher() { if (!isSingleShot()) { getRSACBeanLocator().startRequest(); } WriteableBeanLocator wbl = getRSACBeanLocator().getDeadBeanLocator(); RequestLauncher togo = new RequestLauncher(applicationContext, getRSACBeanLocator(), isSingleShot()); wbl.set("earlyRequestParser", togo); return togo; }
public void handleAccess(HttpServletRequest req, HttpServletResponse res, EntityReference reference, WBLAcceptor acceptor) { try { rsacbl.startRequest(); // A request bean locator just good for this request. WriteableBeanLocator rbl = rsacbl.getBeanLocator(); // inchuck entityReference rbl.set("sakai-EntityReference", reference.toString()); if (acceptor != null) { acceptor.acceptWBL(rbl); } RSACUtils.startServletRequest(wrapRequest(req), res, rsacbl, RSACUtils.HTTP_SERVLET_FACTORY); // pass the request to RSF. rbl.locateBean("rootHandlerBean"); } catch (Exception t) { // Access servlet performs no useful logging, do it here. Logger.log.error("Error handling access request", t); Throwable unwrapped = UniversalRuntimeException.unwrapException(t); if (unwrapped instanceof RuntimeException) { throw ((RuntimeException) unwrapped); } else throw UniversalRuntimeException.accumulate(unwrapped, "Error handling access request"); } finally { rsacbl.endRequest(); } }
public void handleAccess(HttpServletRequest req, HttpServletResponse res, EntityReference reference, WBLAcceptor acceptor) { try { rsacbl.startRequest(); // A request bean locator just good for this request. WriteableBeanLocator rbl = rsacbl.getBeanLocator(); // inchuck entityReference rbl.set("sakai-EntityReference", reference.toString()); if (acceptor != null) { acceptor.acceptWBL(rbl); } RSACUtils.startServletRequest(wrapRequest(req), res, rsacbl, RSACUtils.HTTP_SERVLET_FACTORY); // pass the request to RSF. rbl.locateBean("rootHandlerBean"); } catch (Exception t) { // Access servlet performs no useful logging, do it here. Logger.log.error("Error handling access request", t); Throwable unwrapped = UniversalRuntimeException.unwrapException(t); if (unwrapped instanceof RuntimeException) { throw ((RuntimeException) unwrapped); } else throw UniversalRuntimeException.accumulate(unwrapped, "Error handling access request"); } finally { rsacbl.endRequest(); } }