Package com.sap.cds.services.environment
Interface CdsEnvironment
public interface CdsEnvironment
Provides properties, service bindings and other configuration options.
-
Method Summary
Modifier and TypeMethodDescriptionReturns theCdsPropertiestheCdsRuntimewas initialized with.<T> TgetProperty(String key, Class<T> asClazz, T defaultValue) Returns the value of the property with given key as given typeasClazz.Stream<com.sap.cloud.environment.servicebinding.api.ServiceBinding>
-
Method Details
-
getCdsProperties
CdsProperties getCdsProperties()Returns theCdsPropertiestheCdsRuntimewas initialized with.- Returns:
- The
CdsPropertiestheCdsRuntimewas initialized with
-
getProperty
Returns the value of the property with given key as given typeasClazz. Returns the specified default value if key is not existing.- Type Parameters:
T- the type of the property value- Parameters:
key- The key of the propertyasClazz- The type of the property valuedefaultValue- The default value if the key is not present- Returns:
- The property value or
defaultValueif not defined
-
getServiceBindings
Stream<com.sap.cloud.environment.servicebinding.api.ServiceBinding> getServiceBindings()- Returns:
- The available
ServiceBindings from theServiceBindingProviderregistered on theCdsRuntime
-
getApplicationInfo
ApplicationInfo getApplicationInfo()- Returns:
- The
ApplicationInfofrom theApplicationInfoProviderregistered on theCdsRuntime
-