Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-2993

Properly tag and annotate interfaces and classes

    XMLWordPrintableJSON

Details

    • Task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • JCR API 2.1.0, API 2.4.2
    • Parent 18, JCR API 2.2.0, API 2.5.0
    • API, JCR
    • None

    Description

      The interfaces and classes in the Sling API bundle are not currently properly documented as to who is intended to implement or extend these. In the interest of stable extensibility, the types should be marked as follows:

      • Exceptions: Nothing to mark. These are concrete classes intended for extension
      • Abstract Classes: Annotate with @ConsumerType. These are intended for extension.
      • Helper/Util/Constant Classes: Mark final because there is no use extending them.
      • Interfaces: For each interface decide whether they are implemented by a single service (e.g. ResourceResovlerFactory) or by multiple service providers (e.g. ResourceProvider).

      Technically the @ConsumerType annotation is not required because it is the default. Yet, I think we should mark all non-@ProviderType types with @ConsumerType to clarify the distinction.

      Will attach a proposed patch to this issue.

      Attachments

        1. SLING-2993.patch
          32 kB
          Felix Meschberger

        Activity

          People

            fmeschbe Felix Meschberger
            fmeschbe Felix Meschberger
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: