Class FirmController

java.lang.Object
es.kukenan.smartfi.microservice.firm.controller.FirmController

@RestController public class FirmController extends Object
firmController firm controller.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Base path for products Rest API.
    static final String
    Path for single firm Rest API.
    private FirmService
    FirmService service.
    private es.kukenan.smartfi.common.service.jwt.JwtService
    JwtService.
    private es.kukenan.smartfi.common.context.RequestContextManager
    Request context for send events.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    reactor.core.publisher.Mono<org.springframework.http.ResponseEntity<byte[]>>
    completeSignProcess(es.kukenan.smartfi.common.service.jwt.WalletAuthenticationJwtImpl walletAuthenticationJwt, String firmId)
    Signature endpoint to complete a signature process.
    org.springframework.http.ResponseEntity<es.kukenan.smartfi.microservice.firm.api.firmcontrol.response.FirmControlResponseId>
    createFirm(es.kukenan.smartfi.common.service.jwt.WalletAuthenticationJwtImpl walletAuthenticationJwt, es.kukenan.smartfi.microservice.firm.api.firmcontrol.request.FirmControlRequestDto firmControlRequest)
    firm endpoint create firm.
    org.springframework.http.ResponseEntity<es.kukenan.smartfi.microservice.firm.api.firmcontrol.response.FirmControlResponseId>
    deleteOperation(es.kukenan.smartfi.common.service.jwt.WalletAuthenticationJwtImpl walletAuthenticationJwt, String firmId)
    firm endpoint delete firm.
    org.springframework.http.ResponseEntity<es.kukenan.smartfi.microservice.firm.api.firmcontrol.response.FirmControlResponseDto>
    getAllFirms(es.kukenan.smartfi.common.service.jwt.WalletAuthenticationJwtImpl walletAuthenticationJwt, String status, String paginationKey)
    Firm endpoint get all user contract.
    org.springframework.http.ResponseEntity<es.kukenan.smartfi.microservice.firm.api.firmcontrol.response.FirmOtpRequired>
    singSignature(es.kukenan.smartfi.common.service.jwt.WalletAuthenticationJwtImpl walletAuthenticationJwt, String firmId)
    firm endpoint complete signature process.

    Methods inherited from class java.lang.Object

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

    • API_BASE_PATH

      public static final String API_BASE_PATH
      Base path for products Rest API.
      See Also:
    • API_FIRM_PATH

      public static final String API_FIRM_PATH
      Path for single firm Rest API.
      See Also:
    • firmService

      @Autowired private FirmService firmService
      FirmService service.
    • jwtService

      @Autowired private es.kukenan.smartfi.common.service.jwt.JwtService jwtService
      JwtService.
    • requestContextManager

      @Autowired private es.kukenan.smartfi.common.context.RequestContextManager requestContextManager
      Request context for send events.
  • Constructor Details

    • FirmController

      public FirmController()
  • Method Details

    • getAllFirms

      @GetMapping(produces="application/json", path="/api/v1/firm") public org.springframework.http.ResponseEntity<es.kukenan.smartfi.microservice.firm.api.firmcontrol.response.FirmControlResponseDto> getAllFirms(es.kukenan.smartfi.common.service.jwt.WalletAuthenticationJwtImpl walletAuthenticationJwt, @RequestParam(required=false) String status, @RequestParam(value="paginationKey",required=false,defaultValue="0") String paginationKey) throws NoSuchAlgorithmException
      Firm endpoint get all user contract.
      Parameters:
      walletAuthenticationJwt - smartfi Authentication.
      status - Operations will be returned in the indicated status.
      paginationKey - paginationKey.
      Returns:
      a list of firm.
      Throws:
      NoSuchAlgorithmException - exception algorithm.
    • createFirm

      @PostMapping(produces="application/json", path="/api/v1/firm") public org.springframework.http.ResponseEntity<es.kukenan.smartfi.microservice.firm.api.firmcontrol.response.FirmControlResponseId> createFirm(es.kukenan.smartfi.common.service.jwt.WalletAuthenticationJwtImpl walletAuthenticationJwt, @RequestBody es.kukenan.smartfi.microservice.firm.api.firmcontrol.request.FirmControlRequestDto firmControlRequest) throws NoSuchAlgorithmException
      firm endpoint create firm.
      Parameters:
      walletAuthenticationJwt - smartfi Authentication.
      firmControlRequest - firm Control Request.
      Returns:
      Error if Otp is incorrect
      Throws:
      NoSuchAlgorithmException - exception algorithm.
    • deleteOperation

      @DeleteMapping(produces="application/json", path="/api/v1/firm/{firmId}") public org.springframework.http.ResponseEntity<es.kukenan.smartfi.microservice.firm.api.firmcontrol.response.FirmControlResponseId> deleteOperation(es.kukenan.smartfi.common.service.jwt.WalletAuthenticationJwtImpl walletAuthenticationJwt, @PathVariable String firmId) throws NoSuchAlgorithmException
      firm endpoint delete firm.
      Parameters:
      walletAuthenticationJwt - smartfi Authentication.
      firmId - signatureId
      Returns:
      Error if Otp is incorrect
      Throws:
      NoSuchAlgorithmException - exception algorithm.
    • singSignature

      @PutMapping(produces="application/json", path="/api/v1/firm/{firmId}") public org.springframework.http.ResponseEntity<es.kukenan.smartfi.microservice.firm.api.firmcontrol.response.FirmOtpRequired> singSignature(es.kukenan.smartfi.common.service.jwt.WalletAuthenticationJwtImpl walletAuthenticationJwt, @PathVariable String firmId)
      firm endpoint complete signature process.
      Parameters:
      walletAuthenticationJwt - smartfi Authentication.
      firmId - Signature Id.
      Returns:
      Error if Otp is incorrect
    • completeSignProcess

      @PatchMapping("/api/v1/firm/{firmId}") public reactor.core.publisher.Mono<org.springframework.http.ResponseEntity<byte[]>> completeSignProcess(es.kukenan.smartfi.common.service.jwt.WalletAuthenticationJwtImpl walletAuthenticationJwt, @PathVariable String firmId)
      Signature endpoint to complete a signature process.
      Parameters:
      walletAuthenticationJwt - smartfi Authentication.
      firmId - signatureId.
      Returns:
      signature id.