Class CaseEventService

java.lang.Object
com.aquima.web.rest.v1.service.CaseEventService

public class CaseEventService extends Object
Implements the logic of the /caseEvents endpoint.
Since:
9.6
Author:
Petru Galanton
  • Field Details Link icon

  • Method Details Link icon

    • forPaged Link icon

      public static CaseEventService forPaged(com.aquima.interactions.process.impl.ProcessCaseRepository repository, IResourceConverter<com.aquima.interactions.process.dao.ICaseEventModel,CaseEvent> converter, IResourceLinker<CaseEvent> linker, PaginatorFactory paginatorFactory)
      Creates an instance of this service usable in the /caseEvents endpoint
      Parameters:
      repository - the case repository
      converter - converter from case event models to case event resources
      linker - HATEOAS linker for case events
      paginatorFactory - paginator factory
      Returns:
      an instance of this service configured for use in the GET /caseEvents endpoint
    • forSingle Link icon

      public static CaseEventService forSingle(com.aquima.interactions.process.impl.ProcessCaseRepository repository, IResourceConverter<com.aquima.interactions.process.dao.ICaseEventModel,CaseEvent> converter)
      Creates an instance of this service usable in the GET /caseEvents/{eventId} endpoint
      Parameters:
      repository - the case repository
      converter - converter from case event models to case event resources
      Returns:
      an instance of this service configured for use in the /caseEvents/{eventId} endpoint
    • forReplay Link icon

      public static CaseEventService forReplay(com.aquima.interactions.portal.IPortalEngine portalEngine, com.aquima.interactions.process.impl.ProcessCaseRepository repository, IResourceConverter<com.aquima.interactions.process.dao.ICaseEventModel,CaseEvent> converter)
      Creates an instance of this service usable in the POST /caseEvents/{eventId} endpoint (for replaying events).
      Parameters:
      portalEngine - the portal engine, used for obtaining a process engine
      repository - the case repository
      converter - converter from case event models to case event resources
      Returns:
      an instance of this service configured for use in the POST /caseEvents/{eventId} endpoint
    • getCaseEvents Link icon

      public List<CaseEvent> getCaseEvents(PagedObject<CaseEvent> pagedObject, NullableLong caseId, Integer page, Integer pageSize, String sort, List<ResourceFilter> resourceFilters)
      Populates the given paged object resource with a (potentially) paginated list of case events.
      Parameters:
      pagedObject - the paged object resource where case events resources are placed
      caseId - the caseId filter, may be null
      page - the page number (may be null - null disables paging)
      pageSize - the page size (may be null - null disables paging)
      sort - the sorting order
      resourceFilters - resource filters
      Returns:
      the case events
    • getCaseEvent Link icon

      public CaseEvent getCaseEvent(CaseEvent caseEvent, Long eventId)
      Populates the given case event resource with the details of the case event with the given id.
      Parameters:
      caseEvent - the case event resource
      eventId - the id of the case event
      Returns:
      the case event
    • replayCaseEvent Link icon

      public void replayCaseEvent(CaseEvent eventResource, Long eventId, NullableLong caseId, com.aquima.interactions.project.IUserData userData)
      Replays (re-triggers) the event with the given id and populates the given event resource with the details of the newly created event.
      Parameters:
      eventResource - the event resource for the replayed event
      eventId - the id of the original event
      caseId - (optional) for message events, the id of the case where the new event should be triggered
      userData - the user data