Class DynamicModelUtils

java.lang.Object
com.sap.cds.services.utils.model.DynamicModelUtils

public class DynamicModelUtils extends Object
  • Constructor Details

    • DynamicModelUtils

      public DynamicModelUtils(CdsRuntime runtime)
  • Method Details

    • useStaticModel

      public boolean useStaticModel()
      Returns true, if the static model, packaged with the application, can be loaded Retrieves the required information from the current RequestContext
      Returns:
      true, if the static model, packaged with the application, can be loaded
    • useStaticModel

      public boolean useStaticModel(UserInfo userInfo, FeatureTogglesInfo featureTogglesInfo)
      Returns true, if the static model, packaged with the application, can be loaded
      Parameters:
      userInfo - the UserInfo
      featureTogglesInfo - the FeatureTogglesInfo
      Returns:
      true, if the static model, packaged with the application, can be loaded
    • isModelProviderEnabled

      public boolean isModelProviderEnabled()
      Returns:
      true if ModelProviderService is configured
    • getModelProviderUrl

      public String getModelProviderUrl()
    • isClassicSidecarEnabled

      public boolean isClassicSidecarEnabled()
      Returns:
      true if Classic MT Sidecar is configured
    • isDynamicModelEnabled

      public boolean isDynamicModelEnabled()
      Indicates whether the model is provided by a external service (i.e. it's dynamic) or not. Dynamic models can be served by: - classic sidecar - ModelProvider service (either as mtxs service or standalone)
      Returns:
      true if the model is dynamic
    • createMetadataAccessor

      public <T> com.sap.cds.mtx.MetaDataAccessor<T> createMetadataAccessor(com.sap.cds.mtx.impl.MetaDataAccessorImpl.EdmxModelCreator<T> strToEdmx, com.sap.cds.mtx.impl.MetaDataAccessorImpl.CdsModelCreator strToModel, com.sap.cds.mtx.impl.MetaDataAccessorImpl.I18nResourceCreator strToI18n)
    • getResilienceConfig

      public com.sap.cloud.mt.tools.api.ResilienceConfig getResilienceConfig()
    • createSidecarDestination

      public com.sap.cloud.sdk.cloudplatform.connectivity.HttpDestination createSidecarDestination(String destinationName, String targetUrl)