public class RequestContextImpl extends Object implements RequestContextSPI
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
AuthenticationInfo |
getAuthenticationInfo() |
static RequestContextSPI |
getCurrentInternal()
Gives direct access to the current
RequestContext stored in the ThreadLocal
This may return null if there is no RequestContext currently opened |
static RequestContext |
getCurrentOrDefault(CdsRuntime cdsRuntime)
Gives access to either the current
RequestContext,
or if this does not exist to a RequestContextHelper that itself ensures that there is always a RequestContext opened. |
static RequestContext |
getCurrentOrNull(CdsRuntime cdsRuntime)
Gives access to either the current
RequestContext,
or if this does not exist to a RequestContextHelper that itself ensures that there is always a RequestContext opened. |
FeatureTogglesInfo |
getFeatureTogglesInfo() |
int |
getId() |
Messages |
getMessages() |
com.sap.cds.reflect.CdsModel |
getModel() |
ParameterInfo |
getParameterInfo() |
ServiceCatalog |
getServiceCatalog() |
UserInfo |
getUserInfo() |
boolean |
isClosed() |
static RequestContextSPI |
open(com.sap.cds.reflect.CdsModel cdsModel,
ServiceCatalog serviceCatalog,
UserInfo userInfo,
ParameterInfo parameterInfo,
FeatureTogglesInfo featureTogglesInfo,
Messages messages,
AuthenticationInfo authenticationInfo) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetCurrent, isActivepublic static RequestContextSPI open(com.sap.cds.reflect.CdsModel cdsModel, ServiceCatalog serviceCatalog, UserInfo userInfo, ParameterInfo parameterInfo, FeatureTogglesInfo featureTogglesInfo, Messages messages, AuthenticationInfo authenticationInfo)
@Nonnull public static RequestContext getCurrentOrDefault(@Nonnull CdsRuntime cdsRuntime)
RequestContext,
or if this does not exist to a RequestContextHelper that itself ensures that there is always a RequestContext opened.
This method will throw a NullPointerException, if the passed CdsRuntime was null, but guarantees that it will never return nullcdsRuntime - A reference to the underlying CdsRuntime instance.RequestContext or the RequestContextHelper@Nullable public static RequestContext getCurrentOrNull(@Nullable CdsRuntime cdsRuntime)
RequestContext,
or if this does not exist to a RequestContextHelper that itself ensures that there is always a RequestContext opened.
THis method might return null, if the passed CdsRuntime was null.cdsRuntime - A reference to the underlying CdsRuntime instance.RequestContext, the RequestContextHelper or null@Nullable public static RequestContextSPI getCurrentInternal()
RequestContext stored in the ThreadLocal
This may return null if there is no RequestContext currently openedRequestContext stored in the ThreadLocalpublic int getId()
getId in interface RequestContextSPIpublic com.sap.cds.reflect.CdsModel getModel()
getModel in interface RequestContextpublic ServiceCatalog getServiceCatalog()
getServiceCatalog in interface RequestContextpublic UserInfo getUserInfo()
getUserInfo in interface RequestContextpublic AuthenticationInfo getAuthenticationInfo()
getAuthenticationInfo in interface RequestContextpublic ParameterInfo getParameterInfo()
getParameterInfo in interface RequestContextpublic Messages getMessages()
getMessages in interface RequestContextpublic FeatureTogglesInfo getFeatureTogglesInfo()
getFeatureTogglesInfo in interface RequestContextpublic boolean isClosed()
isClosed in interface RequestContextSPIpublic void close()
close in interface RequestContextSPIclose in interface AutoCloseableCopyright © 2022. All rights reserved.