public Object locateBean(String path) { Object fetch = wbl.locateBean(path); if (fetch != null) { return fetch; } else { if (fallbackbeans == null) { fetchFallbacks(); } Object togo = tryLocateFallback(path); return togo; } }
public void init() { if (seedpath != null) { seed = bma.getBeanValue(seedpath, seed, null); } }
/** * Returns the very last path component of a bean path * * @param path bean path * @return last path segment */ public static String getTailPath(String path) { int lastdot = lastDotIndex(path); return getPathSegment(path, lastdot + 1); }
public Object acceptWBL(WriteableBeanLocator toaccept) { toaccept.set("sakai-EntityView", view); return null; } });
public void afterPropertiesSet() { for (int i = 0; i < beannames.length; ++ i) { beanlocator.locateBean(beannames[i]); } } }
/** The action method, after all bindings are complete, reads a collection * of EL paths. */ public void populate() { values = new Object[paths.length]; for (int i = 0; i < paths.length; ++ i) { values[i] = rbg.getBean(paths[i]); } }
/** * Builds an EL path of from an array of path segments. Particulary good when using * Strings of BeanLocators, Maps, and friends. Assumes none of the segments * have been escaped yet. * * @param segments array of paths * @return el path */ public static String buildPath(String[] segments) { return buildPath(segments, 0, segments.length); }
public CoreELReference(String value) { String stripped = BeanUtil.stripEL(value); this.value = stripped == null? value : stripped; } public String value;
public static CoreELReference make(String value) { return value == null? null : new CoreELReference(value); } }
public static String getHeadPath(String path) { return getPathSegment(path, 0); } /**
protected TargettedMessageList fetchMessages(RequestResponse response) { return (TargettedMessageList) response.requestContext.locateBean("targettedMessageList"); }
public boolean remove(String beanname) { return wbl.remove(beanname); }
public Object acceptWBL(WriteableBeanLocator toaccept) { toaccept.set("sakai-EntityView", view); return null; }}); }
public Object getChildObject(Object parent) { return ((BeanLocator)parent).locateBean(propname); }
public boolean containsKey(Object key) { Object child = bma.getBeanValue((String) key, seed, null); return child != null; }
/** Build an EL path which locates the referred-to entity **/ public String getELPath() { return PathUtil.buildPath(entity.entityname, entity.ID); }
public void set(String beanname, Object toset) { wbl.set(beanname, toset); }
public Object getProperty(Object parent, String name) { return ((BeanLocator) parent).locateBean(name); }
public Object getBean(String beanpath) { return bma.getBeanValue(beanpath, beanlocator, null); }
public void setChildObject(Object parent, Object newchild) { ((WriteableBeanLocator)parent).set(propname, newchild); }