Class TLfnProductRepository

java.lang.Object
com.luciad.fusion.platform.repository.TLfnProductRepository

public final class TLfnProductRepository extends Object

Repository to query the products available in LuciadFusion Studio.

LuciadFusion will create an implementation of the TLfnProductRepository at startup and provide this as a bean in the Spring container. Spring dependency injection can be used to obtain a reference to the repository in your code. The most straightforward way is to use the org.springframework.beans.factory.annotation.Autowired annotation in the constructor of your Spring component.


   @Controller
    public class MyController {

       private final TLfnProductRepository fProductRepository;

      @Autowired
       public MyController(TLfnProductRepository aProductRepository) {
         fProductRepository = aProductRepository;
       }
     }
  

Since:
2021.0
See Also:
  • Method Details

    • findByServiceId

      public List<TLfnProduct> findByServiceId(String aServiceId)
      Searches for the products published in the service with the given id. If the service with the given id doesn't exist or if aServiceId is null, an empty list is returned.
      Parameters:
      aServiceId - the id of the service to search published products for
      Returns:
      the list of products published in the service
    • findByServiceIdAndProductName

      public Optional<TLfnProduct> findByServiceIdAndProductName(String aServiceId, String aProductName)
      Searches for a product with the given name that is published in the service with the given id.
      Parameters:
      aServiceId - the id of the service that contains the product
      aProductName - the name of the product
      Returns:
      an Optional containing the product, Optional.empty() if none is found.