private ELResolver createElResolver() { CompositeELResolver compositeResolver = new CompositeELResolver(); compositeResolver.add(new ArrayELResolver()); compositeResolver.add(new ListELResolver()); compositeResolver.add(new MapELResolver()); compositeResolver.add(new JsonNodeELResolver()); compositeResolver.add(new ResourceBundleELResolver()); compositeResolver.add(new DynamicBeanPropertyELResolver(ItemInstance.class, "getFieldValue", "setFieldValue")); compositeResolver.add(new BeanELResolver()); return new SimpleResolver(compositeResolver); }
context.setPropertyResolved(base, property); int index = toInteger (property); if (index >= 0 && index < Array.getLength(base)) { return Array.get(base, index);
public boolean isReadOnly(ELContext context, Object base, Object property) throws NullPointerException, PropertyNotFoundException, ELException { if (context == null) { throw new NullPointerException(); } if (base != null && base.getClass().isArray()) { context.setPropertyResolved(true); int idx = coerce(property); checkBounds(base, idx); } return this.readOnly; }
@Override public Object getValue(ELContext context, Object base, Object property) { Objects.requireNonNull(context); if (base != null && base.getClass().isArray()) { context.setPropertyResolved(base, property); int idx = coerce(property); if (idx < 0 || idx >= Array.getLength(base)) { return null; } return Array.get(base, idx); } return null; }
public void setValue(ELContext context, Object base, Object property, Object value) throws NullPointerException, PropertyNotFoundException, PropertyNotWritableException, ELException { if (context == null) { throw new NullPointerException(); } if (base != null && base.getClass().isArray()) { context.setPropertyResolved(true); if (this.readOnly) { throw new PropertyNotWritableException(message(context, "resolverNotWriteable", new Object[] { base.getClass() .getName() })); } int idx = coerce(property); checkBounds(base, idx); Array.set(base, idx, value); } }
public boolean isReadOnly(ELContext context, Object base, Object property) throws NullPointerException, PropertyNotFoundException, ELException { if (context == null) { throw new NullPointerException(); } if (base != null && base.getClass().isArray()) { context.setPropertyResolved(true); int idx = coerce(property); checkBounds(base, idx); } return this.readOnly; }
@Override public Object getValue(ELContext context, Object base, Object property) { Objects.requireNonNull(context); if (base != null && base.getClass().isArray()) { context.setPropertyResolved(base, property); int idx = coerce(property); if (idx < 0 || idx >= Array.getLength(base)) { return null; } return Array.get(base, idx); } return null; }
public void setValue(ELContext context, Object base, Object property, Object value) throws NullPointerException, PropertyNotFoundException, PropertyNotWritableException, ELException { if (context == null) { throw new NullPointerException(); } if (base != null && base.getClass().isArray()) { context.setPropertyResolved(true); if (this.readOnly) { throw new PropertyNotWritableException(message(context, "resolverNotWriteable", new Object[] { base.getClass() .getName() })); } int idx = coerce(property); checkBounds(base, idx); Array.set(base, idx, value); } }
@Override protected ELResolver createElResolver(VariableScope variableScope) { CompositeELResolver compositeElResolver = new CompositeELResolver(); compositeElResolver.add(new VariableScopeElResolver(variableScope)); compositeElResolver.add(new MockElResolver()); compositeElResolver.add(new ArrayELResolver()); compositeElResolver.add(new ListELResolver()); compositeElResolver.add(new MapELResolver()); compositeElResolver.add(new BeanELResolver()); return compositeElResolver; }
context.setPropertyResolved(true); int index = toInteger (property); if (index < 0 || index >= Array.getLength(base)) { throw new PropertyNotFoundException();
public boolean isReadOnly(ELContext context, Object base, Object property) throws NullPointerException, PropertyNotFoundException, ELException { if (context == null) { throw new NullPointerException(); } if (base != null && base.getClass().isArray()) { context.setPropertyResolved(true); int idx = coerce(property); checkBounds(base, idx); } return this.readOnly; }
@Override public Object getValue(ELContext context, Object base, Object property) { if (context == null) { throw new NullPointerException(); } if (base != null && base.getClass().isArray()) { context.setPropertyResolved(base, property); int idx = coerce(property); if (idx < 0 || idx >= Array.getLength(base)) { return null; } return Array.get(base, idx); } return null; }
@Override public void setValue(ELContext context, Object base, Object property, Object value) throws NullPointerException, PropertyNotFoundException, PropertyNotWritableException, ELException { if (context == null) { throw new NullPointerException(); } if (base != null && base.getClass().isArray()) { context.setPropertyResolved(true); if (this.readOnly) { throw new PropertyNotWritableException(message(context, "resolverNotWriteable", new Object[] { base.getClass() .getName() })); } int idx = coerce(property); checkBounds(base, idx); if (value != null && !base.getClass().getComponentType().isAssignableFrom( value.getClass())) { throw new ClassCastException(message(context, "objectNotAssignable", new Object[] {value.getClass().getName(), base.getClass().getComponentType().getName()})); } Array.set(base, idx, value); } }
@Override protected ELResolver createElResolver(VariableScope variableScope) { CompositeELResolver compositeElResolver = new CompositeELResolver(); compositeElResolver.add(new VariableScopeElResolver(variableScope)); if (beans != null) { // Only expose limited set of beans in expressions compositeElResolver.add(new ReadOnlyMapELResolver(beans)); } else { // Expose full application-context in expressions compositeElResolver.add(new ApplicationContextElResolver(applicationContext)); } compositeElResolver.add(new ArrayELResolver()); compositeElResolver.add(new ListELResolver()); compositeElResolver.add(new MapELResolver()); compositeElResolver.add(new JsonNodeELResolver()); compositeElResolver.add(new BeanELResolver()); return compositeElResolver; }
context.setPropertyResolved(true); int index = toInteger (property); if (index < 0 || index >= Array.getLength(base)) { throw new PropertyNotFoundException();
public boolean isReadOnly(ELContext context, Object base, Object property) throws NullPointerException, PropertyNotFoundException, ELException { if (context == null) { throw new NullPointerException(); } if (base != null && base.getClass().isArray()) { context.setPropertyResolved(true); int idx = coerce(property); checkBounds(base, idx); } return this.readOnly; }
public Object getValue(ELContext context, Object base, Object property) throws NullPointerException, PropertyNotFoundException, ELException { if (context == null) { throw new NullPointerException(); } if (base != null && base.getClass().isArray()) { context.setPropertyResolved(true); int idx = coerce(property); if (idx < 0 || idx >= Array.getLength(base)) { return null; } else { return Array.get(base, idx); } } return null; }
public void setValue(ELContext context, Object base, Object property, Object value) throws NullPointerException, PropertyNotFoundException, PropertyNotWritableException, ELException { if (context == null) { throw new NullPointerException(); } if (base != null && base.getClass().isArray()) { context.setPropertyResolved(true); if (this.readOnly) { throw new PropertyNotWritableException(message(context, "resolverNotWriteable", new Object[] { base.getClass() .getName() })); } int idx = coerce(property); checkBounds(base, idx); try { Array.set(base, idx, value); } catch (IllegalArgumentException e) { ClassCastException ex = new ClassCastException(e.getMessage()); ex.initCause(e); throw ex; } } }
protected ELResolver createElResolver(VariableScope variableScope) { CompositeELResolver elResolver = new CompositeELResolver(); elResolver.add(new VariableScopeElResolver(variableScope)); if (beans != null) { // ACT-1102: Also expose all beans in configuration when using // standalone activiti, not // in spring-context elResolver.add(new ReadOnlyMapELResolver(beans)); } elResolver.add(new ArrayELResolver()); elResolver.add(new ListELResolver()); elResolver.add(new MapELResolver()); elResolver.add(new JsonNodeELResolver()); elResolver.add(new DynamicBeanPropertyELResolver(ItemInstance.class, "getFieldValue", "setFieldValue")); // TODO: needs verification elResolver.add(new BeanELResolver()); return elResolver; }
context.setPropertyResolved(base, property); if (isReadOnly) { throw new PropertyNotWritableException(); throw new ClassCastException(); int index = toInteger (property); if (index < 0 || index >= Array.getLength(base)) { throw new PropertyNotFoundException();