Package org.springframework.data.rest.core.event

Examples of org.springframework.data.rest.core.event.BeforeSaveEvent


    appCtx.publishEvent(new AfterCreateEvent(person));
  }

  @Test(expected = RuntimeException.class)
  public void shouldDispatchBeforeSave() throws Exception {
    appCtx.publishEvent(new BeforeSaveEvent(person));
  }
View Full Code Here


  @Autowired ApplicationContext context;

  @Test(expected = RepositoryConstraintViolationException.class)
  public void shouldValidateLastName() throws Exception {
    context.publishEvent(new BeforeSaveEvent(new Person()));
  }
View Full Code Here

   * @return
   */
  private ResponseEntity<ResourceSupport> saveAndReturn(Object domainObject, RepositoryInvoker invoker,
      HttpMethod httpMethod, PersistentEntityResourceAssembler assembler) {

    publisher.publishEvent(new BeforeSaveEvent(domainObject));
    Object obj = invoker.invokeSave(domainObject);
    publisher.publishEvent(new AfterSaveEvent(domainObject));

    HttpHeaders headers = new HttpHeaders();

View Full Code Here

TOP

Related Classes of org.springframework.data.rest.core.event.BeforeSaveEvent

Copyright © 2018 www.massapicom. 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.