<- 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<AuthoredAuthoredConnection> Authored)authored){
    Serializer.log("Authored connection created "+Authored.authored.getConnection().getMetadata().get("rating"));
  }
}

Events

  • ConnectionCreatedEvent
  • ConnectionUpdatedEvent
  • ConnectionDeletedEvent