Package com.sap.cds.feature.mt
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
ConstructorsConstructorDescriptionSaasClient(com.sap.cloud.environment.servicebinding.api.ServiceBinding binding) -
Method Summary
Modifier and TypeMethodDescriptionvoidcallBackSaasRegistry(SaasRegistryCallback payload, String callbackUrl) 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 tenantsList<com.sap.cds.services.mt.TenantInfo>getSubscribedTenants(UnaryOperator<com.sap.cds.services.mt.TenantInfo> filter) Retrieves the tenant info of all subscribed tenantsstatic com.sap.cds.services.mt.TenantInfotoTenantInfo(Map<String, Object> tenant) Converts a tenant map to a tenant info objectMethods inherited from class com.sap.cds.integration.cloudsdk.rest.client.JsonRestClient
deleteRequest, getRequest, getRequestWithOnlyResponseCode, patchRequestWithOnlyResponseCode, postRequest, postRequest, putRequest, putRequestWithOnlyResponseCode
-
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
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
Retrieves the tenant info of all subscribed tenants- Returns:
- tenants info
- Throws:
IOException- throws when any connection problems occur
-