Package org.openwms.common.account
Class AccountController
java.lang.Object
org.openwms.core.http.AbstractWebController
org.openwms.common.account.AccountController
@Validated
@MeasuredRestController
public class AccountController
extends org.openwms.core.http.AbstractWebController
A AccountController is a measured and Spring managed REST controller that serves Account resources.
- Author:
- Heiko Scherrer
-
Field Summary
Modifier and TypeFieldDescriptionprivate final AccountMapper
private final AccountService
private final org.ameba.i18n.Translator
-
Constructor Summary
ConstructorDescriptionAccountController
(AccountService service, AccountMapper mapper, org.ameba.i18n.Translator translator) -
Method Summary
Modifier and TypeMethodDescriptionprivate AccountVO
addSelfLink
(AccountVO result) convertAndLinks
(List<Account> accounts) private AccountVO
convertAndLinks
(Account account) findAll()
org.springframework.http.ResponseEntity
<AccountVO> findByIdentifier
(String identifier) org.springframework.http.ResponseEntity
<AccountVO> findByName
(String name) org.springframework.http.ResponseEntity
<AccountVO> findByPKey
(String pKey) org.springframework.http.ResponseEntity
<AccountVO> org.springframework.http.ResponseEntity
<org.openwms.core.http.Index> index()
Methods inherited from class org.openwms.core.http.AbstractWebController
buildNOKResponse, buildNOKResponseWithKey, buildOKResponse, buildResponse, buildResponse, getLocationForCreatedResource, getLocationURIForCreatedResource, handleBehaviorAwareException, handleBusinessRuntimeException, handleConstraintViolationException, handleException, handleHttpBusinessException, handleRemovalNotAllowedException, handleTechnicalRuntimeException, handleValidationException, illegalArgumentException, translate
-
Field Details
-
service
-
mapper
-
translator
private final org.ameba.i18n.Translator translator
-
-
Constructor Details
-
AccountController
public AccountController(AccountService service, AccountMapper mapper, org.ameba.i18n.Translator translator)
-
-
Method Details
-
findAll
-
findByPKey
-
findDefault
@GetMapping(value="/v1/accounts", params="default", produces="application/vnd.openwms.common.account-v1+json") public org.springframework.http.ResponseEntity<AccountVO> findDefault() -
findByIdentifier
-
findByName
-
convertAndLinks
-
convertAndLinks
-
addSelfLink
-
index
@GetMapping("/v1/accounts/index") public org.springframework.http.ResponseEntity<org.openwms.core.http.Index> index()
-