public boolean remove(String beanname) { if (sebl.removeEL == null) { throw new UnsupportedOperationException("Cannot implement removal from EntityBeanLocator without removeEL being set"); } // TODO: support the case where the fetch method signature accepts an object // rather than its ID Object togo = sebl.bma.invokeBeanMethod(PathUtil.composePath(sebl.removeEL, '\'' + beanname + '\''), beanlocator); delivered.remove(beanname); if (togo == null) return false; if (togo instanceof Boolean) { return ((Boolean)togo).booleanValue(); } return true; }
public Object locateBean(String name) { Object togo = delivered.get(name); if (togo == null) { if (name.startsWith(NEW_PREFIX)) { if (sebl.newEL != null) { togo = sebl.bma.invokeBeanMethod(sebl.newEL, beanlocator); } else { togo = sebl.reflectivecache.construct(sebl.entityClazz); } } else { togo = sebl.bma.invokeBeanMethod(PathUtil.composePath(sebl.fetchEL, '\'' + name + '\''), beanlocator); } delivered.put(name, togo); } return togo; }
public Object invokeAction(String actionbinding, String knownvalue) { if (!addressibleBeanModel.isMatch(actionbinding)) { throw UniversalRuntimeException.accumulate(new SecurityException(), "Action binding " + actionbinding + " is not permissible - make sure to mark this path as request addressible - http://www2.caret.cam.ac.uk/rsfwiki/Wiki.jsp?page=RequestWriteableBean"); } ShellInfo shells = darapplier.fetchShells(actionbinding, rbl, true); int lastshell = shells.shells.length; for (int i = 0; i < lastshell; ++ i) { if (shells.shells[i] instanceof ActionTarget) { lastshell = i + 1; } } Object penultimatebean = shells.shells[lastshell - 1]; String actionname = shells.segments[lastshell - 1]; // The only ActionTarget in the world is FlowActionProxyBean, we are not // planning to keep it up if (penultimatebean instanceof ActionTarget) { Object returnvalue = ((ActionTarget) penultimatebean).invokeAction( actionname, knownvalue); return returnvalue; } else { return darapplier.invokeBeanMethod(shells, addressibleBeanModel); } }
if (methodBinding != null) { ShellInfo shells = bma.fetchShells(methodBinding, beanLocator, true); beanReturn = bma.invokeBeanMethod(shells, null);
if (methodBinding != null) { ShellInfo shells = bma.fetchShells(methodBinding, beanLocator, true); beanReturn = bma.invokeBeanMethod(shells, null);
try { if (guardmethod != null) { darapplier.invokeBeanMethod(guardmethod, guard);