Uploaded image for project: 'Cayenne'
  1. Cayenne
  2. CAY-2165

Explicit "contribution" API for easier expansion of DI collections and maps

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 4.0.M5
    • Core Library
    • None

    Description

      Currently extending Cayenne via contribution to DI collections and maps is not easy, as locating the corresponding map/collection is not transparent. It requires the knowledge of a String key for a given collection, and doesn't tell the user the type of the objects in the collection. E.g.:

      binder
                      .bindList(Constants.SERVER_DEFAULT_TYPES_LIST)
                      .add(new LocalDateType())
                      .add(new LocalTimeType())
                      .add(new LocalDateTimeType());
      

      Let's wrap this in a static contribution API similar to what was developed in bootique.io. E.g.:

      BQCoreModule.contributeExtendedTypes(binder).add(..).add(..)
      

      This way the users will have explicit API to access all module collections / maps and will know the type of objects they expect.

      Attachments

        Activity

          People

            andrus Andrus Adamchik
            andrus Andrus Adamchik
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: