[
https://issues.apache.org/jira/browse/TAPESTRY-1679?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12556000#action_12556000
]
Howard M. Lewis Ship commented on TAPESTRY-1679:
------------------------------------------------
Been thinking that we could use something like:
@ServiceMarker @Contribute(MyService.class) void arbitraryNamedMethod(...) {
... }
So, the @Contribute annotation marks the method as a contribution method. The
value attribute is the type of service to contribute into. This may be further
qualified by the additional annotation (@ServiceMarker, here).
> Allow service configurators to be arbitrary named and determine sevice by the
> configuration parameter
> -----------------------------------------------------------------------------------------------------
>
> Key: TAPESTRY-1679
> URL: https://issues.apache.org/jira/browse/TAPESTRY-1679
> Project: Tapestry
> Issue Type: New Feature
> Components: tapestry-ioc
> Affects Versions: 5.0.5
> Reporter: Kalin Krustev
> Assignee: Howard M. Lewis Ship
>
> Tapestry used to require this naming convention for configuring services:
> public static Foo buildFoo(...) {...}
> public static void contrubuteFoo(...) {...}
> Then it allowed the first convention to be simplified as:
> public static Foo build(...) {...}
> It would be nice for the "contribute..." methods to allow also simpler naming
> and use the type of the "configuration" parameter to determine the configured
> service, which will also have the same type of parameter.
> For example:
> in Tapestry 5.0.5 TapestryModule.java:
> public ServletApplicationInitializer build(...,
> List<ServletApplicationInitializerFilter> configuration, ... )
> in my AppModule.java Tapestry 5.0.5 requires this naming:
> public void
> contributeServletApplicationInitializer(OrderedConfiguration<ServletApplicationInitializerFilter>
> configuration)
> Perhaps it could be simplified as:
> public void
> contribute(OrderedConfiguration<ServletApplicationInitializerFilter>
> configuration)
> If it will not be simplified, it would be nice to make the documentation
> about Tapestry IoC Configurations more clear that
> the naming of the contribute methods is important, not the type of
> configuration parameter.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]