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

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

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Authority (role) required in order to be able to invoke greeting API.
    static final String
    Path for Account Rest API.
    private BankService
    Contract service.
    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<List<es.kukenan.smartfi.microservice.backoffice.dtos.core.common.BankDto>>
    getActiveBanks(es.kukenan.smartfi.common.security.WalletAuthentication authentication)
    Get active bank account.

    Methods inherited from class java.lang.Object

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

    • API_BANK_PATH

      public static final String API_BANK_PATH
      Path for Account Rest API.
      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.
    • bankService

      @Autowired private BankService bankService
      Contract service.
    • requestContextManager

      @Autowired private es.kukenan.smartfi.common.context.RequestContextManager requestContextManager
      Request context manager.
  • Constructor Details

    • BankController

      public BankController()
  • Method Details

    • getActiveBanks

      @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/banks", produces="application/json") public org.springframework.http.ResponseEntity<List<es.kukenan.smartfi.microservice.backoffice.dtos.core.common.BankDto>> getActiveBanks(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)