Class DataCollectionTypeService
java.lang.Object
overit.geocallapp.utilities.rs.common.PrivateService
overit.geocallapp.wfm.datacollection.rs1.type.DataCollectionTypeService
@RestController
@RequestMapping("documents/dynamic-forms/r1/types")
@Resource(logging=true)
public class DataCollectionTypeService
extends PrivateService
Service for manage data collection type
- Since:
- 22.0
- GCApi:
- rest
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<DTODataCollectionType> get(Long typeId, String language, Collection<String> fields) Retrieves a specific data collection type by its identifier.org.springframework.http.ResponseEntity<PageResponse<DTODataCollectionType>> getCollection(@Valid Page page, Collection<String> fields, String order, String language, @Valid @NotNull DTODataCollectionTypeFilter filter) Retrieves a paginated collection of data collection types based on the provided search criteria.org.springframework.http.ResponseEntity<Void> patch(Long typeId, @Valid DTODataCollectionTypeUpdate dto) Partially updates an existing data collection type.org.springframework.http.ResponseEntity<DTOIdentifier<Long>> Creates a new data collection type.
-
Constructor Details
-
DataCollectionTypeService
public DataCollectionTypeService()
-
-
Method Details
-
getCollection
@GetMapping(produces="application/json") public org.springframework.http.ResponseEntity<PageResponse<DTODataCollectionType>> getCollection(@RequestParam("_page") @Valid @Valid Page page, @RequestParam(required=false,name="_fields") Collection<String> fields, @RequestParam(required=false,name="_order") String order, @RequestParam(required=false,name="_language",defaultValue="user") String language, @Valid @NotNull @Valid @NotNull DTODataCollectionTypeFilter filter) throws DAValidateException, DAException Retrieves a paginated collection of data collection types based on the provided search criteria.- Parameters:
page- the pagination parameters (page number, page size)fields- optional collection of field names to include in the response (for partial representation)order- optional ordering specification for sorting the resultslanguage- the language code for localized strings (defaults to user's language)filter- the search filter criteria for data collection types- Returns:
- a
ResponseEntitycontaining aPageResponsewith the collection ofDTODataCollectionType - Throws:
DAValidateException- if validation failsDAException- if a data access error occurs
-
get
@GetMapping(value="{typeId:[0-9]+}", produces="application/json") public org.springframework.http.ResponseEntity<DTODataCollectionType> get(@PathVariable("typeId") Long typeId, @RequestParam(required=false,name="_language",defaultValue="user") String language, @RequestParam(required=false,value="_fields") Collection<String> fields) throws DAValidateException, DAException Retrieves a specific data collection type by its identifier.- Parameters:
typeId- the unique identifier of the data collection type to retrievelanguage- the language code for localized strings (defaults to user's language)fields- optional collection of field names to include in the response (for partial representation)- Returns:
- a
ResponseEntitycontaining theDTODataCollectionType - Throws:
DAValidateException- if validation fails or the data collection type is not foundDAException- if a data access error occurs
-
post
@PostMapping(consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<DTOIdentifier<Long>> post(@Valid @RequestBody @Valid DTODataCollectionTypeInsert dto) throws DAValidateException, DAException Creates a new data collection type.- Parameters:
dto- theDTODataCollectionTypeInsertcontaining the data for the new data collection type- Returns:
- a
ResponseEntitycontaining aDTOIdentifierwith the ID of the newly created data collection type. The response includes a Location header with the URI of the created resource. - Throws:
DAValidateException- if validation failsDAException- if a data access error occurs
-
patch
@PatchMapping(value="{typeId:[0-9]+}", consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<Void> patch(@PathVariable("typeId") Long typeId, @Valid @RequestBody @Valid DTODataCollectionTypeUpdate dto) throws DAValidateException, DAException Partially updates an existing data collection type. Only the fields provided in the DTO will be updated; other fields remain unchanged.- Parameters:
typeId- the unique identifier of the data collection type to updatedto- theDTODataCollectionTypeUpdatecontaining the fields to update- Returns:
- a
ResponseEntitywith no content (HTTP 204) on successful update - Throws:
DAValidateException- if validation fails or the data collection type is not foundDAException- if a data access error occurs
-