Class ProductsRestController

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

@RestController public class ProductsRestController extends Object
Products service Rest API controller.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Path for the movements of a single asset Rest API.
    static final String
    Path for single asset Rest API.
    static final String
    Path for assets Rest API.
    static final String
    Path for product detail with assets Rest API.
    static final String
    Authority (role) required in order to be able to invoke greeting API.
    static final String
    Base path for products Rest API.
    static final String
    Path for a comment.
    static final String
    REST API create new wallet.
    static final String
    REST API create new wallet.
    static final String
    Path for cvv card Rest API.
    static final String
    Path for deposit impositions.
    static final String
    Path for document movement detail Rest API.
    static final String
    Path for document movements list Rest API.
    static final String
    Path for managed products Rest API.
    static final String
    Path for movement's comment.
    static final String
    Path for movements Rest API.
    static final String
    Path for movements Rest API.
    static final String
    Path for pin card Rest API.
    static final String
    Path for single product Rest API.
    static final String
    Path for single product position Rest API.
    static final String
    Path for receipts Rest API.
    static final String
    Path for repayments Rest API.
    static final String
    Path for withheld movements Rest API.
    Assets service.
    Connected Contract Cache Operation.
    Contract Service.
    protected es.kukenan.smartfi.common.service.jwt.JwtService
    JWT service for create a bearer to call products.
    Movements service.
    Products service.
    private es.kukenan.smartfi.common.context.RequestContextManager
    Request context manager.
    scaMovementsService service.
  • 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.microservice.contracts.api.products.ProductDto>
    createCard(es.kukenan.smartfi.common.security.WalletAuthentication walletAuthentication)
    Products position query endpoint.
    org.springframework.http.ResponseEntity<es.kukenan.smartfi.microservice.contracts.api.products.ProductDto>
    createWallet(es.kukenan.smartfi.common.security.WalletAuthentication walletAuthentication)
    Products position query endpoint.
    org.springframework.http.ResponseEntity<es.kukenan.smartfi.microservice.contracts.api.movement.DepositImpositionResponseDto>
    findDepositImpositions(String productId, es.kukenan.smartfi.common.security.WalletAuthentication walletAuthentication, javax.servlet.http.HttpServletRequest request)
    Products deposit imposition query endpoint.
    org.springframework.http.ResponseEntity<es.kukenan.smartfi.microservice.contracts.api.movement.MovementDto>
    findMovement(String productId, String movementId, es.kukenan.smartfi.common.security.WalletAuthentication walletAuthentication, javax.servlet.http.HttpServletRequest request)
    Products an sepecific movement query endpoint.
    org.springframework.http.ResponseEntity<es.kukenan.smartfi.microservice.contracts.api.movement.MovementsResponseDto>
    findMovements(String productId, String dateFrom, String dateTo, String type, String paginationKey, String number, String state, String reason, es.kukenan.smartfi.common.security.WalletAuthentication walletAuthentication, javax.servlet.http.HttpServletRequest request)
    Products movement query endpoint.
    org.springframework.http.ResponseEntity<es.kukenan.smartfi.microservice.contracts.api.products.ProductDto>
    findProduct(String productId, es.kukenan.smartfi.common.security.WalletAuthentication walletAuthentication)
    Product detail endpoint.
    org.springframework.http.ResponseEntity<es.kukenan.smartfi.microservice.contracts.api.assets.AssetDto>
    findProductAssetDetail(String productId, String assetId, es.kukenan.smartfi.common.security.WalletAuthentication walletAuthentication)
    Products asset detail query endpoint.
    org.springframework.http.ResponseEntity<es.kukenan.smartfi.microservice.contracts.api.movement.MovementsResponseDto>
    findProductAssetMovements(String productId, String assetId, String dateFrom, String dateTo, String paginationKey, es.kukenan.smartfi.common.security.WalletAuthentication walletAuthentication, javax.servlet.http.HttpServletRequest request)
    Products asset movements query endpoint.
    org.springframework.http.ResponseEntity<es.kukenan.smartfi.microservice.contracts.api.assets.AssetsResponseDto>
    findProductAssets(String productId, es.kukenan.smartfi.common.security.WalletAuthentication walletAuthentication)
    Products assets query endpoint.
    org.springframework.http.ResponseEntity<es.kukenan.smartfi.microservice.contracts.api.products.ProductsResponseDto>
    findProductComposition(String productId, es.kukenan.smartfi.common.security.WalletAuthentication walletAuthentication)
    Product composition endpoint (products managed by the given product).
    org.springframework.http.ResponseEntity<es.kukenan.smartfi.microservice.contracts.api.products.ProductDto>
    findProductPosition(String productId, es.kukenan.smartfi.common.security.WalletAuthentication walletAuthentication)
    Products position query endpoint.
    org.springframework.http.ResponseEntity<es.kukenan.smartfi.microservice.contracts.api.products.ProductsMapResponseDto>
    findProducts(es.kukenan.smartfi.common.security.WalletAuthentication walletAuthentication, String byType, Boolean withPostedBalance, String byStatus, String bySignature, String byCurrency, String byService, String userIp)
    Products endpoint.
    org.springframework.http.ResponseEntity<es.kukenan.smartfi.microservice.contracts.api.products.ProductDto>
    findProductWithAssetsTypes(String productId, es.kukenan.smartfi.common.security.WalletAuthentication walletAuthentication)
    Product detail with assets types endpoint.
    org.springframework.http.ResponseEntity<es.kukenan.smartfi.microservice.contracts.api.receipt.ReceiptsResponseDto>
    findReceipts(String productId, String paginationKey, es.kukenan.smartfi.common.security.WalletAuthentication walletAuthentication)
    Products receipts query endpoint.
    org.springframework.http.ResponseEntity<es.kukenan.smartfi.microservice.contracts.api.repayment.LoanRepaymentsResponseDto>
    findRepayments(String productId, String dateFrom, String dateTo, es.kukenan.smartfi.common.security.WalletAuthentication walletAuthentication)
    Product (loan) repayments endpoint.
    org.springframework.http.ResponseEntity<es.kukenan.smartfi.microservice.contracts.api.movement.MovementsResponseDto>
    findWithheldMovements(String productId, String dateF, String dateT, String typeM, String paginationKeyM, String numberM, String stateM, String reasonM, es.kukenan.smartfi.common.security.WalletAuthentication walletAuthentication, javax.servlet.http.HttpServletRequest request)
    Products withheld movements query endpoint.
    org.springframework.http.ResponseEntity<es.kukenan.smartfi.microservice.contracts.api.common.DocumentContentDto>
    getMovementDocument(String productId, String movementId, String reportType, String reference, String userIp, es.kukenan.smartfi.common.security.WalletAuthentication walletAuthentication)
    Products movement detail pdf or csv document.
    org.springframework.http.ResponseEntity<es.kukenan.smartfi.microservice.contracts.api.common.DocumentContentDto>
    getMovementsDocument(String productId, String reportType, String dateFrom, String dateTo, String type, String reason, String number, String state, String userIp, es.kukenan.smartfi.common.security.WalletAuthentication walletAuthentication, javax.servlet.http.HttpServletRequest request)
    Products movement list pdf or csv document.

    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_PRODUCT_PATH

      public static final String API_PRODUCT_PATH
      Path for single product Rest API.
      See Also:
    • API_MOVEMENTS_PATH

      public static final String API_MOVEMENTS_PATH
      Path for movements Rest API.
      See Also:
    • API_MOVEMENT_PATH

      public static final String API_MOVEMENT_PATH
      Path for movements Rest API.
      See Also:
    • API_MOVEMENT_COMMENT

      public static final String API_MOVEMENT_COMMENT
      Path for movement's comment.
      See Also:
    • API_WITHHELD_MOVEMENTS_PATH

      public static final String API_WITHHELD_MOVEMENTS_PATH
      Path for withheld movements Rest API.
      See Also:
    • API_DOCUMENT_MOVEMENTS_PATH

      public static final String API_DOCUMENT_MOVEMENTS_PATH
      Path for document movements list Rest API.
      See Also:
    • API_DOCUMENT_MOVEMENT_PATH

      public static final String API_DOCUMENT_MOVEMENT_PATH
      Path for document movement detail Rest API.
      See Also:
    • API_DEPOSITS_IMPOSTIONS_PATH

      public static final String API_DEPOSITS_IMPOSTIONS_PATH
      Path for deposit impositions.
      See Also:
    • API_REPAYMENTS_PATH

      public static final String API_REPAYMENTS_PATH
      Path for repayments Rest API.
      See Also:
    • API_ASSETS_PATH

      public static final String API_ASSETS_PATH
      Path for assets Rest API.
      See Also:
    • API_ASSET_PATH

      public static final String API_ASSET_PATH
      Path for single asset Rest API.
      See Also:
    • API_ASSET_MOVEMENTS_PATH

      public static final String API_ASSET_MOVEMENTS_PATH
      Path for the movements of a single asset Rest API.
      See Also:
    • API_MANAGED_PRODUCTS_PATH

      public static final String API_MANAGED_PRODUCTS_PATH
      Path for managed products Rest API.
      See Also:
    • API_PIN_CARD_PATH

      public static final String API_PIN_CARD_PATH
      Path for pin card Rest API.
      See Also:
    • API_CVV_CARD_PATH

      public static final String API_CVV_CARD_PATH
      Path for cvv card Rest API.
      See Also:
    • API_ASSETS_TYPES_PATH

      public static final String API_ASSETS_TYPES_PATH
      Path for product detail with assets Rest API.
      See Also:
    • API_RECEIPTS_PATH

      public static final String API_RECEIPTS_PATH
      Path for receipts Rest API.
      See Also:
    • API_PRODUCT_POSITION_PATH

      public static final String API_PRODUCT_POSITION_PATH
      Path for single product position Rest API.
      See Also:
    • API_COMMENT

      public static final String API_COMMENT
      Path for a comment.
      See Also:
    • API_CREATE_WALLET_PATH

      public static final String API_CREATE_WALLET_PATH
      REST API create new wallet.
      See Also:
    • API_CREATE_CARD_PATH

      public static final String API_CREATE_CARD_PATH
      REST API create new wallet.
      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.
    • productsService

      @Autowired private ProductsService productsService
      Products service.
    • movementService

      @Autowired private MovementsService movementService
      Movements service.
    • scaMovementsService

      @Autowired private ScaMovementsService scaMovementsService
      scaMovementsService service.
    • assetsService

      @Autowired private AssetsService assetsService
      Assets service.
    • requestContextManager

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

      @Autowired private ConnectedContractCacheOperation connectedContractCacheOperation
      Connected Contract Cache Operation.
    • contractService

      @Autowired private ContractService contractService
      Contract Service.
  • Constructor Details

    • ProductsRestController

      public ProductsRestController()
  • Method Details

    • findProducts

      @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(produces="application/json", path="/api/v1/products") public org.springframework.http.ResponseEntity<es.kukenan.smartfi.microservice.contracts.api.products.ProductsMapResponseDto> findProducts(es.kukenan.smartfi.common.security.WalletAuthentication walletAuthentication, @RequestParam(required=false) String byType, @RequestParam(required=false) Boolean withPostedBalance, @RequestParam(required=false) String byStatus, @RequestParam(required=false) String bySignature, @RequestParam(required=false) String byCurrency, @RequestParam(required=false) String byService, @RequestHeader(name="X-SKYLINE-USER-IP",defaultValue="") String userIp)
      Products endpoint.
      Parameters:
      walletAuthentication - user credentials.
      byType - types to filter
      withPostedBalance - flag to filter for posted balance
      byStatus - status to filter
      bySignature - signatures to filter
      byCurrency - currency to filter
      byService - service to filter
      userIp - user Ip.
      Returns:
      products movements.
    • findProduct

      @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(produces="application/json", path="/api/v1/products/{productId}") public org.springframework.http.ResponseEntity<es.kukenan.smartfi.microservice.contracts.api.products.ProductDto> findProduct(@PathVariable(name="productId") String productId, es.kukenan.smartfi.common.security.WalletAuthentication walletAuthentication)
      Product detail endpoint.
      Parameters:
      productId - product identifier.
      walletAuthentication - user credentials.
      Returns:
      products movements.
    • findMovements

      @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(produces="application/json", path="/api/v1/products/{productId}/movements") public org.springframework.http.ResponseEntity<es.kukenan.smartfi.microservice.contracts.api.movement.MovementsResponseDto> findMovements(@PathVariable("productId") String productId, @RequestParam(value="dateFrom",required=false) String dateFrom, @RequestParam(value="dateTo",required=false) String dateTo, @RequestParam(value="type",required=false) String type, @RequestParam(value="paginationKey",required=false) String paginationKey, @RequestParam(value="number",required=false) String number, @RequestParam(value="state",required=false) String state, @RequestParam(value="reason",required=false) String reason, es.kukenan.smartfi.common.security.WalletAuthentication walletAuthentication, javax.servlet.http.HttpServletRequest request)
      Products movement query endpoint.
      Parameters:
      productId - product identifier which movements are to be retrieved.
      dateFrom - full from date in RFC3339 format with no separators (yyyymmdd).
      dateTo - full to date in RFC3339 format with no separators (yyyymmdd).
      type - movement type code.
      paginationKey - pagination key used to request next result page.
      number - imposition number.
      state - imposition state.
      reason - reason.
      walletAuthentication - user credentials.
      request - HTTP servlet request.
      Returns:
      products movements.
    • findDepositImpositions

      @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(produces="application/json", path="/api/v1/products/{productId}/impositions") public org.springframework.http.ResponseEntity<es.kukenan.smartfi.microservice.contracts.api.movement.DepositImpositionResponseDto> findDepositImpositions(@PathVariable("productId") String productId, es.kukenan.smartfi.common.security.WalletAuthentication walletAuthentication, javax.servlet.http.HttpServletRequest request)
      Products deposit imposition query endpoint.
      Parameters:
      productId - product identifier which deposit impositions are to be retrieved.
      walletAuthentication - user credentials.
      request - HTTP servlet request.
      Returns:
      deposit impositions.
    • findWithheldMovements

      @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(produces="application/json", path="/api/v1/products/{productId}/movements/withholdings") public org.springframework.http.ResponseEntity<es.kukenan.smartfi.microservice.contracts.api.movement.MovementsResponseDto> findWithheldMovements(@PathVariable("productId") String productId, @RequestParam(value="dateFrom",required=false) String dateF, @RequestParam(value="dateTo",required=false) String dateT, @RequestParam(value="type",required=false) String typeM, @RequestParam(value="paginationKey",required=false) String paginationKeyM, @RequestParam(value="number",required=false) String numberM, @RequestParam(value="state",required=false) String stateM, @RequestParam(value="reason",required=false) String reasonM, es.kukenan.smartfi.common.security.WalletAuthentication walletAuthentication, javax.servlet.http.HttpServletRequest request)
      Products withheld movements query endpoint.
      Parameters:
      productId - product identifier which movements are to be retrieved.
      dateF - min date which movements are to be retrieved
      dateT - max date which movements are to be retrieved.
      typeM - type which movements are to be retrieved.
      paginationKeyM - pagination which movements are to be retrieved.
      numberM - number which movements are to be retrieved.
      stateM - state which movements are to be retrieved.
      reasonM - reason which movements are to be retrieved.
      walletAuthentication - user credentials.
      request - request data.
      Returns:
      products movements.
    • findMovement

      @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(produces="application/json", path="/api/v1/products/{productId}/movements/{movementId}") public org.springframework.http.ResponseEntity<es.kukenan.smartfi.microservice.contracts.api.movement.MovementDto> findMovement(@PathVariable("productId") String productId, @PathVariable("movementId") String movementId, es.kukenan.smartfi.common.security.WalletAuthentication walletAuthentication, javax.servlet.http.HttpServletRequest request)
      Products an sepecific movement query endpoint.
      Parameters:
      productId - product identifier which movements are to be retrieved.
      movementId - specific movement identifier.
      walletAuthentication - user credentials.
      request - HTTP servlet request.
      Returns:
      an specific movement detail.
    • findRepayments

      @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(produces="application/json", path="/api/v1/products/{productId}/repayments") public org.springframework.http.ResponseEntity<es.kukenan.smartfi.microservice.contracts.api.repayment.LoanRepaymentsResponseDto> findRepayments(@PathVariable("productId") String productId, @RequestParam(value="dateFrom",required=false) String dateFrom, @RequestParam(value="dateTo",required=false) String dateTo, es.kukenan.smartfi.common.security.WalletAuthentication walletAuthentication)
      Product (loan) repayments endpoint.
      Parameters:
      productId - product identifier which movements are to be retrieved.
      dateFrom - dateFrom.
      dateTo - dateTo.
      walletAuthentication - user credentials.
      Returns:
      an specific movement detail.
    • findReceipts

      @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(produces="application/json", path="/api/v1/products/{productId}/receipts") public org.springframework.http.ResponseEntity<es.kukenan.smartfi.microservice.contracts.api.receipt.ReceiptsResponseDto> findReceipts(@PathVariable("productId") String productId, @RequestParam(value="paginationKey",required=false) String paginationKey, es.kukenan.smartfi.common.security.WalletAuthentication walletAuthentication)
      Products receipts query endpoint.
      Parameters:
      productId - product identifier which movements are to be retrieved.
      paginationKey - pagination key used to request next result page.
      walletAuthentication - user credentials.
      Returns:
      receipts.
    • findProductAssets

      @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(produces="application/json", path="/api/v1/products/{productId}/assets") public org.springframework.http.ResponseEntity<es.kukenan.smartfi.microservice.contracts.api.assets.AssetsResponseDto> findProductAssets(@PathVariable("productId") String productId, es.kukenan.smartfi.common.security.WalletAuthentication walletAuthentication)
      Products assets query endpoint.
      Parameters:
      productId - product identifier which assets are to be retrieved.
      walletAuthentication - user credentials.
      Returns:
      product assets.
    • findProductPosition

      @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(produces="application/json", path="/api/v1/products/{productId}/position") public org.springframework.http.ResponseEntity<es.kukenan.smartfi.microservice.contracts.api.products.ProductDto> findProductPosition(@PathVariable("productId") String productId, es.kukenan.smartfi.common.security.WalletAuthentication walletAuthentication)
      Products position query endpoint.
      Parameters:
      productId - product identifier which assets are to be retrieved.
      walletAuthentication - user credentials.
      Returns:
      product position.
    • createWallet

      @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(produces="application/json", path="/api/v1/products/new-wallet") public org.springframework.http.ResponseEntity<es.kukenan.smartfi.microservice.contracts.api.products.ProductDto> createWallet(es.kukenan.smartfi.common.security.WalletAuthentication walletAuthentication)
      Products position query endpoint.
      Parameters:
      walletAuthentication - user credentials.
      Returns:
      product position.
    • createCard

      @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(produces="application/json", path="/api/v1/products/new-card") public org.springframework.http.ResponseEntity<es.kukenan.smartfi.microservice.contracts.api.products.ProductDto> createCard(es.kukenan.smartfi.common.security.WalletAuthentication walletAuthentication)
      Products position query endpoint.
      Parameters:
      walletAuthentication - user credentials.
      Returns:
      product position.
    • findProductAssetDetail

      @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(produces="application/json", path="/api/v1/products/{productId}/assets/{assetId}") public org.springframework.http.ResponseEntity<es.kukenan.smartfi.microservice.contracts.api.assets.AssetDto> findProductAssetDetail(@PathVariable("productId") String productId, @PathVariable("assetId") String assetId, es.kukenan.smartfi.common.security.WalletAuthentication walletAuthentication)
      Products asset detail query endpoint.
      Parameters:
      productId - product identifier.
      assetId - product asset identifier.
      walletAuthentication - user credentials.
      Returns:
      product assets.
    • findProductAssetMovements

      @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(produces="application/json", path="/api/v1/products/{productId}/assets/{assetId}/movements") public org.springframework.http.ResponseEntity<es.kukenan.smartfi.microservice.contracts.api.movement.MovementsResponseDto> findProductAssetMovements(@PathVariable("productId") String productId, @PathVariable("assetId") String assetId, @RequestParam(value="dateFrom",required=false) String dateFrom, @RequestParam(value="dateTo",required=false) String dateTo, @RequestParam(value="paginationKey",required=false) String paginationKey, es.kukenan.smartfi.common.security.WalletAuthentication walletAuthentication, javax.servlet.http.HttpServletRequest request)
      Products asset movements query endpoint.
      Parameters:
      productId - product identifier.
      assetId - product asset identifier.
      dateFrom - full from date in RFC3339 format with no separators (yyyymmdd).
      dateTo - full to date in RFC3339 format with no separators (yyyymmdd).
      paginationKey - pagination key used to request next result page.
      walletAuthentication - user credentials.
      request - HTTP servlet request.
      Returns:
      product asset movements.
    • findProductComposition

      @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(produces="application/json", path="/api/v1/products/{productId}/managedProducts") public org.springframework.http.ResponseEntity<es.kukenan.smartfi.microservice.contracts.api.products.ProductsResponseDto> findProductComposition(@PathVariable(name="productId") String productId, es.kukenan.smartfi.common.security.WalletAuthentication walletAuthentication)
      Product composition endpoint (products managed by the given product).
      Parameters:
      productId - product identifier.
      walletAuthentication - user credentials.
      Returns:
      the products managed by the given products.
    • getMovementsDocument

      @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(produces="application/json", path="/api/v1/products/{productId}/movements/document") public org.springframework.http.ResponseEntity<es.kukenan.smartfi.microservice.contracts.api.common.DocumentContentDto> getMovementsDocument(@PathVariable("productId") String productId, @RequestParam(defaultValue="pdf") String reportType, @RequestParam(value="dateFrom",required=false) String dateFrom, @RequestParam(value="dateTo",required=false) String dateTo, @RequestParam(value="type",required=false) String type, @RequestParam(value="reason",required=false) String reason, @RequestParam(value="number",required=false) String number, @RequestParam(value="state",required=false) String state, @RequestHeader(name="X-SKYLINE-USER-IP",defaultValue="") String userIp, es.kukenan.smartfi.common.security.WalletAuthentication walletAuthentication, javax.servlet.http.HttpServletRequest request)
      Products movement list pdf or csv document.
      Parameters:
      productId - product identifier which movements are to be retrieved.
      reportType - type of document (pdf or csv).
      dateFrom - full from date in RFC3339 format with no separators (yyyymmdd).
      dateTo - full to date in RFC3339 format with no separators (yyyymmdd).
      type - movement type code.
      reason - reason.
      number - imposition number.
      state - imposition state.
      userIp - user Ip.
      walletAuthentication - user credentials.
      request - HTTP servlet request.
      Returns:
      products movements document.
    • getMovementDocument

      @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(produces="application/json", path="/api/v1/products/{productId}/movements/{movementId}/document") public org.springframework.http.ResponseEntity<es.kukenan.smartfi.microservice.contracts.api.common.DocumentContentDto> getMovementDocument(@PathVariable("productId") String productId, @PathVariable("movementId") String movementId, @RequestParam(defaultValue="pdf") String reportType, @RequestParam String reference, @RequestHeader(name="X-SKYLINE-USER-IP",defaultValue="") String userIp, es.kukenan.smartfi.common.security.WalletAuthentication walletAuthentication)
      Products movement detail pdf or csv document.
      Parameters:
      productId - product identifier which movements are to be retrieved.
      movementId - specific movement identifier.
      reportType - type of document (pdf or csv).
      reference - cache reference.
      userIp - user Ip.
      walletAuthentication - user credentials.
      Returns:
      document.
    • createBearerToken

      private String createBearerToken(es.kukenan.smartfi.common.security.WalletAuthentication walletAuthentication)
    • findProductWithAssetsTypes

      @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(produces="application/json", path="/api/v1/products/{productId}/assets-types") public org.springframework.http.ResponseEntity<es.kukenan.smartfi.microservice.contracts.api.products.ProductDto> findProductWithAssetsTypes(@PathVariable(name="productId") String productId, es.kukenan.smartfi.common.security.WalletAuthentication walletAuthentication)
      Product detail with assets types endpoint.
      Parameters:
      productId - product identifier.
      walletAuthentication - user credentials.
      Returns:
      products movements.