All Known Subinterfaces:
ExtendedBackofficeClient
All Known Implementing Classes:
CoreBackofficeClientAdapter

public interface BackofficeClient
Contract that any backoffice client must implement.
  • Method Summary

    Modifier and Type
    Method
    Description
    es.kukenan.smartfi.dto.ResponseDTO<es.kukenan.smartfi.microservice.backoffice.dtos.core.contract.CountInfoDto>
    countContracts(String userId, String userToken)
    Application count.
    createCardProduct(String userId, String userToken)
    Extract the given user product details from the given (registered) product (must be supported, see wants method).
    createWalletProduct(String userId, String userToken)
    Extract the given user product details from the given (registered) product (must be supported, see wants method).
    es.kukenan.smartfi.common.api.dtos.ResultsPageDto<es.kukenan.smartfi.microservice.backoffice.dtos.core.contract.AccountBank>
    findAccountBanks(String idUserBackoffice)
    Create new account bank from user backoffice.
    es.kukenan.smartfi.microservice.backoffice.dtos.core.contract.AccountBank
    findAccountDetail(String idUserBackoffice, String accountBankId)
    Create new account bank from user backoffice.
    es.kukenan.smartfi.microservice.backoffice.dtos.core.contract.AccountBank
    findActiveBankAccount(String idUserBackoffice, String userToken)
    Get active bank account from user backoffice.
    List<es.kukenan.smartfi.microservice.backoffice.dtos.core.common.BankDto>
    findActiveBanks(String idUserBackoffice, String userToken)
    Get active banks.
    es.kukenan.smartfi.common.api.dtos.ResultsPageDto<es.kukenan.smartfi.microservice.backoffice.dtos.core.contract.Contract>
    findContract(String idUserBackoffice, String userToken, Integer pageNumber, Integer pageSize, String sortedBy, es.kukenan.smartfi.microservice.backoffice.dtos.core.contract.GetApplicationsRequestDto getApplicationsRequestDto)
    Get be contract from user backoffice.
    es.kukenan.smartfi.microservice.backoffice.dtos.core.contract.Contract
    findContractDetail(String idUserBackoffice, String userToken, String contractId)
    Get contract detail from user backoffice.
    List<es.kukenan.smartfi.microservice.backoffice.dtos.core.contract.ContractStateDto>
    findContractState(String idUserBackoffice, String userToken, String type)
    Get contract states from user backoffice.
    Extract the given user product id will search all the account withheld movements.
    es.kukenan.smartfi.microservice.contracts.api.movement.MovementDto
    findMovement(Product product, String movementId, String userToken)
    Extract the given user product id will search an specific movement.
    findMovements(ProductSearchRequest searchRequest, String userToken, String dateFrom, String dateTo, String type, String paginationKey, String number, String state, String reason, Boolean allMovements)
    Extract the given user product id will search all the account movements.
    ProductDetailDomain<? extends es.kukenan.smartfi.microservice.contracts.api.products.ProductDto>
    findProduct(ProductSearchRequest searchRequest, String userToken)
    Extract the given user product details from the given (registered) product (must be supported, see wants method).
    findProducts(UserBackoffice userBackoffice, List<String> subsystems)
    Extract the user product list from the given back office (must be supported, see wants method).
    findProducts(UserBackoffice userBackoffice, List<String> subsystems, ProductSearchFilter productSearchFilter, String userToken, String userIp)
    Extract the user product list from the given back office (must be supported, see wants method).
    List<es.kukenan.smartfi.microservice.contracts.api.movement.MovementDto>
    Extract the given user product id will search all the account withheld movements.
    The back office internal identifier.
    getCompanyLogo(String coreUserId, String userJwtToken, Integer companyId)
    Get company logo.
    getContractDocumentFile(String userId, String userToken, String contractDocumentId)
    Get contract document file.
    es.kukenan.smartfi.microservice.backoffice.dtos.core.contract.AccountBank
    saveAccountBank(String idUserBackoffice, String userToken, es.kukenan.smartfi.microservice.backoffice.dtos.core.contract.AccountBankRequestDto accountBankRequestDto)
    Create new account bank from user backoffice.
    es.kukenan.smartfi.dto.ResponseDTO<es.kukenan.smartfi.microservice.backoffice.dtos.backoffice.appointments.AppointmentDto>
    saveAppointment(String userId, String userToken, es.kukenan.smartfi.microservice.backoffice.dtos.backoffice.appointments.AppointmentRequest appointmentAndBankRequest)
    Save appointment to application.
    es.kukenan.smartfi.dto.ResponseDTO<es.kukenan.smartfi.microservice.backoffice.dtos.core.contract.Contract>
    saveContract(String idUserBackoffice, String userToken, es.kukenan.smartfi.microservice.backoffice.dtos.core.contract.NewApplicationRequestDto newApplicationRequestDto, String userIp, String userAgent)
    Create new application from user backoffice.
    es.kukenan.smartfi.dto.ResponseDTO<es.kukenan.smartfi.microservice.backoffice.dtos.core.contract.Contract>
    saveFilesToContract(String idUserBackoffice, String userToken, String contractId, List<org.springframework.web.multipart.MultipartFile> files)
    Save files to application.
    es.kukenan.smartfi.dto.ResponseDTO<es.kukenan.smartfi.microservice.backoffice.dtos.core.contract.Contract>
    saveFileToContract(String userId, String userToken, String contractDocumentId, org.springframework.web.multipart.MultipartFile file)
    Upload files.
    void
    updateConnectedContract(es.kukenan.smartfi.microservice.backoffice.dtos.core.contract.ContractCacheDto contractCacheDto, String userToken)
    Get be contract from user backoffice.
    es.kukenan.smartfi.dto.ResponseDTO<es.kukenan.smartfi.microservice.backoffice.dtos.core.contract.Contract>
    updateContractAppointment(String idUserBackoffice, String userToken, String contractId, es.kukenan.smartfi.microservice.backoffice.dtos.backoffice.appointments.AppointmentDto appointment)
    Save appointment to application.
    es.kukenan.smartfi.dto.ResponseDTO<Boolean>
    validNewContract(String idUserBackoffice, String userToken, String type)
    Validation if user can create Contract.
    default boolean
    wants(UserBackoffice userBackoffice)
    Determine if this client supports the given back ffice.
  • Method Details

    • getBackOfficeId

      Integer getBackOfficeId()
      The back office internal identifier.
      Returns:
      back office internal identifier.
    • wants

      default boolean wants(UserBackoffice userBackoffice)
      Determine if this client supports the given back ffice.
      Parameters:
      userBackoffice - the backoffice to check if supported.
      Returns:
      true if this client handles the given back office.
    • findProducts

      Future<List<ProductDomain>> findProducts(UserBackoffice userBackoffice, List<String> subsystems)
      Extract the user product list from the given back office (must be supported, see wants method). This method should be annotated with @Asyng to allow concurrent data querying.
      Parameters:
      userBackoffice - the user back office to extract products from.
      subsystems - subsystems from which the products are to retrieved. Set it to null to retrieve all API products.
      Returns:
      the user product list from the given extract products.
    • findProducts

      Future<List<ProductDomain>> findProducts(UserBackoffice userBackoffice, List<String> subsystems, ProductSearchFilter productSearchFilter, String userToken, String userIp)
      Extract the user product list from the given back office (must be supported, see wants method). This method should be annotated with @Asyng to allow concurrent data querying.
      Parameters:
      userBackoffice - the user back office to extract products from.
      subsystems - subsystems from which the products are to retrieved. Set it to null to retrieve all API products.
      productSearchFilter - the criteria to filter the products.
      userToken - user bearer.
      userIp - user Ip.
      Returns:
      the user product list from the given extract products.
    • findProduct

      ProductDetailDomain<? extends es.kukenan.smartfi.microservice.contracts.api.products.ProductDto> findProduct(ProductSearchRequest searchRequest, String userToken)
      Extract the given user product details from the given (registered) product (must be supported, see wants method).
      Parameters:
      searchRequest - the required data to find a product and build a full ProductDetailDomain.
      userToken - user bearer.
      Returns:
      the user product details extracted from the backoffice.
    • createWalletProduct

      List<ProductDomain> createWalletProduct(String userId, String userToken)
      Extract the given user product details from the given (registered) product (must be supported, see wants method).
      Parameters:
      userId - user identifier.
      userToken - user bearer.
      Returns:
      the user product details extracted from the backoffice.
    • createCardProduct

      List<ProductDomain> createCardProduct(String userId, String userToken)
      Extract the given user product details from the given (registered) product (must be supported, see wants method).
      Parameters:
      userId - user identifier.
      userToken - user bearer.
      Returns:
      the user product details extracted from the backoffice.
    • findMovements

      MovementDomain findMovements(ProductSearchRequest searchRequest, String userToken, String dateFrom, String dateTo, String type, String paginationKey, String number, String state, String reason, Boolean allMovements)
      Extract the given user product id will search all the account movements.
      Parameters:
      searchRequest - the product search request.
      userToken - user bearer.
      dateFrom - params searching.
      dateTo - params searching.
      type - params searching.
      paginationKey - params searching.
      number - imposition number.
      state - imposition state.
      reason - reason.
      allMovements - all movements.
      Returns:
      the user product details extracted from the backoffice.
    • findWithheldMovements

      List<es.kukenan.smartfi.microservice.contracts.api.movement.MovementDto> findWithheldMovements(ProductSearchRequest searchRequest, String userToken)
      Extract the given user product id will search all the account withheld movements.
      Parameters:
      searchRequest - searchRequest.
      userToken - userToken.
      Returns:
      user withholding movement list.
    • findDepositImpositions

      ImpositionDomain findDepositImpositions(ProductSearchRequest searchRequest, String userToken)
      Extract the given user product id will search all the account withheld movements.
      Parameters:
      searchRequest - searchRequest.
      userToken - userToken.
      Returns:
      user withholding movement list.
    • findMovement

      es.kukenan.smartfi.microservice.contracts.api.movement.MovementDto findMovement(Product product, String movementId, String userToken)
      Extract the given user product id will search an specific movement.
      Parameters:
      product - the (registered) product.
      movementId - searching param.
      userToken - bearer.
      Returns:
      movement
    • findContractState

      List<es.kukenan.smartfi.microservice.backoffice.dtos.core.contract.ContractStateDto> findContractState(String idUserBackoffice, String userToken, String type)
      Get contract states from user backoffice.
      Parameters:
      idUserBackoffice - the user back office.
      userToken - user bearer token.
      type - applcation type.
      Returns:
      the contract.
    • findContract

      es.kukenan.smartfi.common.api.dtos.ResultsPageDto<es.kukenan.smartfi.microservice.backoffice.dtos.core.contract.Contract> findContract(String idUserBackoffice, String userToken, Integer pageNumber, Integer pageSize, String sortedBy, es.kukenan.smartfi.microservice.backoffice.dtos.core.contract.GetApplicationsRequestDto getApplicationsRequestDto)
      Get be contract from user backoffice.
      Parameters:
      idUserBackoffice - the user back office.
      userToken - user bearer token.
      pageNumber - number of page to get.
      pageSize - size of list to return.
      sortedBy - sort param.
      getApplicationsRequestDto - body for filtering.
      Returns:
      the contract.
    • updateConnectedContract

      void updateConnectedContract(es.kukenan.smartfi.microservice.backoffice.dtos.core.contract.ContractCacheDto contractCacheDto, String userToken)
      Get be contract from user backoffice.
      Parameters:
      contractCacheDto - dto for change connected contract.
      userToken - authentication info.
    • findContractDetail

      es.kukenan.smartfi.microservice.backoffice.dtos.core.contract.Contract findContractDetail(String idUserBackoffice, String userToken, String contractId)
      Get contract detail from user backoffice.
      Parameters:
      idUserBackoffice - the user back office.
      userToken - user bearer token.
      contractId - contract identifier.
      Returns:
      the contract.
    • saveContract

      es.kukenan.smartfi.dto.ResponseDTO<es.kukenan.smartfi.microservice.backoffice.dtos.core.contract.Contract> saveContract(String idUserBackoffice, String userToken, es.kukenan.smartfi.microservice.backoffice.dtos.core.contract.NewApplicationRequestDto newApplicationRequestDto, String userIp, String userAgent)
      Create new application from user backoffice.
      Parameters:
      idUserBackoffice - the user back office.
      userToken - user bearer token.
      newApplicationRequestDto - new application data.
      userIp - user real ip
      userAgent - user-agent header
      Returns:
      the contract.
    • validNewContract

      es.kukenan.smartfi.dto.ResponseDTO<Boolean> validNewContract(String idUserBackoffice, String userToken, String type)
      Validation if user can create Contract.
      Parameters:
      idUserBackoffice - the user back office.
      userToken - user bearer token.
      type - contract type.
      Returns:
      the contract validation.
    • saveAccountBank

      es.kukenan.smartfi.microservice.backoffice.dtos.core.contract.AccountBank saveAccountBank(String idUserBackoffice, String userToken, es.kukenan.smartfi.microservice.backoffice.dtos.core.contract.AccountBankRequestDto accountBankRequestDto)
      Create new account bank from user backoffice.
      Parameters:
      idUserBackoffice - the user back office.
      userToken - user bearer token.
      accountBankRequestDto - new Account bank data.
      Returns:
      the contract.
    • findAccountBanks

      es.kukenan.smartfi.common.api.dtos.ResultsPageDto<es.kukenan.smartfi.microservice.backoffice.dtos.core.contract.AccountBank> findAccountBanks(String idUserBackoffice)
      Create new account bank from user backoffice.
      Parameters:
      idUserBackoffice - the user back office.
      Returns:
      the contract.
    • findActiveBankAccount

      es.kukenan.smartfi.microservice.backoffice.dtos.core.contract.AccountBank findActiveBankAccount(String idUserBackoffice, String userToken)
      Get active bank account from user backoffice.
      Parameters:
      idUserBackoffice - the user back office.
      userToken - user bearer.
      Returns:
      the contract.
    • findAccountDetail

      es.kukenan.smartfi.microservice.backoffice.dtos.core.contract.AccountBank findAccountDetail(String idUserBackoffice, String accountBankId)
      Create new account bank from user backoffice.
      Parameters:
      idUserBackoffice - the user back office.
      accountBankId - account bank id.
      Returns:
      the contract.
    • saveFilesToContract

      es.kukenan.smartfi.dto.ResponseDTO<es.kukenan.smartfi.microservice.backoffice.dtos.core.contract.Contract> saveFilesToContract(String idUserBackoffice, String userToken, String contractId, List<org.springframework.web.multipart.MultipartFile> files)
      Save files to application.
      Parameters:
      idUserBackoffice - the user back office.
      userToken - user bearer token.
      contractId - contract identifier.
      files - list of files to save.
      Returns:
      response object.
    • saveAppointment

      es.kukenan.smartfi.dto.ResponseDTO<es.kukenan.smartfi.microservice.backoffice.dtos.backoffice.appointments.AppointmentDto> saveAppointment(String userId, String userToken, es.kukenan.smartfi.microservice.backoffice.dtos.backoffice.appointments.AppointmentRequest appointmentAndBankRequest)
      Save appointment to application.
      Parameters:
      userId - the user back office.
      userToken - user bearer token.
      appointmentAndBankRequest - appointment request data.
      Returns:
      response object.
    • updateContractAppointment

      es.kukenan.smartfi.dto.ResponseDTO<es.kukenan.smartfi.microservice.backoffice.dtos.core.contract.Contract> updateContractAppointment(String idUserBackoffice, String userToken, String contractId, es.kukenan.smartfi.microservice.backoffice.dtos.backoffice.appointments.AppointmentDto appointment)
      Save appointment to application.
      Parameters:
      idUserBackoffice - the user back office.
      userToken - user bearer token.
      contractId - contract identifier.
      appointment - appointment to save.
      Returns:
      response object.
    • countContracts

      es.kukenan.smartfi.dto.ResponseDTO<es.kukenan.smartfi.microservice.backoffice.dtos.core.contract.CountInfoDto> countContracts(String userId, String userToken)
      Application count.
      Parameters:
      userId - user identifier.
      userToken - user credentials.
      Returns:
      count object.
    • getContractDocumentFile

      File getContractDocumentFile(String userId, String userToken, String contractDocumentId)
      Get contract document file.
      Parameters:
      userId - user identifier.
      userToken - user credentials.
      contractDocumentId - contract document identifier.
      Returns:
      File object.
    • saveFileToContract

      es.kukenan.smartfi.dto.ResponseDTO<es.kukenan.smartfi.microservice.backoffice.dtos.core.contract.Contract> saveFileToContract(String userId, String userToken, String contractDocumentId, org.springframework.web.multipart.MultipartFile file)
      Upload files.
      Parameters:
      userId - user identifier.
      userToken - user token.
      contractDocumentId - application identifier.
      file - file uploaded.
      Returns:
      upload files response.
    • findActiveBanks

      List<es.kukenan.smartfi.microservice.backoffice.dtos.core.common.BankDto> findActiveBanks(String idUserBackoffice, String userToken)
      Get active banks.
      Parameters:
      idUserBackoffice - the user back office.
      userToken - user bearer.
      Returns:
      list of active banks.
    • getCompanyLogo

      File getCompanyLogo(String coreUserId, String userJwtToken, Integer companyId)
      Get company logo.
      Parameters:
      coreUserId - user identifier.
      userJwtToken - user credentials.
      companyId - company identifier.
      Returns:
      File company logo.