Examples of Validate


Examples of org.eclipse.bpel.model.Validate

        if (result == null) result = caseWSDLElement(terminationHandler);
        if (result == null) result = defaultCase(theEObject);
        return result;
      }
      case BPELPackage.VALIDATE: {
        Validate validate = (Validate)theEObject;
        Object result = caseValidate(validate);
        if (result == null) result = caseActivity(validate);
        if (result == null) result = caseExtensibleElement(validate);
        if (result == null) result = caseExtensibleElement_1(validate);
        if (result == null) result = caseWSDLElement(validate);
View Full Code Here

Examples of org.eweb4j.mvc.validator.annotation.Validate

  private static List<ValidatorConfigBean> parseValidators(ReflectUtil ru,
      Method m) {
    List<ValidatorConfigBean> vals = new ArrayList<ValidatorConfigBean>();

    // 读取@Validate注解,拿到需要被验证的参数名称
    Validate validate = m.getAnnotation(Validate.class);
    if (validate == null)
      return vals;
   
    String[] fields = validate.value();
    String[] excepts = validate.except();
    if (fields != null) {
      // 读取Action object 的属性 验证信息
      List<ValidatorConfigBean> fieldVal = ValidatorUtil.readValidator(fields,excepts, null, ru, null, null);
      if (fieldVal != null)
        vals.addAll(fieldVal);
View Full Code Here

Examples of org.fusesource.ide.camel.model.generated.Validate

        imageProvider.addIconsForClass(new ThrowException());
        imageProvider.addIconsForClass(new Transacted());
        imageProvider.addIconsForClass(new Transform());
        imageProvider.addIconsForClass(new Try());
        imageProvider.addIconsForClass(new Unmarshal());
        imageProvider.addIconsForClass(new Validate());
        imageProvider.addIconsForClass(new When());
        imageProvider.addIconsForClass(new WireTap());
    }
View Full Code Here

Examples of org.hivedb.annotations.Validate

    return IndexType.None;
  }
 
  @SuppressWarnings("unchecked")
  private Validator resolveValidator(final Class entityInterface, final String propertyName) {
    Validate annotation = (Validate) ReflectionTools.getGetterOfProperty(entityInterface, propertyName).getAnnotation(Validate.class);
    if (annotation != null)
      try {
        return (Validator) Class.forName(annotation.value()).newInstance();
      } catch (Exception e) {
        throw new HiveRuntimeException(e);
      }
    return nonNullValidator;
  }
View Full Code Here

Examples of org.sonatype.nexus.validation.Validate

    checkNotNull(methodValidator);

    final ClassLoader tccl = Thread.currentThread().getContextClassLoader();
    try {
      Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
      final Validate validate = mi.getMethod().getAnnotation(Validate.class);

      validateParameters(mi.getThis(), mi.getMethod(), mi.getArguments(), validate.groups());

      final Object result = mi.proceed();

      validateReturnValue(mi.getThis(), mi.getMethod(), result, validate.groups());

      return result;
    }
    finally {
      Thread.currentThread().setContextClassLoader(tccl);
View Full Code Here

Examples of org.vraptor.plugin.hibernate.Validate

    public boolean accepts(ResourceMethod method) {
        return method.getMethod().isAnnotationPresent(Validate.class);
    }

    public void intercept(InterceptorStack stack, ResourceMethod method, Object resourceInstance) throws InterceptionException {
        Validate validate = method.getMethod().getAnnotation(Validate.class);
        if (validate != null) {
            ResourceBundle validatorBundle = ResourceBundle.getBundle(
                    "org.hibernate.validator.resources.DefaultValidatorMessages", request.getLocale());
            FallbackResourceBundle bundle = new FallbackResourceBundle(localization.getBundle(), validatorBundle);
            String[] names = provider.parameterNamesFor(method.getMethod());
            for (String path : validate.params()) {
                try {
                    Object[] paramValues = parameters.getParameters();
                    Object object = paramFor(names, path, paramValues);
                    BasicValidationErrors newErrors = new BasicValidationErrors();
                    HibernateLogicMethod.validateParam(locator, request, bundle, newErrors, object, path);
View Full Code Here

Examples of org.vraptor.plugin.hibernate.Validate

            if (method.isAnnotationPresent(Logic.class)) {
                logger.warn("Method " + method.getName() + " from " + originalType.getName()
                        + " is annotated with @Logic. Although its supported, we suggest you to migrate to @Path.");
            }
            if (method.isAnnotationPresent(Validate.class)) {
                Validate validate = method.getAnnotation(Validate.class);
                if (validate.fields().length != 0) {
                    logger.error("Method " + method.getName() + " from " + originalType.getName()
                            + " is annotated with @Validate with fields. This is not supported.");
                }
            }
        }
View Full Code Here

Examples of org.vraptor.plugin.hibernate.Validate

        }
    }

  private void checkValidate(Class<?> type, Method method) {
    if (method.isAnnotationPresent(Validate.class)) {
        Validate validate = method.getAnnotation(Validate.class);
        if (validate.fields().length != 0) {
            logger.error("Method " + method.getName() + " from " + type.getName()
                    + " is annotated with @Validate with fields. This is not supported.");
        }
    }
  }
View Full Code Here

Examples of org.vraptor.plugin.hibernate.Validate

    public boolean accepts(ResourceMethod method) {
        return method.getMethod().isAnnotationPresent(Validate.class);
    }

    public void intercept(InterceptorStack stack, ResourceMethod method, Object resourceInstance) throws InterceptionException {
        Validate validate = method.getMethod().getAnnotation(Validate.class);
        if (validate != null) {
            ResourceBundle validatorBundle = ResourceBundle.getBundle(
                    "org.hibernate.validator.resources.DefaultValidatorMessages", request.getLocale());
            FallbackResourceBundle bundle = new FallbackResourceBundle(localization.getBundle(), validatorBundle);
            String[] names = provider.parameterNamesFor(method.getMethod());
            for (String path : validate.params()) {
                try {
                    Object[] paramValues = parameters.getParameters();
                    Object object = paramFor(names, path, paramValues);
                    BasicValidationErrors newErrors = new BasicValidationErrors();
                    HibernateLogicMethod.validateParam(locator, request, bundle, newErrors, object, path);
View Full Code Here

Examples of org.vraptor.plugin.hibernate.Validate

    public boolean accepts(ResourceMethod method) {
        return method.getMethod().isAnnotationPresent(Validate.class);
    }

    public void intercept(InterceptorStack stack, ResourceMethod method, Object resourceInstance) throws InterceptionException {
        Validate validate = method.getMethod().getAnnotation(Validate.class);
        if (validate != null) {
            ResourceBundle validatorBundle = ResourceBundle.getBundle(
                    "org.hibernate.validator.resources.DefaultValidatorMessages", request.getLocale());
            FallbackResourceBundle bundle = new FallbackResourceBundle(localization.getBundle(), validatorBundle);
            String[] names = provider.parameterNamesFor(method.getMethod());
            for (String path : validate.params()) {
                try {
                    Object[] paramValues = parameters.getParameters();
                    Object object = paramFor(names, path, paramValues);
                    BasicValidationErrors newErrors = new BasicValidationErrors();
                    HibernateLogicMethod.validateParam(locator, request, bundle, newErrors, object, path);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.