Class CaseService

java.lang.Object
com.aquima.web.rest.v1.service.ProcessServiceBase
com.aquima.web.rest.v1.service.CaseService

public final class CaseService extends ProcessServiceBase
  • Method Details Link icon

    • forPaged Link icon

      public static CaseService forPaged(com.aquima.interactions.process.impl.ProcessCaseRepository repository, IResourceConverter<com.aquima.interactions.process.dao.ICaseModel,Case> converter, IDateConverter dateConverter, IResourceLinker<Case> linker, PaginatorFactory paginatorFactory)
      Creates an instance of this service usable in the /cases endpoint
      Parameters:
      repository - the case repository
      converter - converter from case model to case resources
      dateConverter - the date converter
      linker - HATEOAS linker for task
      paginatorFactory - paginator factory
      Returns:
      an instance of this service configured for use in the GET /cases endpoint
    • forSingle Link icon

      public static CaseService forSingle(com.aquima.interactions.process.impl.ProcessCaseRepository repository, IResourceConverter<com.aquima.interactions.process.dao.ICaseModel,Case> converter, IDateConverter dateConverter)
      Creates an instance of this service usable in the GET /cases/{caseId} endpoint
      Parameters:
      repository - the case repository
      converter - converter from case model to case resources
      dateConverter - the data converter
      Returns:
      an instance of this service configured for use in the /task/{taskId} endpoint
    • getCases Link icon

      public List<Case> getCases(PagedObject<Case> pagedObject, Integer page, Integer pageSize, String sort, String attributes, List<ResourceFilter> resourceFilters, boolean includeAll)
      This method is responsible for returning a PagedObject with cases
      Parameters:
      pagedObject - The object which will be paged
      page - Page number
      pageSize - Page size
      sort - Sort columns. Comma separated
      attributes - the attributes
      resourceFilters - A list of ResourceFilter objects. Used for filtering
      includeAll - whether to include all
      Returns:
      result cases list
    • getCase Link icon

      public Case getCase(Case resultCase, long caseId, String attributes, boolean includeAll)
      This method is responsible for returning a case by its id
      Parameters:
      resultCase - The case resource
      caseId - The id of the case
      attributes - the attributes
      includeAll - whether to include all
      Returns:
      result case object