Class TLfnProductRepository
java.lang.Object
com.luciad.fusion.platform.repository.TLfnProductRepository
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 Summary
Modifier and TypeMethodDescriptionfindByServiceId(String aServiceId) Searches for the products published in the service with the given id.findByServiceIdAndProductName(String aServiceId, String aProductName) Searches for a product with the given name that is published in the service with the given id.
-
Method Details
-
findByServiceId
Searches for the products published in the service with the given id. If the service with the given id doesn't exist or ifaServiceIdisnull, 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
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 productaProductName- the name of the product- Returns:
- an
Optionalcontaining the product,Optional.empty()if none is found.
-