Class SaasClient

java.lang.Object
com.sap.cds.integration.cloudsdk.rest.client.JsonRestClient
com.sap.cds.feature.mt.SaasClient

public class SaasClient extends com.sap.cds.integration.cloudsdk.rest.client.JsonRestClient
Implementation of the SaaS Registry REST client.
  • Field Summary

    Fields inherited from class com.sap.cds.integration.cloudsdk.rest.client.JsonRestClient

    mapper
  • Constructor Summary

    Constructors
    Constructor
    Description
    SaasClient(com.sap.cloud.environment.servicebinding.api.ServiceBinding binding)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    static Optional<com.sap.cloud.environment.servicebinding.api.ServiceBinding>
    findBinding(com.sap.cds.services.runtime.CdsRuntime runtime)
     
    List<com.sap.cds.services.mt.TenantInfo>
    Retrieves the tenant info of all subscribed tenants
    List<com.sap.cds.services.mt.TenantInfo>
    getSubscribedTenants(UnaryOperator<com.sap.cds.services.mt.TenantInfo> filter)
    Retrieves the tenant info of all subscribed tenants
    static com.sap.cds.services.mt.TenantInfo
    Converts a tenant map to a tenant info object

    Methods inherited from class com.sap.cds.integration.cloudsdk.rest.client.JsonRestClient

    deleteRequest, getRequest, getRequestWithOnlyResponseCode, patchRequestWithOnlyResponseCode, postRequest, postRequest, putRequest, putRequestWithOnlyResponseCode

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SaasClient

      public SaasClient(com.sap.cloud.environment.servicebinding.api.ServiceBinding binding)
  • Method Details

    • findBinding

      public static Optional<com.sap.cloud.environment.servicebinding.api.ServiceBinding> findBinding(com.sap.cds.services.runtime.CdsRuntime runtime)
    • toTenantInfo

      public static com.sap.cds.services.mt.TenantInfo toTenantInfo(Map<String,Object> tenant)
      Converts a tenant map to a tenant info object
      Parameters:
      tenant - tenant map
      Returns:
      tenant info object
    • callBackSaasRegistry

      public void callBackSaasRegistry(SaasRegistryCallback payload, String callbackUrl) throws IOException
      Throws:
      IOException
    • getSubscribedTenants

      public List<com.sap.cds.services.mt.TenantInfo> getSubscribedTenants(UnaryOperator<com.sap.cds.services.mt.TenantInfo> filter) throws IOException
      Retrieves the tenant info of all subscribed tenants
      Returns:
      tenants info
      Throws:
      IOException - throws when any connection problems occur
    • getSubscribedTenants

      public List<com.sap.cds.services.mt.TenantInfo> getSubscribedTenants() throws IOException
      Retrieves the tenant info of all subscribed tenants
      Returns:
      tenants info
      Throws:
      IOException - throws when any connection problems occur