public PropertyDescriptor[] getPropertyDescriptors(Object source) throws IntrospectionException { return ognlUtil.getPropertyDescriptors(source); } }
public void setProperties(Map<String, ?> props, Object o, Map<String, Object> context) { ognlUtil.setProperties(props, o, context); }
public void copy(Object from, Object to, Map<String, Object> context) { copy(from, to, context, null, null); }
@Inject public void setOgnlUtil(OgnlUtil ognlUtil) { this.ognlUtil = ognlUtil; securityMemberAccess.setExcludedClasses(ognlUtil.getExcludedClasses()); securityMemberAccess.setExcludedPackageNamePatterns(ognlUtil.getExcludedPackageNamePatterns()); securityMemberAccess.setExcludedPackageNames(ognlUtil.getExcludedPackageNames()); securityMemberAccess.setDisallowProxyMemberAccess(ognlUtil.isDisallowProxyMemberAccess()); }
/** * Sets the properties on the object using the default context. * * @param properties the property map to set on the object * @param o the object to set the properties into * @param throwPropertyExceptions boolean which tells whether it should throw exceptions for * problems setting the properties */ public void setProperties(Map<String, ?> properties, Object o, boolean throwPropertyExceptions) { Map context = createDefaultContext(o, null); setProperties(properties, o, context, throwPropertyExceptions); }
public ErrorMessageBuilder errorSettingExpressionWithValue(String expr, Object value) { appenExpression(expr); if (value instanceof Object[]) { appendValueAsArray((Object[]) value, message); } else { appendValue(value); } return this; }
protected Map createDefaultContext(Object root) { return createDefaultContext(root, null); }
public Object getValue(final String name, final Map<String, Object> context, final Object root, final Class resultType) throws OgnlException { return compileAndExecute(name, context, new OgnlTask<Object>() { public Object execute(Object tree) throws OgnlException { return Ognl.getValue(tree, context, root, resultType); } }); }
/** /** * @see com.opensymphony.xwork2.util.ValueStack#setValue(java.lang.String, java.lang.Object) */ public void setValue(String expr, Object value) { setValue(expr, value, devMode); }
/** * @see com.opensymphony.xwork2.util.ValueStack#findString(java.lang.String) */ public String findString(String expr) { return (String) findValue(expr, String.class); }
private Object tryFindValueWhenExpressionIsNotNull(String expr) throws OgnlException { if (expr == null) { return null; } return tryFindValue(expr); }
public Object callMethod(final String name, final Map<String, Object> context, final Object root) throws OgnlException { return compileAndExecuteMethod(name, context, new OgnlTask<Object>() { public Object execute(Object tree) throws OgnlException { return Ognl.getValue(tree, context, root); } }); }
public void setProperties(Map<String, ?> props, Object o, Map<String, Object> context, boolean throwPropertyExceptions) throws ReflectionException{ ognlUtil.setProperties(props, o, context, throwPropertyExceptions); }
public PropertyDescriptor[] getPropertyDescriptors(Object source) throws IntrospectionException { return ognlUtil.getPropertyDescriptors(source); } }
/** * Copies the properties in the object "from" and sets them in the object "to" * using specified type converter, or {@link com.opensymphony.xwork2.conversion.impl.XWorkConverter} if none * is specified. * * @param from the source object * @param to the target object * @param context the action context we're running under */ public void copy(Object from, Object to, Map<String, Object> context) { copy(from, to, context, null, null); }
public Object compile(String expression, Map<String, Object> context) throws OgnlException { return compileAndExecute(expression,context,new OgnlTask<Object>() { public Object execute(Object tree) throws OgnlException { return tree; } }); }
public void setProperties(Map<String, ?> properties, Object o) { setProperties(properties, o, false); }
public Object getValue(final String name, final Map<String, Object> context, final Object root) throws OgnlException { return compileAndExecute(name, context, new OgnlTask<Object>() { public Object execute(Object tree) throws OgnlException { return Ognl.getValue(tree, context, root); } }); }
public void setProperties(Map<String, ?> properties, Object o) { ognlUtil.setProperties(properties, o); }
/** * Sets the properties on the object using the default context, defaulting to not throwing * exceptions for problems setting the properties. * * @param properties * @param o */ public void setProperties(Map<String, ?> properties, Object o) { setProperties(properties, o, false); }