Annotation Type Activate


@Documented @Retention(RUNTIME) @Target({TYPE,METHOD}) public @interface Activate
Activate. This annotation is useful for automatically activate certain extensions with the given criteria, for examples: @Activate can be used to load certain Filter extension when there are multiple implementations.
  1. group() specifies group criteria. Framework SPI defines the valid group values.
  2. value() specifies parameter key in URL criteria.
SPI provider can call ExtensionLoader.getActivateExtension(URL, String, String) to find out all activated extensions with the given criteria.
See Also:
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Deprecated.
    Deprecated.
    Activate the current extension when one of the groups matches.
    Activate loadClass when the current extension when the specified className all match
    int
    Absolute ordering info, optional Ascending order, smaller values will be in the front o the list.
    Activate the current extension when the specified keys appear in the URL's parameters.
  • Element Details

    • group

      String[] group
      Activate the current extension when one of the groups matches. The group passed into ExtensionLoader.getActivateExtension(URL, String, String) will be used for matching.
      Returns:
      group names to match
      See Also:
      Default:
      {}
    • value

      String[] value
      Activate the current extension when the specified keys appear in the URL's parameters.

      For example, given @Activate("cache, validation"), the current extension will be return only when there's either cache or validation key appeared in the URL's parameters.

      Returns:
      URL parameter keys
      See Also:
      Default:
      {}
    • before

      Deprecated.
      Relative ordering info, optional Deprecated since 2.7.0
      Returns:
      extension list which should be put before the current one
      Default:
      {}
    • after

      Deprecated.
      Relative ordering info, optional Deprecated since 2.7.0
      Returns:
      extension list which should be put after the current one
      Default:
      {}
    • order

      int order
      Absolute ordering info, optional Ascending order, smaller values will be in the front o the list.
      Returns:
      absolute ordering info
      Default:
      0
    • onClass

      String[] onClass
      Activate loadClass when the current extension when the specified className all match
      Returns:
      className names to all match
      Default:
      {}