Examples of Validator


Examples of org.jboss.weld.bootstrap.Validator

    private final Collection<Producer<?>> producersToValidate;
    private final Collection<InjectionTargetInitializationContext<?>> injectionTargetsToInitialize;

    public InjectionTargetService(BeanManagerImpl beanManager) {
        this.validator = new Validator();
        this.producersToValidate = new ConcurrentLinkedQueue<Producer<?>>();
        this.injectionTargetsToInitialize = new ConcurrentLinkedQueue<InjectionTargetInitializationContext<?>>();
        this.container = Container.instance(beanManager);
        this.beanManager = beanManager;
    }

Examples of org.jdesktop.binding.metadata.Validator

        }
        if (result) {
            for (int i = 0; i < models.size(); i++) {
                DataModel model = (DataModel) models.get(i);
                Validator validators[] = model.getValidators();
                for (int j = 0; j < validators.length; j++) {
                    String error[] = new String[1];
                    /** @todo aim: where to put error? */
                    if (!validators[j].validate(model, /* getLocale() */null,
                            error)) {

Examples of org.metaworks.validator.Validator

    type.removeFieldDescriptor("ForeignKey");
    type.removeFieldDescriptor("Type");

    fd = type.getFieldDescriptor("Inputter");
    fd.setValidators(new Validator[]{
      new Validator(){

        public String validate(Object data, Instance instance) {
          Inputter inputter = (Inputter)data;
          Class type = (Class)instance.getFieldValue("Type");

Examples of org.modeshape.jcr.query.validate.Validator

                             QueryCommand query,
                             Map<SelectorName, Table> usedSelectors ) {
        // // Resolve everything ...
        // Visitors.visitAll(query, new Validator(context, usedSelectors));
        // Resolve everything (except subqueries) ...
        Validator validator = new Validator(context, usedSelectors);
        query.accept(new WalkAllVisitor(validator) {
            @Override
            protected void enqueue( Visitable objectToBeVisited ) {
                if (objectToBeVisited instanceof Subquery) return;
                super.enqueue(objectToBeVisited);

Examples of org.mule.construct.Validator

public class ValidatorBuilderTestCase extends AbstractMuleTestCase
{
    public void testConfigurationWithoutErrorExpression() throws Exception
    {
        final Validator validator = new ValidatorBuilder().name("test-validator-no-error")
            .inboundAddress("test://foo.in")
            .validationFilter(new PayloadTypeFilter(Integer.class))
            .ackExpression("#[string:GOOD:#[message:payload]]")
            .nackExpression("#[string:BAD:#[message:payload]]")
            .outboundAddress("test://foo.out")
            .exceptionStrategy(new DefaultMessagingExceptionStrategy(muleContext, true))
            .build(muleContext);

        assertEquals("test-validator-no-error", validator.getName());
    }

Examples of org.nocturne.validation.Validator

    @Validate("enter")
    public boolean validateEnter() {
        addValidator("email", new EmailValidator());

        addValidator("password", new RequiredValidator());
        addValidator("password", new Validator() {
            @Override
            public void run(String value) throws ValidationException {
                if (userDao.findByEmailAndPassword(email, password) == null) {
                    throw new ValidationException($("Invalid email or password"));
                }

Examples of org.ocpsoft.rewrite.param.Validator

      @Override
      @SuppressWarnings({ "rawtypes", "unchecked" })
      public boolean isValid(Rewrite event, EvaluationContext context, Object value)
      {

         Validator validator = null;

         // let one of the SPI implementations build the validator
         Iterator<ValidatorProvider> providers = ServiceLoader.load(ValidatorProvider.class).iterator();
         while (providers.hasNext()) {
            ValidatorProvider provider = providers.next();

            if (targetType != null) {
               validator = provider.getByTargetType(targetType);
            }
            else if (validatorType != null) {
               validator = provider.getByValidatorType(validatorType);
            }
            else {
               validator = provider.getByValidatorId(validatorId);
            }

            if (validator != null) {
               break;
            }

         }
         Assert.notNull(validator, "Got no validator from any ValidatorProvider for: " + this.toString());

         return validator.isValid(event, context, value);

      }

Examples of org.opensaml.xml.validation.Validator

     * @throws ConfigurationException thrown if there is a problem initializing the validator suites, usually because of
     *             malformed elements
     */
    protected void initializeValidatorSuites(Element validatorSuitesElement) throws ConfigurationException {
        ValidatorSuite validatorSuite;
        Validator validator;
        Element validatorSuiteElement;
        String validatorSuiteId;
        Element validatorElement;
        QName validatorQName;

Examples of org.pdtextensions.semanticanalysis.model.validators.Validator

   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public void setValidator(Validator newValidator) {
    Validator oldValidator = validator;
    validator = newValidator;
    if (eNotificationRequired())
      eNotify(new ENotificationImpl(this, Notification.SET, ValidatorsPackage.TYPE__VALIDATOR, oldValidator, validator));
  }

Examples of org.restlet.routing.Validator

        // Create mock call
        Request rq = new Request();
        Response rs = new Response(rq);

        // Prepare the validator to test
        Validator validator = new Validator();
        validator.setNext(new TraceRestlet(null));
        validator.validatePresence("a");
        validator.handle(rq, rs);

        // Test if the absence of "a" is detected
        assertEquals(Status.CLIENT_ERROR_BAD_REQUEST, rs.getStatus());

        // Test if the presence of "a" is ignored
        rq.getAttributes().put("a", "123");
        rs.setStatus(Status.SUCCESS_OK);
        validator.handle(rq, rs);
        assertEquals(Status.SUCCESS_OK, rs.getStatus());
    }
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.