Annotation Interface After


@Target(METHOD) @Retention(RUNTIME) public @interface After
Annotation to register a handler for the AFTER phase of an event on a specific service and entity.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Returns the array of entities the handler should handle.
    Returns the array of events the handler should handle.
    Returns the names of the services on which the handler should be registered.
    Class<? extends Service>[]
    Returns the array of service types the handler wants to handle.
  • Element Details

    • event

      String[] event
      Returns 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 a CdsCreateEventContext indicates a CqnService.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[] entity
      Returns 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, with CdsName 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[] service
      Returns 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 the ServiceName 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 the ServiceName 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

      Class<? extends Service>[] 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:
      {}