Class AccountTypeService
java.lang.Object
overit.geocallapp.utilities.rs.common.PrivateService
overit.geocallapp.wfm.accounts.rs1.type.AccountTypeService
@RestController
@RequestMapping("assets/accounts/r1/types")
@Resource(logging=true)
public class AccountTypeService
extends PrivateService
Service to manage account type
- Since:
- 16.0
- GCApi:
- rest
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<DTOAccountType> Retrieves the required account type.org.springframework.http.ResponseEntity<PageResponse<DTOAccountType>> getCollection(@Valid Page page, @Valid String language, Collection<String> fields, String order, @Valid DTOAccountTypeFilter filter) Retrieves all the stored account types.org.springframework.http.ResponseEntity<Void> patch(Long id, @Valid DTOAccountTypeUpdate dto) Update an account type by calling theAccountTypeUpdateEventorg.springframework.http.ResponseEntity<DTOIdentifier<Long>> Create a new account type by calling theAccountTypeInsertEvent
-
Constructor Details
-
AccountTypeService
public AccountTypeService()
-
-
Method Details
-
getCollection
@GetMapping(produces="application/json") public org.springframework.http.ResponseEntity<PageResponse<DTOAccountType>> getCollection(@RequestParam("_page") @Valid @Valid Page page, @RequestParam(required=false,name="_language",defaultValue="user") @Valid @Valid String language, @RequestParam(required=false,name="_fields") Collection<String> fields, @RequestParam(required=false,name="_order") String order, @Valid @Valid DTOAccountTypeFilter filter) throws DAValidateException, DAException Retrieves all the stored account types.AccountTypeSearchEvent- Parameters:
page- the required result pagelanguage- the user languagefields- the collection of fields the response will containorder- the ordering fieldfilter- the specifiedDTOAccountTypeFilter- Returns:
- the response containing the current result page
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
get
@GetMapping(value="{accountTypeId:[0-9]+}", produces="application/json") public org.springframework.http.ResponseEntity<DTOAccountType> get(@PathVariable("accountTypeId") Long id, @RequestParam(required=false,name="_language",defaultValue="user") @Valid @Valid String language, @RequestParam(required=false,name="_fields") Collection<String> fields) throws DAValidateException, DAException Retrieves the required account type.AccountTypeLoadEvent- Parameters:
id- the account type idlanguage- the user languagefields- the collection of fields the response will contain- Returns:
- the response containing the required account type
- 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(@Valid @RequestBody @Valid DTOAccountTypeInsert dto) throws DAValidateException, DAException Create a new account type by calling theAccountTypeInsertEvent- Parameters:
dto- theDTOAccountTypeInsert- Returns:
- the standard response containing the new account type id
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
patch
@PatchMapping(value="{accountTypeId:[0-9]+}", consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<Void> patch(@PathVariable("accountTypeId") Long id, @Valid @RequestBody @Valid DTOAccountTypeUpdate dto) throws DAValidateException, DAException Update an account type by calling theAccountTypeUpdateEvent- Parameters:
id- the account type iddto- theDTOAccountTypeUpdate- Returns:
- the standard response
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-