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 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 results
      language - the language code for localized strings (defaults to user's language)
      filter - the search filter criteria for data collection types
      Returns:
      a ResponseEntity containing a PageResponse with the collection of DTODataCollectionType
      Throws:
      DAValidateException - if validation fails
      DAException - 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 retrieve
      language - 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 ResponseEntity containing the DTODataCollectionType
      Throws:
      DAValidateException - if validation fails or the data collection type is not found
      DAException - 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 - the DTODataCollectionTypeInsert containing the data for the new data collection type
      Returns:
      a ResponseEntity containing a DTOIdentifier with 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 fails
      DAException - 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 update
      dto - the DTODataCollectionTypeUpdate containing the fields to update
      Returns:
      a ResponseEntity with no content (HTTP 204) on successful update
      Throws:
      DAValidateException - if validation fails or the data collection type is not found
      DAException - if a data access error occurs