Package de.otto.synapse.edison.journal
Class JournalRestController
java.lang.Object
de.otto.synapse.edison.journal.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 Object
-
Constructor Summary
ConstructorsConstructorDescriptionJournalRestController(List<de.otto.synapse.state.StateRepository<?>> stateRepositories, de.otto.synapse.journal.JournalRegistry journals, EdisonStateRepositoryUiProperties properties, String managementBasePath) -
Method Summary
Modifier and TypeMethodDescriptionde.otto.edison.hal.HalRepresentationgetEntityJournalJson(String repositoryName, String entityId, org.springframework.web.util.UriComponentsBuilder uriComponentsBuilder) Returns an application/hal+json representation of the event journal of a single event-sourced entity.
-
Constructor Details
-
JournalRestController
public JournalRestController(List<de.otto.synapse.state.StateRepository<?>> stateRepositories, de.otto.synapse.journal.JournalRegistry journals, EdisonStateRepositoryUiProperties properties, @Value("${edison.application.management.base-path:internal}") String managementBasePath)
-
-
Method Details
-
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 String repositoryName, @PathVariable 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 theJournalentityId- the id of the requested entityuriComponentsBuilder- builder used to create hrefs- Returns:
- HalRepresentation the representation of the journal
-