cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrus Adamchik (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CAY-2165) Explicit "contribution" API for easier expansion of DI collections and maps
Date Sun, 11 Dec 2016 09:33:58 GMT
Andrus Adamchik created CAY-2165:
------------------------------------

             Summary: Explicit "contribution" API for easier expansion of DI collections and
maps
                 Key: CAY-2165
                 URL: https://issues.apache.org/jira/browse/CAY-2165
             Project: Cayenne
          Issue Type: Improvement
          Components: Core Library
            Reporter: Andrus Adamchik
            Assignee: Andrus Adamchik


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.:

{noformat}
binder
                .bindList(Constants.SERVER_DEFAULT_TYPES_LIST)
                .add(new LocalDateType())
                .add(new LocalTimeType())
                .add(new LocalDateTimeType());
{noformat}
Let's wrap this in a static contribution API similar to what was developed in bootique.io.
E.g.:

{noformat}
BQCoreModule.contributeExtendedTypes(binder).add(..).add(..)
{noformat}

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



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message