Examples of validate()


Examples of org.aavso.tools.vstar.data.validation.CommonTextFormatValidator.validate()

        if (!line.startsWith("#") && !line.matches("^\\s*$")
            && !isColumnHeaderLine(line)) {

          try {
            ValidObservation validOb = validator.validate();
            if (validOb != null) {
              addValidObservation(validOb, lineNum);
            }
          } catch (ObservationValidationError e) {
            InvalidObservation invalidOb = new InvalidObservation(
View Full Code Here

Examples of org.aavso.tools.vstar.data.validation.SimpleTextFormatValidator.validate()

      reader.setDelimiter('\t');
      assertTrue(reader.readRecord());
      SimpleTextFormatValidator validator = new SimpleTextFormatValidator(
          reader, 2, 5, NewStarType.NEW_STAR_FROM_SIMPLE_FILE
              .getFieldInfoSource());
      validator.validate();
      // We should have thrown a ObservationValidationError...
      fail();
    } catch (ObservationValidationError e) {
      // We expect to get here.
      assertTrue(true);
View Full Code Here

Examples of org.activemq.ra.ActiveMQActivationSpec.validate()

        jcac.afterPropertiesSet();

        ActiveMQActivationSpec spec = new ActiveMQActivationSpec();
        spec.setDestinationType(Queue.class.getName());
        spec.setDestination("GauntletWorkQueue");
        spec.validate();

        JCAConnector connector = jcac.addConnector();
        connector.setActivationSpec(spec);
        connector.setRef("test");
        connector.setBeanFactory(jcac.getBeanFactory());
View Full Code Here

Examples of org.activiti.validation.ProcessValidator.validate()

    assertNotNull(flowElement);
    assertTrue(flowElement instanceof UserTask);
    assertEquals("task", flowElement.getId());

    ProcessValidator processValidator = new ProcessValidatorFactory().createDefaultProcessValidator();
    List<ValidationError> errors = processValidator.validate(model);
    assertNotNull(errors);
    assertEquals(2, errors.size());
  }
}
View Full Code Here

Examples of org.agoncal.book.javaee7.chapter14.CardValidator.validate()

    creditCard.setExpiryDate("10/12");
    creditCard.setType("VISA");
    creditCard.setControlNumber(1234);

    CardValidator cardValidator = new CardValidatorService().getCardValidatorPort();
    System.out.println(cardValidator.validate(creditCard));

    creditCard.setNumber("12341233");
    System.out.println(cardValidator.validate(creditCard));
  }
}
View Full Code Here

Examples of org.alfresco.service.cmr.security.AuthenticationService.validate()

                    // setup the authentication context
                    try {
                        WebApplicationContext ctx = (WebApplicationContext) getPortletContext().getAttribute(
                                        WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE);
                        AuthenticationService auth = (AuthenticationService) ctx.getBean("AuthenticationService");
                        auth.validate(user.getTicket());

                        // save last username into portlet preferences, get from
                        // LoginBean state
                        LoginBean loginBean = (LoginBean) request.getPortletSession().getAttribute(AuthenticationHelper.LOGIN_BEAN);
                        if (loginBean != null) {
View Full Code Here

Examples of org.apache.activemq.ra.ActiveMQActivationSpec.validate()

        ActiveMQActivationSpec activationSpec = new ActiveMQActivationSpec();
        activationSpec.setDestinationType("javax.jms.Queue");
        activationSpec.setDestination(REQUEST_QUEUE_NAME);

        // validate the activation spec
        activationSpec.validate();

        // set the resource adapter into the activation spec
        activationSpec.setResourceAdapter(ra);

        // create the message endpoint
View Full Code Here

Examples of org.apache.airavata.orchestrator.core.validator.JobMetadataValidator.validate()

            ValidatorResult vResult = null;
            for (String validator : validatorClzzez) {
                try {
                    Class<? extends JobMetadataValidator> vClass = Class.forName(validator.trim()).asSubclass(JobMetadataValidator.class);
                    JobMetadataValidator jobMetadataValidator = vClass.newInstance();
                    vResult = jobMetadataValidator.validate(experiment, workflowNodeDetail, taskID);
                    if (vResult.isResult()) {
                        logger.info("Validation of " + validator + " is SUCCESSFUL");
                    } else {
                        logger.error("Validation of " + validator + " is FAILED:[error]" + vResult.getErrorDetails());
                        //todo we need to store this message to registry
View Full Code Here

Examples of org.apache.airavata.workflow.model.gpel.script.BPELScript.validate()

        Workflow workflow = this.engine.getGUI().getWorkflow();
        BPELScript bpel = new BPELScript(workflow);

        // Check if there is any errors in the workflow first.
        ArrayList<String> warnings = new ArrayList<String>();
        if (!bpel.validate(warnings)) {
            StringBuilder buf = new StringBuilder();
            for (String warning : warnings) {
                buf.append("- ");
                buf.append(warning);
                buf.append("\n");
View Full Code Here

Examples of org.apache.airavata.xbaya.gpel.script.BPELScript.validate()

        Workflow workflow = this.engine.getWorkflow();
        BPELScript bpel = new BPELScript(workflow);

        // Check if there is any errors in the workflow first.
        ArrayList<String> warnings = new ArrayList<String>();
        if (!bpel.validate(warnings)) {
            StringBuilder buf = new StringBuilder();
            for (String warning : warnings) {
                buf.append("- ");
                buf.append(warning);
                buf.append("\n");
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.