Examples of Validation


Examples of com.centraview.common.Validation

      System.out.println("[Exception][ProjectForm.Validate] Exception Thrown: " + e);
    }
    try
    {
      // initialize validation
      Validation validation = new Validation();

      if (getTitle() == null || getTitle().trim().length() <= 0) {
        errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("error.general.requiredField", "Title"));
      }
View Full Code Here

Examples of com.centraview.common.Validation

    ActionErrors errors = new ActionErrors();

    try
    {
      // initialize validation
      Validation validation = new Validation();

      this.convertItemLines();

      if (this.getVendorId() == null || this.getVendorId().trim().length() <= 0) {
        errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("error.general.requiredField", "Vendor"));
View Full Code Here

Examples of com.datasift.client.core.Validation

     * validation was successful or not
     */
    public FutureData<Validation> validate(String csdl) {
        FutureData<Validation> future = new FutureData<Validation>();
        URI uri = newParams().forURL(config.newAPIEndpointURI(VALIDATE));
        POST request = config.http().POST(uri, new PageReader(newRequestCallback(future, new Validation(), config)))
                .form("csdl", csdl);
        applyConfig(request).execute();
        return future;
    }
View Full Code Here

Examples of com.google.jplurk.validator.Validation

                logger.debug("add header => name[" + header.key() + "] value[" + header.value() + "]");
                httpMethod.addHeader(header.key(), header.value());
            }
        }

        Validation validation = method.getAnnotation(Validation.class);
        if (validation != null) {
            logger.debug("found @Validation");
            for (Validator v : validation.value()) {
                if (params.containsKey(v.field())) {
                    logger.debug("validate field[" + v.field() + "]");
                    boolean isPass = IValidator.ValidatorUtils.validate(v.validator(), params.get(v.field()));
                    if (!isPass) {
                        throw new PlurkException(
View Full Code Here

Examples of com.opensymphony.xwork2.validator.annotations.Validation

                }

                // Process single custom validator
                if (a instanceof Validation) {
                    Validation v = (Validation) a;
                    if (v.validations() != null) {
                        for (Validations val : v.validations()) {
                            processValidationAnnotation(val, fieldName, methodName, result);
                        }
                    }
                }
                // Process single custom validator
View Full Code Here

Examples of gld.edit.Validation

      case 3 : infra=new NetTunnelTest1(); break;
      case 4 : infra=new NetTunnelTest2(); break;
      default: infra=new Infrastructure(); break;
    }
    try
    Vector errors=(new Validation(infra)).validate();
      if(!errors.isEmpty())
        showError(errors.toString());
    }
    catch (InfraException e)
    {  reportError(e);
View Full Code Here

Examples of include.auth.Validation

    String portletAction = request.getParameter("action");

    System.out.println("RID: " + rid);
    System.out.println("SID: "+ sid);
    System.out.println("ACTION: "+portletAction);
    Validation v = new Validation();
    String login = v.validate(sid);
    System.out.println("LOGIN: "+login);
    response.setContentType("text/xml");

    if (rid==null || portletAction == null)
      return;
View Full Code Here

Examples of org.apache.bval.model.Validation

    private void initValidationLookup() throws Exception {
        final HashMap<String, XMLMetaValidator> map = new HashMap<String, XMLMetaValidator>(validators.size());
        for (XMLMetaValidator xv : validators) {
            if (xv.getJava() != null) {
                Validation validation =
                        (Validation) ClassUtils.getClass(xv.getJava()).newInstance();
                xv.setValidation(validation);
                map.put(xv.getId(), xv);
            }
        }
View Full Code Here

Examples of org.apache.ctakes.jdl.data.xml.Validation

  /**
   * Execute the loader of the data into the database.
   */
  public void execute() {
    Validation validation = new Validation(SchemaUtil.urlToSchema(XSD),
        srcConn);
    if (validation.succeed()) {
      validation.setDocument(srcLoad);
      if (validation.succeed()) {
        JdlConnection jdlConnection = null;
        try {
          JdbcType jdbc = ObjectFactoryUtil
              .getJdbcTypeBySrcXml(srcConn);
          LoadType load = ObjectFactoryUtil
              .getLoadTypeBySrcXml(srcLoad);
          jdlConnection = new JdlConnection(jdbc);
          CsvLoadType csv = load.getCsv();
          if (csv != null) {
            try {
              CsvLoader csvLoader = new CsvLoader(csv, new File(
                  srcData));
              csvLoader.dataInsert(jdlConnection);
            } catch (FileNotFoundException e) {
              throw new RuntimeException(e);
            }
          }
          XmlLoadType xml = load.getXml();
          if (xml != null) {
            XmlLoader xPathParsing = new XmlLoader(xml,
                DomUtil.srcToDocument(srcData));
            xPathParsing.dataInsert(jdlConnection);
          }
        } catch (JAXBException e) {
          e.printStackTrace();
        } finally {
          try {
            if (jdlConnection != null)
              jdlConnection.closeConnection();
          } catch (SQLException e) {
            log.error("closing connection", e);
          }
        }
      } else {
        System.err.println(validation.getError());
      }
    } else {
      System.err.println(validation.getError());
    }
  }
View Full Code Here

Examples of org.apache.sirona.status.Validation

    public static ValidationResult status = new ValidationResult("n", Status.OK, "m");

    @Override
    public <T> Iterable<T> find(final Class<T> api, final ClassLoader loader) {
        if (Validation.class.equals(api)) {
            return (Iterable<T>) Arrays.asList(new Validation() {
                @Override
                public ValidationResult validate() {
                    return status;
                }
            });
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.