Class TLfnServiceRepository

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

public final class TLfnServiceRepository extends Object

Repository to query the services available in LuciadFusion Studio.

LuciadFusion will create an implementation of the TLfnServiceRepository 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 TLfnServiceRepository fServiceRepository;

      @Autowired
       public MyController(TLfnServiceRepository aServiceRepository) {
         fServiceRepository = aServiceRepository;
       }
     }
  

Since:
2021.0
See Also:
  • Method Details

    • findByTypeAndName

      public Optional<TLfnService> findByTypeAndName(String aServiceType, String aServiceName)

      Searches for a service that has the given type and name.

      This method can be used to find the service related to a request from a client. If the service is found, verify that the service is running by checking the status. Return an error if this not the case. If no service is found, return an appropriate error to the client.

      Parameters:
      aServiceType - the type of the service
      aServiceName - the name of the service
      Returns:
      an Optional containing the service with given type and name, Optional.empty() if none is found.