Package com.sap.cds.services.environment
Interface CdsEnvironment
public interface CdsEnvironment
Provides properties, service bindings and other configuration options.
-
Method Summary
Modifier and TypeMethodDescription<T> T
getProperty
(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() -
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
defaultValue
if not defined
-
getServiceBindings
Stream<com.sap.cloud.environment.servicebinding.api.ServiceBinding> getServiceBindings()- Returns:
- The available
ServiceBinding
s from theServiceBindingProvider
registered on theCdsRuntime
-
getApplicationInfo
ApplicationInfo getApplicationInfo()- Returns:
- The
ApplicationInfo
from theApplicationInfoProvider
registered on theCdsRuntime
-