Class AccountBankController
java.lang.Object
es.kukenan.smartfi.microservice.contracts.controller.AccountBankController
Account bank controller.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate AccountBankServiceContract service.static final StringPath for Account Rest API.static final StringPath for get active bank account.static final StringAuthority (role) required in order to be able to invoke greeting API.static final StringPath for create new Account.protected es.kukenan.smartfi.common.service.jwt.JwtServiceJWT service for create a bearer to call products.private es.kukenan.smartfi.common.context.RequestContextManagerRequest context manager. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate StringcreateBearerToken(es.kukenan.smartfi.common.security.WalletAuthentication walletAuthentication) org.springframework.http.ResponseEntity<es.kukenan.smartfi.common.api.dtos.ResultsPageDto<es.kukenan.smartfi.microservice.backoffice.dtos.core.contract.AccountBank>>getAccountBanks(es.kukenan.smartfi.common.security.WalletAuthentication authentication) Get User applications.org.springframework.http.ResponseEntity<es.kukenan.smartfi.microservice.backoffice.dtos.core.contract.AccountBank>getActiveBankAccount(es.kukenan.smartfi.common.security.WalletAuthentication authentication) Get active bank account.org.springframework.http.ResponseEntity<es.kukenan.smartfi.microservice.backoffice.dtos.core.contract.AccountBank>getContractDetail(es.kukenan.smartfi.common.security.WalletAuthentication authentication, String accountBankId) Get Contracts detail.org.springframework.http.ResponseEntity<es.kukenan.smartfi.microservice.backoffice.dtos.core.contract.AccountBank>saveAccountBank(es.kukenan.smartfi.common.security.WalletAuthentication authentication, es.kukenan.smartfi.microservice.backoffice.dtos.core.contract.AccountBankRequestDto accountBankRequestDto) Create Contract.
-
Field Details
-
API_ACCOUNT_BANK_PATH
Path for Account Rest API.- See Also:
-
API_NEW_ACCOUNT_BANK_PATH
Path for create new Account.- See Also:
-
API_ACTIVE_BANK_ACCOUNT_PATH
Path for get active bank account.- See Also:
-
API_AUTHORITIES
Authority (role) required in order to be able to invoke greeting API.- See Also:
-
jwtService
@Autowired protected es.kukenan.smartfi.common.service.jwt.JwtService jwtServiceJWT service for create a bearer to call products. -
accountBankService
Contract service. -
requestContextManager
@Autowired private es.kukenan.smartfi.common.context.RequestContextManager requestContextManagerRequest context manager.
-
-
Constructor Details
-
AccountBankController
public AccountBankController()
-
-
Method Details
-
saveAccountBank
@PreAuthorize("(hasRole(\'ROLE_ACCESS_USER\') or hasRole(\'ROLE_ACCESS_AGENT\') or hasRole(\'ROLE_ACCESS_SUPERVISOR\')) and (hasRole(\'ROLE_LEVEL_USER_PWD\') or hasRole(\'ROLE_LEVEL_USER_SCA\'))") @PostMapping(path="/api/v1/account-banks/new-account-bank", consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<es.kukenan.smartfi.microservice.backoffice.dtos.core.contract.AccountBank> saveAccountBank(es.kukenan.smartfi.common.security.WalletAuthentication authentication, @RequestBody es.kukenan.smartfi.microservice.backoffice.dtos.core.contract.AccountBankRequestDto accountBankRequestDto) Create Contract.- Parameters:
authentication- user authentication.accountBankRequestDto- new application data.- Returns:
- the created contract.
-
getAccountBanks
@PreAuthorize("(hasRole(\'ROLE_ACCESS_USER\') or hasRole(\'ROLE_ACCESS_AGENT\') or hasRole(\'ROLE_ACCESS_SUPERVISOR\')) and (hasRole(\'ROLE_LEVEL_USER_PWD\') or hasRole(\'ROLE_LEVEL_USER_SCA\'))") @GetMapping(path="/api/v1/account-banks", produces="application/json") public org.springframework.http.ResponseEntity<es.kukenan.smartfi.common.api.dtos.ResultsPageDto<es.kukenan.smartfi.microservice.backoffice.dtos.core.contract.AccountBank>> getAccountBanks(es.kukenan.smartfi.common.security.WalletAuthentication authentication) Get User applications.- Parameters:
authentication- user credentials- Returns:
- contracts.
-
getContractDetail
@PreAuthorize("(hasRole(\'ROLE_ACCESS_USER\') or hasRole(\'ROLE_ACCESS_AGENT\') or hasRole(\'ROLE_ACCESS_SUPERVISOR\')) and (hasRole(\'ROLE_LEVEL_USER_PWD\') or hasRole(\'ROLE_LEVEL_USER_SCA\'))") @GetMapping(path="/api/v1/account-banks/{accountBankId}", produces="application/json") public org.springframework.http.ResponseEntity<es.kukenan.smartfi.microservice.backoffice.dtos.core.contract.AccountBank> getContractDetail(es.kukenan.smartfi.common.security.WalletAuthentication authentication, @PathVariable(name="accountBankId") String accountBankId) Get Contracts detail.- Parameters:
authentication- user credentialsaccountBankId- parent session- Returns:
- contracts.
-
getActiveBankAccount
@PreAuthorize("(hasRole(\'ROLE_ACCESS_USER\') or hasRole(\'ROLE_ACCESS_AGENT\') or hasRole(\'ROLE_ACCESS_SUPERVISOR\')) and (hasRole(\'ROLE_LEVEL_USER_PWD\') or hasRole(\'ROLE_LEVEL_USER_SCA\'))") @GetMapping(path="/api/v1/account-banks/active", produces="application/json") public org.springframework.http.ResponseEntity<es.kukenan.smartfi.microservice.backoffice.dtos.core.contract.AccountBank> getActiveBankAccount(es.kukenan.smartfi.common.security.WalletAuthentication authentication) Get active bank account.- Parameters:
authentication- user credentials- Returns:
- contracts.
-
createBearerToken
private String createBearerToken(es.kukenan.smartfi.common.security.WalletAuthentication walletAuthentication)
-