Examples of reject()


Examples of org.springframework.validation.Errors.reject()

 
  BookingValidator book = new BookingValidator();
 
  Errors errors = createMock(Errors.class);
 
  errors.reject("errors.endGreatBegin","errors.EndGreatBegin");
   
  replay(errors);
 
  book.validate(booking1, errors);
 
View Full Code Here

Examples of org.springframework.validation.Errors.reject()

 
    BookingValidator book = new BookingValidator();
 
  Errors errors = createMock(Errors.class);
 
  errors.reject("errors.BeginGreatToday","errors.BeginGreatToday");
   
  replay(errors);
 
  book.validate(booking2, errors);
 
View Full Code Here

Examples of org.springframework.validation.Errors.reject()

    MockRequestContext context = new MockRequestContext(parameters());

    assertEquals(action.getEventFactorySupport().getSuccessEventId(), action.setupForm(context).getId());

    Errors errors = getErrors(context);
    errors.reject("dummy");
    TestBean formObject = getFormObject(context);
    formObject.setProp("bla");

    // setupForm() should leave the existing form object and Errors instance
    // untouched, at least when no bind & validate is done (bindOnSetupForm
View Full Code Here

Examples of org.springframework.validation.MapBindingResult.reject()

    DefaultMessageContext context = new DefaultMessageContext(messageSource);
    Object object = new Object();
    MessageContextErrors errors = new MessageContextErrors(context, "object", object, null, null);
    MapBindingResult result = new MapBindingResult(new HashMap(), "object");
    result.reject("bar", new Object[] { "boop" }, null);
    result.rejectValue("field", "bar", new Object[] { "boop" }, null);
    errors.addAllErrors(result);

    Message msg = context.getAllMessages()[0];
    assertEquals(null, msg.getSource());
View Full Code Here

Examples of xnap.plugin.nap.net.Upload.reject()

//        u.reject();
//        return;

  if (file == null) {
        logger.warn("invalid request: " + nick + " " + filename);
        u.reject();
        return;
  }
 
  if (!server.getUser(nick).isAllowedToDownload()) {
        logger.warn("rejecting leecher" + nick + " " + filename);
View Full Code Here

Examples of xnap.plugin.nap.net.Upload.reject()

        return;
  }
 
  if (!server.getUser(nick).isAllowedToDownload()) {
        logger.warn("rejecting leecher" + nick + " " + filename);
        u.reject();
        return;
  }
 
  UploadQueue uq = UploadQueue.getInstance();
  logger.debug("upload: " + nick + " " + filename);
View Full Code Here

Examples of xnap.plugin.nap.net.Upload.reject()

    MessageHandler.send
        (server, new UploadAckMessage(nick, filename));
      }
      else {
    logger.warn("upload queue rejected " + filename);
    u.reject();
      }
  }
  else if (pos != -1) {
      // pos == 0 means busy, so we always send pos > 0
      QueueLimitMessage m = new QueueLimitMessage(nick, filename,
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.