Examples of AfterSaveEvent


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

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

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

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

  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();

    if (PUT.equals(httpMethod)) {
      addLocationHeader(headers, assembler, obj);
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.