Package org.springframework.expression

Examples of org.springframework.expression.AccessException


  public boolean canWrite(EvaluationContext context, Object target, String name) throws AccessException {
    return false;
  }

  public void write(EvaluationContext context, Object target, String name, Object newValue) throws AccessException {
    throw new AccessException(name + " is a flow reserved word and cannot be set with an expression.");
  }
View Full Code Here


      }
      try {
        return this.variableResolver.resolveVariable(name);
      }
      catch (Exception ex) {
        throw new AccessException(
            "Unexpected exception occurred accessing '" + name + "' as an implicit variable", ex);
      }
    }
View Full Code Here

    return false;
  }

  @Override
  public void write(EvaluationContext context, Object target, String name, Object newValue) throws AccessException {
    throw new AccessException("Beans in a BeanFactory are read-only");
  }
View Full Code Here

    return false;
  }

  @Override
  public void write(EvaluationContext context, Object target, String name, Object newValue) throws AccessException {
    throw new AccessException("Beans in a BeanFactory are read-only");
  }
View Full Code Here

    public Object resolve(EvaluationContext context, String beanName)
        throws AccessException {
      if (beanName.equals("foo") || beanName.equals("bar")) {
        return new Spr9751_2();
      }
      throw new AccessException("not heard of "+beanName);
    }
View Full Code Here

      }
      else if (beanName.equals("foo.bar")) {
        return "trouble";
      }
      else if (beanName.equals("goo")) {
        throw new AccessException("DONT ASK ME ABOUT GOO");
      }
      return null;
    }
View Full Code Here

              Method method = XYZ.class.getMethod("values");
              Object value = method.invoke(target, arguments);
              return new TypedValue(value, new TypeDescriptor(new MethodParameter(method, -1)).narrow(value));
            }
            catch (Exception ex) {
              throw new AccessException(ex.getMessage(), ex);
            }
          }
        };
      }
    });
View Full Code Here

            args = ReflectionHelper.setupArgumentsForVarargsInvocation(m.getParameterTypes(), args);
          }
          return new TypedValue(m.invoke(null, args), new TypeDescriptor(new MethodParameter(m,-1)));
        }
        catch (Exception ex) {
          throw new AccessException("Problem invoking hasRole", ex);
        }
      }
View Full Code Here

      if (!name.equals("flibbles"))
        throw new RuntimeException("Assertion Failed! name should be flibbles");
      try {
        flibbles = (Integer) context.getTypeConverter().convertValue(newValue, TypeDescriptor.forObject(newValue), TypeDescriptor.valueOf(Integer.class));
      }catch (EvaluationException e) {
        throw new AccessException("Cannot set flibbles to an object of type '" + newValue.getClass() + "'");
      }
    }
View Full Code Here

  public boolean canWrite(EvaluationContext context, Object target, String name) throws AccessException {
    return false;
  }

  public void write(EvaluationContext context, Object target, String name, Object newValue) throws AccessException {
    throw new AccessException("Beans in a BeanFactory are read-only");
  }
View Full Code Here

TOP

Related Classes of org.springframework.expression.AccessException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.