Class AccountBankController

java.lang.Object
es.kukenan.smartfi.microservice.contracts.controller.AccountBankController

@RestController public class AccountBankController extends Object
Account bank controller.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    Contract service.
    static final String
    Path for Account Rest API.
    static final String
    Path for get active bank account.
    static final String
    Authority (role) required in order to be able to invoke greeting API.
    static final String
    Path for create new Account.
    protected es.kukenan.smartfi.common.service.jwt.JwtService
    JWT service for create a bearer to call products.
    private es.kukenan.smartfi.common.context.RequestContextManager
    Request context manager.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    private String
    createBearerToken(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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • API_ACCOUNT_BANK_PATH

      public static final String API_ACCOUNT_BANK_PATH
      Path for Account Rest API.
      See Also:
    • API_NEW_ACCOUNT_BANK_PATH

      public static final String API_NEW_ACCOUNT_BANK_PATH
      Path for create new Account.
      See Also:
    • API_ACTIVE_BANK_ACCOUNT_PATH

      public static final String API_ACTIVE_BANK_ACCOUNT_PATH
      Path for get active bank account.
      See Also:
    • API_AUTHORITIES

      public static final String 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 jwtService
      JWT service for create a bearer to call products.
    • accountBankService

      @Autowired private AccountBankService accountBankService
      Contract service.
    • requestContextManager

      @Autowired private es.kukenan.smartfi.common.context.RequestContextManager requestContextManager
      Request 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 credentials
      accountBankId - 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)