Class JournalRestController


  • @Controller
    @ConditionalOnBean(de.otto.synapse.state.StateRepository.class)
    @ConditionalOnProperty(prefix="synapse.edison.state.ui",
                           name="enabled",
                           havingValue="true",
                           matchIfMissing=true)
    public class JournalRestController
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      JournalRestController​(java.util.List<de.otto.synapse.state.StateRepository<?>> stateRepositories, de.otto.synapse.journal.JournalRegistry journals, EdisonStateRepositoryUiProperties properties, java.lang.String managementBasePath)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      de.otto.edison.hal.HalRepresentation getEntityJournalJson​(java.lang.String repositoryName, java.lang.String entityId, org.springframework.web.util.UriComponentsBuilder uriComponentsBuilder)
      Returns an application/hal+json representation of the event journal of a single event-sourced entity.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • JournalRestController

        public JournalRestController​(java.util.List<de.otto.synapse.state.StateRepository<?>> stateRepositories,
                                     de.otto.synapse.journal.JournalRegistry journals,
                                     EdisonStateRepositoryUiProperties properties,
                                     @Value("${edison.application.management.base-path:internal}")
                                     java.lang.String managementBasePath)
    • Method Detail

      • getEntityJournalJson

        @GetMapping(path="${edison.application.management.base-path:internal}/journals/{repositoryName}/{entityId}",
                    produces={"application/hal+json","application/json"})
        @ResponseBody
        public de.otto.edison.hal.HalRepresentation getEntityJournalJson​(@PathVariable
                                                                         java.lang.String repositoryName,
                                                                         @PathVariable
                                                                         java.lang.String entityId,
                                                                         org.springframework.web.util.UriComponentsBuilder uriComponentsBuilder)
        Returns an application/hal+json representation of the event journal of a single event-sourced entity.
        Parameters:
        repositoryName - the name of the Journal
        entityId - the id of the requested entity
        uriComponentsBuilder - builder used to create hrefs
        Returns:
        HalRepresentation the representation of the journal