You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@isis.apache.org by "Dan Haywood (JIRA)" <ji...@apache.org> on 2017/09/24 18:14:00 UTC

[jira] [Commented] (ISIS-1509) Allow Factory Methods to be defined

    [ https://issues.apache.org/jira/browse/ISIS-1509?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16178300#comment-16178300 ] 

Dan Haywood commented on ISIS-1509:
-----------------------------------

Hi Oscar,

I saw you raised a PR on this a good while back.  Is the idea that factory methods be restricted only to domain services?

thx
Dan

> Allow Factory Methods to be defined
> -----------------------------------
>
>                 Key: ISIS-1509
>                 URL: https://issues.apache.org/jira/browse/ISIS-1509
>             Project: Isis
>          Issue Type: New Feature
>          Components: Core
>    Affects Versions: 1.13.0
>            Reporter: Oscar Bou
>             Fix For: 2.2.0
>
>
> Factory Methods should be able to be identified as that.
> It could be useful, for example, when executing any action.
> For any param of any type, Apache Isis could offer the option to create a new instance by executing an action that both return that type and has been identified as a Factory Method.
> An example of defining a Factory Method could be:
> {code:java}
> class Concert {
>     @Action(factoryMethod=true)
>     public Concert someAction() {
>           return new Concert();
>     }
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)