Package com.sap.cds.services.utils.model
Class DynamicModelUtils
java.lang.Object
com.sap.cds.services.utils.model.DynamicModelUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<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) com.sap.cloud.sdk.cloudplatform.connectivity.HttpDestinationcreateSidecarDestination(String destinationName, String targetUrl) com.sap.cloud.mt.tools.api.ResilienceConfigbooleanbooleanIndicates whether the model is provided by a external service (i.e.booleanbooleanReturns true, if the static model, packaged with the application, can be loaded Retrieves the required information from the currentRequestContextbooleanuseStaticModel(UserInfo userInfo, FeatureTogglesInfo featureTogglesInfo) Returns true, if the static model, packaged with the application, can be loaded
-
Constructor Details
-
DynamicModelUtils
-
-
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 currentRequestContext- Returns:
- true, if the static model, packaged with the application, can be loaded
-
useStaticModel
Returns true, if the static model, packaged with the application, can be loaded- Parameters:
userInfo- theUserInfofeatureTogglesInfo- theFeatureTogglesInfo- Returns:
- true, if the static model, packaged with the application, can be loaded
-
isModelProviderEnabled
public boolean isModelProviderEnabled()- Returns:
trueif ModelProviderService is configured
-
getModelProviderUrl
-
isClassicSidecarEnabled
public boolean isClassicSidecarEnabled()- Returns:
trueif 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:
trueif 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
-