java.lang.Object
es.kukenan.smartfi.microservice.contracts.service.AssetsService

@Service public class AssetsService extends Object
Assets related services.
  • Field Details

    • backofficeClientManager

      @Autowired private BackofficeClientManager backofficeClientManager
      Back office clients manager.
    • productsService

      @Autowired private ProductsService productsService
      Products service.
    • dtoObfuscator

      @Autowired private DtoObfuscator dtoObfuscator
      Security util to obfuscate sensible data in DTOs.
  • Constructor Details

    • AssetsService

      public AssetsService()
  • Method Details

    • findProductAssets

      @Cacheable(cacheResolver="cacheResolver", key="#sessionId+\'/api/v1/products/\'+#productId+\'/assets\'", unless="#result.getData().size() == 0") public es.kukenan.smartfi.microservice.contracts.api.assets.AssetsResponseDto findProductAssets(String sessionId, String userId, String productId, es.kukenan.smartfi.common.security.WalletAuthentication auth)
      Product assets service method.
      Parameters:
      sessionId - session identifier.
      userId - user identifier.
      productId - product identifier which movements are to be retrieved.
      auth - smartfi authorization.
      Returns:
      products assets.
    • findProductAssetDetail

      @Cacheable(cacheResolver="cacheResolver", key="#sessionId+\'/api/v1/products/\'+#productId+\'/assets\'+\'/\'+#assetId") public es.kukenan.smartfi.microservice.contracts.api.assets.AssetDto findProductAssetDetail(String sessionId, String userId, String productId, String assetId, es.kukenan.smartfi.common.security.WalletAuthentication auth)
      Product assets service method.
      Parameters:
      sessionId - session identifier.
      userId - user identifier.
      productId - product identifier.
      assetId - the identifier of the product asset to retrieve.
      auth - smartfi authorization.
      Returns:
      products assets.
    • findProductAssetMovements

      @Cacheable(cacheResolver="cacheResolver", key="#sessionId+\'/api/v1/products/\'+#productId+\'/assets\'+\'/\'+#assetId+\'/movements?dateFrom=\' + #dateFrom + \'&dateTo=\' + #dateTo + \'&paginationKey=\' + #paginationKey", unless="#result.getData().size() == 0") public es.kukenan.smartfi.microservice.contracts.api.movement.MovementsResponseDto findProductAssetMovements(String sessionId, String userId, String productId, String assetId, String dateFrom, String dateTo, String paginationKey, es.kukenan.smartfi.common.security.WalletAuthentication auth)
      Product asset movements service method.
      Parameters:
      sessionId - session identifier.
      userId - user identifier.
      productId - product identifier.
      assetId - the identifier of the product asset which movements are to be retrieved.
      dateFrom - movement date lower limit.
      dateTo - movement date upper limit.
      paginationKey - pagination key used to request next result page.
      auth - smartfi authorization.
      Returns:
      products asset movements.
    • createProductSearchRequest

      private ProductSearchRequest createProductSearchRequest(es.kukenan.smartfi.common.security.WalletAuthentication auth, String productId, Product product)