Currently we have the following annotations:
- on the domain service: @Hidden - to hide all actions (still in the metamodel); nb: this has been deprecated in
ISIS-970with no replacement
- on the action: @NotContributed to suppress being contributed, optionally @NotContributed(As.ASSOCIATION) or @NotContributed(As.ACTION); is still in menu
- on the action: @NotInServiceMenu to suppress being in menu; can still be contributed.
This is all somewhat clumsy, and the negative @NotXxx annotations are confusing to read (@NotContributed(As.Xxx) in particular).
In Naked Objects MVC they distinguish between three different "types" of service:
- menu services (actions are on menus and are contributed)
- contributions (actions are only ever contributed)
- system services (actions never appear on menu or are contributed).
This separation works well; "domain-level" system services (typically factories and repositories) are injected into the "view-level" menu or contribution services.
This ticket proposes:
Extend @DomainService to characterize the nature of each domain (similar to NO MVC):
- VIEW = current behaviour, and the default
- VIEW_MENU = actions are not contributed
- VIEW_CONTRIBUTIONS = in other words actions are not in service menu
- DOMAIN = are not shown in view ie actions implicitly hidden
In addition, extend @ActionLayout to include further UI hints:
which for domain service of VIEW or VIEW_CONTRIBUTIONS can restrict the contribution if required.