Class HalEnricherRegistry

java.lang.Object
sonia.scm.api.v2.resources.HalEnricherRegistry

@Extension @Singleton public final class HalEnricherRegistry extends Object
The HalEnricherRegistry is responsible for binding HalEnricher instances to their source types.
Since:
2.0.0
  • Constructor Details

    • HalEnricherRegistry

      public HalEnricherRegistry()
  • Method Details

    • register

      public void register(Class sourceType, HalEnricher enricher)
      Registers a new HalEnricher for the given source type.
      Parameters:
      sourceType - type of json mapping source
      enricher - link enricher instance
    • allByType

      public Iterable<HalEnricher> allByType(Class sourceType)
      Returns all registered HalEnricher for the given type.
      Parameters:
      sourceType - type of json mapping source