Class DataCollectionTemplateOutcomeRuleService
java.lang.Object
overit.geocallapp.utilities.rs.common.PrivateService
overit.geocallapp.wfm.datacollection.rs1.template.structure.outcomerules.DataCollectionTemplateOutcomeRuleService
@RestController
@RequestMapping("documents/dynamic-forms/r1/templates")
@Resource(logging=true)
public class DataCollectionTemplateOutcomeRuleService
extends PrivateService
Service for managing data collection template outcome rules
- Since:
- 22.0
- GCApi:
- rest
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<Void> Deletes an outcome rule for a template working copy.org.springframework.http.ResponseEntity<DTODataCollectionTemplateOutcomeRule> get(Long templateId, Long outcomeRuleId, Collection<String> fields) Gets a single outcome rule for a template working copy.org.springframework.http.ResponseEntity<PageResponse<DTODataCollectionTemplateOutcomeRule>> getCollection(Long templateId, @Valid Page page, Collection<String> fields, String order, @Valid @NotNull DTODataCollectionTemplateOutcomeRuleFilter filter) Gets the collection of outcome rules for a template working copy.org.springframework.http.ResponseEntity<DTODataCollectionTemplateOutcomeRule> getFromRelease(Long templateId, Long releaseId, Long outcomeRuleId, Collection<String> fields) Gets a single outcome rule for a template release.org.springframework.http.ResponseEntity<PageResponse<DTODataCollectionTemplateOutcomeRule>> getFromReleaseCollection(Long templateId, Long releaseId, @Valid Page page, Collection<String> fields, String order, @Valid @NotNull DTODataCollectionTemplateOutcomeRuleFilter filter) Gets the collection of outcome rules for a template release.org.springframework.http.ResponseEntity<Void> patch(Long templateId, Long outcomeRuleId, @Valid DTODataCollectionTemplateOutcomeRuleUpdate dto) Updates an outcome rule for a template working copy.org.springframework.http.ResponseEntity<DTOIdentifier<Long>> post(Long templateId, @Valid DTODataCollectionTemplateOutcomeRuleInsert dto) Creates a new outcome rule for a template working copy.
-
Constructor Details
-
DataCollectionTemplateOutcomeRuleService
public DataCollectionTemplateOutcomeRuleService()
-
-
Method Details
-
getCollection
@GetMapping(value="{templateId:[0-9]+}/working-copies/outcome-rules", produces="application/json") public org.springframework.http.ResponseEntity<PageResponse<DTODataCollectionTemplateOutcomeRule>> getCollection(@PathVariable("templateId") Long templateId, @RequestParam("_page") @Valid @Valid Page page, @RequestParam(required=false,name="_fields") Collection<String> fields, @RequestParam(required=false,name="_order") String order, @Valid @NotNull @Valid @NotNull DTODataCollectionTemplateOutcomeRuleFilter filter) throws DAValidateException, DAException Gets the collection of outcome rules for a template working copy.- Parameters:
templateId- the template idpage- the pagefields- the fieldsorder- the orderfilter- the filter- Returns:
- the collection
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
get
@GetMapping(value="{templateId:[0-9]+}/working-copies/outcome-rules/{outcomeRuleId:[0-9]+}", produces="application/json") public org.springframework.http.ResponseEntity<DTODataCollectionTemplateOutcomeRule> get(@PathVariable("templateId") Long templateId, @PathVariable("outcomeRuleId") Long outcomeRuleId, @RequestParam(required=false,value="_fields") Collection<String> fields) throws DAValidateException, DAException Gets a single outcome rule for a template working copy.- Parameters:
templateId- the template idoutcomeRuleId- the outcome rule idfields- the fields- Returns:
- the outcome rule
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
post
@PostMapping(value="{templateId:[0-9]+}/working-copies/outcome-rules", consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<DTOIdentifier<Long>> post(@PathVariable("templateId") Long templateId, @Valid @RequestBody @Valid DTODataCollectionTemplateOutcomeRuleInsert dto) throws DAValidateException, DAException Creates a new outcome rule for a template working copy.- Parameters:
templateId- the template iddto- the DTO- Returns:
- the identifier
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
patch
@PatchMapping(value="{templateId:[0-9]+}/working-copies/outcome-rules/{outcomeRuleId:[0-9]+}", consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<Void> patch(@PathVariable("templateId") Long templateId, @PathVariable("outcomeRuleId") Long outcomeRuleId, @Valid @RequestBody @Valid DTODataCollectionTemplateOutcomeRuleUpdate dto) throws DAValidateException, DAException Updates an outcome rule for a template working copy.- Parameters:
templateId- the template idoutcomeRuleId- the outcome rule iddto- the DTO- Returns:
- the response entity
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
delete
@DeleteMapping(value="{templateId:[0-9]+}/working-copies/outcome-rules/{outcomeRuleId:[0-9]+}", produces="application/json") public org.springframework.http.ResponseEntity<Void> delete(@PathVariable("templateId") Long templateId, @PathVariable("outcomeRuleId") Long outcomeRuleId) throws DAValidateException, DAException Deletes an outcome rule for a template working copy.- Parameters:
templateId- the template idoutcomeRuleId- the outcome rule id- Returns:
- the response entity
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
getFromReleaseCollection
@GetMapping(value="{templateId:[0-9]+}/releases/{releaseId:[0-9]+}/outcome-rules", produces="application/json") public org.springframework.http.ResponseEntity<PageResponse<DTODataCollectionTemplateOutcomeRule>> getFromReleaseCollection(@PathVariable("templateId") Long templateId, @PathVariable("releaseId") Long releaseId, @RequestParam("_page") @Valid @Valid Page page, @RequestParam(required=false,name="_fields") Collection<String> fields, @RequestParam(required=false,name="_order") String order, @Valid @NotNull @Valid @NotNull DTODataCollectionTemplateOutcomeRuleFilter filter) throws DAValidateException, DAException Gets the collection of outcome rules for a template release.- Parameters:
templateId- the template idreleaseId- the release idpage- the pagefields- the fieldsorder- the orderfilter- the filter- Returns:
- the collection
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
getFromRelease
@GetMapping(value="{templateId:[0-9]+}/releases/{releaseId:[0-9]+}/outcome-rules/{outcomeRuleId:[0-9]+}", produces="application/json") public org.springframework.http.ResponseEntity<DTODataCollectionTemplateOutcomeRule> getFromRelease(@PathVariable("templateId") Long templateId, @PathVariable("releaseId") Long releaseId, @PathVariable("outcomeRuleId") Long outcomeRuleId, @RequestParam(required=false,value="_fields") Collection<String> fields) throws DAValidateException, DAException Gets a single outcome rule for a template release.- Parameters:
templateId- the template idreleaseId- the release idoutcomeRuleId- the outcome rule idfields- the fields- Returns:
- the outcome rule
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-