Annotation Interface On
Annotation to register a handler for the ON phase of an event on a specific service and entity.
-
Optional Element Summary
Modifier and TypeOptional ElementDescriptionString[]
Returns the array of entities the handler should handle.String[]
Returns the array of events the handler should handle.String[]
Returns the names of the services on which the handler should be registered.Returns the array of service types the handler wants to handle.
-
Element Details
-
event
String[] eventReturns the array of events the handler should handle. In case of an empty array or empty string the event definition is tried to be obtained from the arguments. For example aCdsCreateEventContext
indicates aCqnService.EVENT_CREATE
event. The string '*' is treated as wildcard and matches any event. If no event definition is provided, either via the annotation or via an argument an error is thrown.
Defaults to an empty array.- Returns:
- the array of events the handler should handle
- Default:
- {}
-
entity
String[] entityReturns the array of entities the handler should handle. In case of an empty array or empty string the entity definition is tried to be obtained from the arguments. For example a POJO argument, withCdsName
annotation indicates a certain entity from the model. The string '*' is treated as wildcard and matches any entity. If no entity definition is explicitly provided, it defaults to a wildcard.
Defaults to an empty array.- Returns:
- the array of entities the handler should handle.
- Default:
- {}
-
service
String[] serviceReturns the names of the services on which the handler should be registered. In case of an empty array or empty string the registration defaults to theServiceName
annotation given on class level. The string '*' is treated as wildcard and matches any service name. If no name is given either via this property or via theServiceName
annotation on class level, registration of the handler fails.
Defaults to an empty empty array.- Returns:
- the array of names of services on which the handler should be registered.
- Default:
- {}
-
serviceType
Returns the array of service types the handler wants to handle. This can be used together with a service name '*' to register on all services of certain types. If no type is given, all service types will be considered
Defaults to an empty array- Returns:
- the array of service types the handler wants to handle
- Default:
- {}
-