Class CrewShellAddressService
java.lang.Object
overit.geocallapp.utilities.rs.common.PrivateService
overit.geocallapp.wfm.core.crewshell.rs1.crewshell.address.CrewShellAddressService
@RestController
@RequestMapping("workforce/crew-shells/r1/crew-shells/{crewShellId:[0-9]+}/addresses")
@Resource(logging=true)
public class CrewShellAddressService
extends PrivateService
Services to manage
BOCrewShellAddress objects. - Since:
- 16.0
- GCApi:
- rest
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<Void> Deletes the requiredBOCrewShellAddressobject by calling theCrewShellAddressDeleteEventevent.org.springframework.http.ResponseEntity<DTOCrewShellAddress> get(Long crewShell, Long id, Collection<String> fields) Retrieves the requiredBOCrewShellAddressobject by calling theCrewShellAddressLoadEventevent.org.springframework.http.ResponseEntity<PageResponse<DTOCrewShellAddress>> getCollection(@Valid Page page, Collection<String> fields, String order, Long crewShell, @Valid DTOCrewShellAddressFilter filter) Retrieves the collection of all the storedBOCrewShellAddressobjects by calling theCrewShellAddressSearchEventevent.org.springframework.http.ResponseEntity<Void> patch(Long crewShell, Long id, @Valid DTOCrewShellAddressUpdate dto) Updates the requiredBOCrewShellAddressobject by calling theCrewShellAddressUpdateEventevent.org.springframework.http.ResponseEntity<DTOIdentifier<Long>> post(Long crewShell, @Valid DTOCrewShellAddressInsert dto) Creates a newDTOCrewShellAddressobject by calling theCrewShellAddressInsertEventevent.
-
Constructor Details
-
CrewShellAddressService
public CrewShellAddressService()
-
-
Method Details
-
getCollection
@GetMapping(produces="application/json") public org.springframework.http.ResponseEntity<PageResponse<DTOCrewShellAddress>> getCollection(@RequestParam("_page") @Valid @Valid Page page, @RequestParam(required=false,name="_fields") Collection<String> fields, @RequestParam(required=false,name="_order") String order, @PathVariable("crewShellId") Long crewShell, @Valid @Valid DTOCrewShellAddressFilter filter) throws DAValidateException, DAException Retrieves the collection of all the storedBOCrewShellAddressobjects by calling theCrewShellAddressSearchEventevent.- Parameters:
page- thePageobject that will contain the paginated resultfields- the collection of fields that will be included in the responseorder- the ordering fieldcrewShell- theBOCrewShellAddressobject's crewShell fieldfilter- theDTOCrewShellAddressFilterobject- Returns:
- the
ResponseEntityobject containing the collection ofDTOCrewShellAddressobjects - Throws:
DAValidateException- if there is a data validation exceptionDAException- if a genericExceptionobject is thrown
-
get
@GetMapping(value="{crewAddressId:[0-9]+}", produces="application/json") public org.springframework.http.ResponseEntity<DTOCrewShellAddress> get(@PathVariable("crewShellId") Long crewShell, @PathVariable("crewAddressId") Long id, @RequestParam(required=false,name="_fields") Collection<String> fields) throws DAValidateException, DAException Retrieves the requiredBOCrewShellAddressobject by calling theCrewShellAddressLoadEventevent.- Parameters:
crewShell- theBOCrewShellAddressobject's crewShell fieldid- theBOCrewShellAddressobject's id fieldfields- the collection of fields that will be included in the response- Returns:
- the
ResponseEntityobject containing the loadedDTOCrewShellAddressobject - Throws:
DAValidateException- if there is a data validation exceptionDAException- if a genericExceptionobject is thrown
-
post
@PostMapping(consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<DTOIdentifier<Long>> post(@PathVariable("crewShellId") Long crewShell, @Valid @RequestBody @Valid DTOCrewShellAddressInsert dto) throws DAValidateException, DAException Creates a newDTOCrewShellAddressobject by calling theCrewShellAddressInsertEventevent.- Parameters:
crewShell- theDTOCrewShellAddressobject's crewShell fielddto- theDTOCrewShellAddressInsertobject- Returns:
- the
ResponseEntityobject containing the ID of the newly createdBOCrewShellAddressobject - Throws:
DAValidateException- if there is a data validation exceptionDAException- if a genericExceptionobject is thrown
-
patch
@PatchMapping(value="{crewAddressId:[0-9]+}", consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<Void> patch(@PathVariable("crewShellId") Long crewShell, @PathVariable("crewAddressId") Long id, @Valid @RequestBody @Valid DTOCrewShellAddressUpdate dto) throws DAValidateException, DAException Updates the requiredBOCrewShellAddressobject by calling theCrewShellAddressUpdateEventevent.- Parameters:
id- theBOCrewShellAddressobject's id fielddto- theDTOCrewShellAddressUpdateobject- Returns:
- the
ResponseEntityobject - Throws:
DAValidateException- if there is a data validation exceptionDAException- if a genericExceptionobject is thrown
-
delete
@DeleteMapping(value="{crewAddressId:[0-9]+}", produces="application/json") public org.springframework.http.ResponseEntity<Void> delete(@PathVariable("crewShellId") Long crewShell, @PathVariable("crewAddressId") Long id) throws DAValidateException, DAException Deletes the requiredBOCrewShellAddressobject by calling theCrewShellAddressDeleteEventevent.- Parameters:
crewShell- theBOCrewShellAddressobject's crewShell fieldid- the id of theBOCrewShellAddressobject to delete- Returns:
- the
ResponseEntityobject - Throws:
DAValidateException- if there is a data validation exceptionDAException- if a genericExceptionobject is thrown
-