<- Back to NucleoCore
Skip to main content

EventListener

Data Entry

Code Sample

@RestController
public class BookController{
  @EventListener
  public void bookCreatedEvent(DataEntryCreatedEvent<BookDE> bookCreated){
    Serializer.log("Book created "+bookCreated.getDataEntry().getData().getName());
  }
}

Events

  • DataEntryCreatedEvent
  • DataEntryUpdatedEvent
  • DataEntryDeletedEvent

Connection

Code Sample

@RestController
public class BookController{
  @EventListener
  public void bookConnectionCreatedEvent(ConnectionCreatedEvent<AuthoredConnection> authored){
    Serializer.log("Authored connection created "+authored.getConnection().getMetadata().get("rating"));
  }
}

Events

  • ConnectionCreatedEvent
  • ConnectionUpdatedEvent
  • ConnectionDeletedEvent