Package com.sap.cds.services.mt
Interface SubscribeEventContext
- All Superinterfaces:
EventContext
-
Method Summary
Modifier and TypeMethodDescriptionstatic SubscribeEventContext
create()
Creates anEventContext
already overlayed with this interface.To get named and type safe access to this options map, it's possible to cast it to a specific implementation.Returns theService
(Consumption API) of the service, targeted by theEventContext
.void
setOptions
(Map<String, Object> options) Sets the optional additional optionsvoid
Sets the tenant IDMethods inherited from interface com.sap.cds.services.EventContext
as, get, getAuthenticationInfo, getCdsRuntime, getChangeSetContext, getEvent, getFeatureTogglesInfo, getMessages, getModel, getParameterInfo, getServiceCatalog, getTarget, getUserInfo, isCompleted, keySet, proceed, put, setCompleted
-
Method Details
-
create
Creates anEventContext
already overlayed with this interface. The event is set to beDeploymentService.EVENT_SUBSCRIBE
- Returns:
- the
SubscribeEventContext
-
getService
DeploymentService getService()Description copied from interface:EventContext
Returns theService
(Consumption API) of the service, targeted by theEventContext
. This is the service, on which theService.emit(EventContext)
method (or specialized Consumption API) was called.- Specified by:
getService
in interfaceEventContext
- Returns:
- the
Service
(Consumption API) of the service, targeted by theEventContext
.
-
getTenant
String getTenant()- Returns:
- the tenant ID
-
setTenant
Sets the tenant ID- Parameters:
tenant
- the tenant ID
-
getOptions
To get named and type safe access to this options map, it's possible to cast it to a specific implementation. For example, to access the SaaS registry payload it can be converted to SaasRegistrySubscriptionOptions:SaasRegistrySubscriptionOptions.create(context.getOptions());
- Returns:
- the optional additional options
-
setOptions
Sets the optional additional options- Parameters:
options
- the optional additional options
-