jersey
  1. jersey
  2. JERSEY-1159

Activation of features based on the presence of certain properties in the ResourceConfig property bag.

    Details

    • Type: New Feature New Feature
    • Status: Resolved
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.0-m12
    • Fix Version/s: 2.0-m13, 2.0
    • Component/s: None
    • Labels:
      None

      Description

      There could for example be FeatureActivationProvider (or something similar). Implementations of that could be registered through META-INF services to "sniff" the resource config property bag during the application initialization and based on the presence of certain properties add feature-specific providers/modules, etc. - i.e. activate certain features.

      Other option would be to add a custom annotation like @ActivateOn(

      {list of property names}

      ) that could be attached to providers to indicate, they should only be used if a given property is present - such providers could be registered through meta-inf services to be always found by the runtime, but would only be used if a given property is set.

      DEMO: Rewrite UriConfigFitler to utilize the property activator - if language or media type mapping property is present in the resource config, the activator would automatically add the UriConnegFilter to the set of providers. Add an integration test that uses web.xml to set media type mappings and show it works without explicitly adding the UriConnegFilter to the list of providers.

        Issue Links

          Activity

          There are no comments yet on this issue.

            People

            • Assignee:
              Michal Gajdos
              Reporter:
              Martin Matula
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 18 hours
                18h
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 8 hours Time Not Required
                8h