Package com.sap.cds.services
Class ServiceDelegator
java.lang.Object
com.sap.cds.services.ServiceDelegator
- All Implemented Interfaces:
Service
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidvoidemit(EventContext context) The generic consumption API to emit arbitrary events, represented byEventContextobjects.getName()Returns the name of theService.void
-
Constructor Details
-
ServiceDelegator
-
-
Method Details
-
before
Description copied from interface:Service- Specified by:
beforein interfaceService- Parameters:
events- the events the custom handler is registered forentities- the entities the custom handler is registered fororder- the order of the handler. the lower the order the earlier the handler gets called. if two handlers have the same order they get ordered in their registration orderhandler- theHandlerimplementing the business-logic, which should become active during the BEFORE phase.
-
on
Description copied from interface:Service- Specified by:
onin interfaceService- Parameters:
events- the events the custom handler is registered forentities- the entities the custom handler is registered fororder- the order of the handler. the lower the order the earlier the handler gets called. if two handlers have the same order they get ordered in their registration orderhandler- theHandlerimplementing the business-logic, which should become active during the ON phase.
-
after
Description copied from interface:Service- Specified by:
afterin interfaceService- Parameters:
events- the events the custom handler is registered forentities- the entities the custom handler is registered fororder- the order of the handler. the lower the order the earlier the handler gets called. if two handlers have the same order they get ordered in their registration orderhandler- theHandlerimplementing the business-logic, which should become active during the AFTER phase.
-
emit
Description copied from interface:ServiceThe generic consumption API to emit arbitrary events, represented byEventContextobjects. More specialized consumption APIs (for exampleCqnService) are implemented as a wrapper around this method.
Emitting anEventContextwill start the processing of the event and calls the registeredHandlerinstances. IfService.emit(EventContext)is called outside of an activeChangeSetContext, an internalChangeSetContextis opened and properly closed.Handlercan therefore rely on an activeChangeSetContext.
TheEventContextpassed to this method, should be propagated with the required input parameters of the event. After the method finished, the respective output parameters can be read from the passed inEventContext.- Specified by:
emitin interfaceService- Parameters:
context- theEventContextto be emitted
-
getName
Description copied from interface:ServiceReturns the name of theService. The name might be the fully qualified name of a service, which is also present in theCdsModel. If the service is a technical service, the name is an arbitrary name, which is not reflected in theCdsModel. -
getDelegatedService
-