Package com.aquima.web.rest.v1.service
Class CaseService
java.lang.Object
com.aquima.web.rest.v1.service.ProcessServiceBase
com.aquima.web.rest.v1.service.CaseService
-
Field Summary
Fields inherited from class com.aquima.web.rest.v1.service.ProcessServiceBase
dateConverter, repository
-
Method Summary
Modifier and TypeMethodDescriptionstatic 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 endpointstatic 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} endpointThis method is responsible for returning a case by its idgetCases
(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 casesMethods inherited from class com.aquima.web.rest.v1.service.ProcessServiceBase
fillAttributes, fillAttributes, fillAttributes, getAttributeValue, getCaseIds, getIncluded, getInstanceIds, getInstanceIds
-
Method Details
-
forPaged
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 repositoryconverter
- converter from case model to case resourcesdateConverter
- the date converterlinker
- HATEOAS linker for taskpaginatorFactory
- paginator factory- Returns:
- an instance of this service configured for use in the GET /cases endpoint
-
forSingle
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 repositoryconverter
- converter from case model to case resourcesdateConverter
- the data converter- Returns:
- an instance of this service configured for use in the /task/{taskId} endpoint
-
getCases
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 pagedpage
- Page numberpageSize
- Page sizesort
- Sort columns. Comma separatedattributes
- the attributesresourceFilters
- A list ofResourceFilter
objects. Used for filteringincludeAll
- whether to include all- Returns:
- result cases list
-
getCase
This method is responsible for returning a case by its id- Parameters:
resultCase
- The case resourcecaseId
- The id of the caseattributes
- the attributesincludeAll
- whether to include all- Returns:
- result case object
-