[
https://issues.apache.org/jira/browse/ISIS-2774?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17405600#comment-17405600
]
Andi Huber commented on ISIS-2774:
----------------------------------
* we just want one policy to offer the three choices: private+explicit,
public+explicit, public+implicit. (Aside: that means we get rid of the
isis.applib.annotation.action.explicit-annotation)
* we like @Domain???.Include and @Domain???.Exclude as the only two
annotations that the framework looks for
* we retrofit existing annotations to be meta-annotated with these two, but we
don't bother introducing new annotations. The rationale is that with existing
annotations we already have expressed an opinion, but we don't have strongly
held opinions about names of others. Teams can always add their own
meta-annotations if they wish. Thus, @Action, @Property, @Collection,
@ActionLayout, @PropertyLayout, @CollectionLayout , @Title, @MemberSupport
would all be meta-annotated as @Domain???.Include. Meanwhile @Programmatic
would be meta-annotated as @Domain???.Exclude.
> Allow members (and their supporting methods) to have non-public visibility.
> Allow properties/collections to have no getters & setters, or non-public
> getters and setters.
> --------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: ISIS-2774
> URL: https://issues.apache.org/jira/browse/ISIS-2774
> Project: Isis
> Issue Type: Improvement
> Components: Isis Core
> Affects Versions: 2.0.0-M5
> Reporter: Daniel Keir Haywood
> Assignee: Andi Huber
> Priority: Major
> Fix For: 2.0.0-M7
>
>
> See also ISIS-2782, which is closely related. And discussion at
> https://the-asf.slack.com/archives/CFC42LWBV/p1625205578149000?thread_ts=1624911448.097500&cid=CFC42LWBV
>
> ~~~~~~
> Rationale here is: encapsulation, "tell not ask".
> Thus:
> * Our definition of a property or collection should be _either_ with a
> publicly available getter or setter, or a field annotated with @Property or
> @Collection.
> * Our definition of an action should be _either_ a publicly available method
> (if explicit actions config property not set), _or_ a method with any
> visibility and annotated with @Action.
> * Our definition of a supporting method is either one with public visibility
> or with some other visibility but annotated with @MemberSupport.
> See this blog
> [https://thorben-janssen.com/access-strategies-in-jpa-and-hibernate/] for
> reasons as to why field-level annotations are also recommended for ORMs (JPA
> in this case).
--
This message was sent by Atlassian Jira
(v8.3.4#803005)