Class StructureValidityPeriodService
java.lang.Object
overit.geocallapp.utilities.rs.common.PrivateService
overit.geocallapp.wfm.organizationalstructures.rs1.structurevalidityperiod.StructureValidityPeriodService
@RestController
@RequestMapping("territory/organizational-structures/r1/structures/{structureId:[0-9]+}/validity-period")
@Resource(logging=true)
public class StructureValidityPeriodService
extends PrivateService
Service for manage structure validity period
- Since:
- 17.0
- GCApi:
- rest
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<Void> Delete the required structure validity period.org.springframework.http.ResponseEntity<DTOStructureValidityPeriod> get(Long structureId, Long structureValidityPeriodId, Collection<String> fields) Retrieves the requiredDTOStructureValidityPeriodby calling theStructureValidityPeriodLoadEvent.org.springframework.http.ResponseEntity<PageResponse<DTOStructureValidityPeriod>> getCollection(Long structureId, @Valid Page page, Collection<String> fields, String order, @Valid @NotNull DTOStructureValidityPeriodFilter filter) Returns the collection of all the stored structure validity periods by calling theStructureValidityPeriodSearchEvent.org.springframework.http.ResponseEntity<Void> patch(Long structureId, Long structureValidityPeriodId, @Valid DTOStructureValidityPeriodUpdate dto) Update an structure validity period by calling theStructureValidityPeriodUpdateEventorg.springframework.http.ResponseEntity<DTOIdentifier<Long>> post(Long structureId, @Valid DTOStructureValidityPeriodInsert dto) Create a new structure validity period by calling theStructureValidityPeriodInsertEvent
-
Constructor Details
-
StructureValidityPeriodService
public StructureValidityPeriodService()
-
-
Method Details
-
getCollection
@GetMapping(produces="application/json") public org.springframework.http.ResponseEntity<PageResponse<DTOStructureValidityPeriod>> getCollection(@PathVariable("structureId") Long structureId, @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 DTOStructureValidityPeriodFilter filter) throws DAValidateException, DAException Returns the collection of all the stored structure validity periods by calling theStructureValidityPeriodSearchEvent.- Parameters:
structureId-page- thePagethat will contain the paginated resultfields- the collection of fields the response will containorder- the ordering fieldfilter- theDTOStructureValidityPeriodFilter- Returns:
- the collection of
DTOStructureValidityPeriod - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
get
@GetMapping(value="{structureValidityPeriodId:[0-9]+}", produces="application/json") public org.springframework.http.ResponseEntity<DTOStructureValidityPeriod> get(@PathVariable("structureId") Long structureId, @PathVariable("structureValidityPeriodId") Long structureValidityPeriodId, @RequestParam(required=false,value="_fields") Collection<String> fields) throws DAValidateException, DAException Retrieves the requiredDTOStructureValidityPeriodby calling theStructureValidityPeriodLoadEvent.- Parameters:
structureId- the structure idstructureValidityPeriodId- the structure validity period idfields- the collection of fields the response will contain- Returns:
- the response containing the loaded account
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
post
@PostMapping(consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<DTOIdentifier<Long>> post(@PathVariable("structureId") Long structureId, @Valid @RequestBody @Valid DTOStructureValidityPeriodInsert dto) throws DAValidateException, DAException Create a new structure validity period by calling theStructureValidityPeriodInsertEvent- Parameters:
structureId- structure iddto- theDTOStructureValidityPeriodInsert- Returns:
- the standard response containing the new account id
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
patch
@PatchMapping(value="{structureValidityPeriodId:[0-9]+}", consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<Void> patch(@PathVariable("structureId") Long structureId, @PathVariable("structureValidityPeriodId") Long structureValidityPeriodId, @Valid @RequestBody @Valid DTOStructureValidityPeriodUpdate dto) throws DAValidateException, DAException Update an structure validity period by calling theStructureValidityPeriodUpdateEvent- Parameters:
structureId- structure idstructureValidityPeriodId- structure validity period iddto- theDTOStructureValidityPeriodUpdate- Returns:
- the standard response
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
delete
@DeleteMapping(value="{structureValidityPeriodId:[0-9]+}", produces="application/json") public org.springframework.http.ResponseEntity<Void> delete(@PathVariable("structureId") Long structureId, @PathVariable("structureValidityPeriodId") Long structureValidityPeriodId) throws DAValidateException, DAException Delete the required structure validity period.StructureValidityPeriodDeleteEvent- Parameters:
structureId- the structure idstructureValidityPeriodId- the structure validity period id- Returns:
- the response entity
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-