You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by "Andrus Adamchik (JIRA)" <ji...@apache.org> on 2016/12/11 09:33:58 UTC
[jira] [Created] (CAY-2165) Explicit "contribution" API for easier
expansion of DI collections and maps
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)