public void init() { if (seedpath != null) { seed = bma.getBeanValue(seedpath, seed, null); } }
public boolean containsKey(Object key) { Object child = bma.getBeanValue((String) key, seed, null); return child != null; }
public Object getBean(String beanpath) { return bma.getBeanValue(beanpath, beanlocator, null); }
private void validatePath(String viewID, ViewParameters viewparams, String path) { try { bma.getBeanValue(path, viewparams, null); } catch (Exception e) { reportError(": path " + path + " is not readable for exemplar reported for view with ID " + viewID, viewID, viewparams, e); } }
public Object get(Object key) { Object child = bma.getBeanValue((String) key, seed, null); return wrapChild(child); }
public void saveAll() { if (sebl.saveEL != null) { String penultimate = PathUtil.getToTailPath(sebl.saveEL); String savemethod = PathUtil.getTailPath(sebl.saveEL); Object saver = sebl.bma.getBeanValue(penultimate, beanlocator, null); for (Iterator it = delivered.keySet().iterator(); it.hasNext();) { String key = (String) it.next(); Object value = delivered.get(key); sebl.reflectivecache.invokeMethod(saver, savemethod, new Object[] { value }); } } }
public int preserveImmediate(BeanLocator source, StringList beannames, String tokenid) { HashMap beans = new HashMap(); for (int i = 0; i < beannames.size(); ++i) { String beanname = beannames.stringAt(i); Object bean = alterer.getBeanValue(beanname, source, null); // This branch generally useful for entity bean locators if (bean instanceof IterableBeanLocator) { IterableBeanLocator iterablebean = (IterableBeanLocator) bean; for (Iterator beanit = iterablebean.iterator(); beanit.hasNext(); ) { String subbeanname = (String) beanit.next(); Object subbean = iterablebean.locateBean(subbeanname); String fullpath = PathUtil.buildPath(beanname, subbeanname); beans.put(fullpath, subbean); } } if (bean != null) { beans.put(beanname, bean); Logger.log.info("BeanCopy preserved to path " + beanname + ": " + bean); } } String token = basekey + tokenid; holder.putTokenState(token, beans); Logger.log.info("BeanCopy saved " + beans.size() + " beans to token " + token); return beans.size(); }
public int preserveImmediate(BeanLocator source, StringList beannames, String tokenid) { int cbeans = 0; for (int i = 0; i < beannames.size(); ++i) { String beanname = beannames.stringAt(i); String targetkey = haskeys ? beanname : targetkeys.stringAt(i); Object bean = alterer.getBeanValue(beanname, source, null); if (bean != null) { holder.putTokenState(targetkey, bean); ++cbeans; Logger.log .info("BeanCopy preserved to path " + targetkey + ": " + bean); } } return cbeans; }
public DataAlterationRequest reshapeDAR(DataAlterationRequest toshape) { if (toshape.type.equals(DataAlterationRequest.ADD)) { String cutback = PathUtil.getToTailPath(toshape.path); // cutback may be null! so examine methods of cutback2. This MUST // be a concrete object!! String cutback2 = PathUtil.getToTailPath(cutback); String membername = PathUtil.getTailPath(cutback); Object lastentity = bma.getBeanValue(cutback2, rbl, addressibleBeanModel); MethodAnalyser ma = mappingcontext.getAnalyser(lastentity.getClass()); AccessMethod sam = ma.getAccessMethod(membername); String entityname = eni.getEntityName(sam.getDeclaredType()); if (entityname == null) { String message = "ID Defunnelling reshaper could not infer entity name for entity of type " + sam.getDeclaredType() + " - make sure to supply an EntityNameInferrer for this type"; Logger.log.warn(message); throw new IllegalArgumentException(message); } Object newentity = null; if (toshape.data != null) { // data has already been conformed in type to "oldvalue" and so is at least scalar String newentitypath = PathUtil.buildPath(entityname, (String)toshape.data); newentity = bma.getBeanValue(newentitypath, rbl, addressibleBeanModel); } DataAlterationRequest togo = new DataAlterationRequest(cutback, newentity); return togo; } else { return toshape; } }
renderer = alterer.getBeanValue(((ELReference) renderer).value, beanlocator, null); if (bound != null && bound.darreshaper == null) {
Object reshapero = null; if (sve.reshaperbinding != null) { reshapero = darapplier.getBeanValue(sve.reshaperbinding, rbl, addressibleBeanModel);
guard = darapplier.getBeanValue(guardEL, rbl, null); if (guard == null) { throw new IllegalArgumentException("null value found for guard EL path " + guardEL); guard = ((ValidatorGetter)guard).get(); Object guarded = darapplier.getBeanValue(match, rbl, null); try { if (guard instanceof RunnableInvoker) {
public void validate(Object obj, Errors errors) { boolean failed = false; for (int i = 0; i < vals.length; ++i) { if (i > 0 && failed && vals[i].getPriority() > vals[i - 1].getPriority()) { break; } String offsetpath = vals[i].getOffsetPath(); if (offsetpath != null) { Object offset = beanModelAlterer .getBeanValue(offsetpath, obj, null); errors.pushNestedPath(offsetpath); try { int oldcount = errors.getErrorCount(); vals[i].validate(offset, errors); boolean thisfail = errors.getErrorCount() > oldcount; failed = failed | thisfail; } finally { errors.popNestedPath(); } } else { vals[i].validate(obj, errors); } } } };
if (toprocess.markup instanceof ELReference) { ELReference ref = (ELReference) toprocess.markup; toprocess.markup = alterer.getBeanValue(ref.value, beanlocator, null);