Uploaded image for project: 'Isis'
  1. Isis
  2. ISIS-968

Rationalize handling of menu actions and contributed actions

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: core-1.7.0
    • Fix Version/s: core-1.8.0
    • Component/s: Core
    • Labels:
      None

      Description

      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-970 with 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):

      @DomainService(nature=VIEW | VIEW_MENU | VIEW_CONTRIBUTIONS | DOMAIN )
      

      where:

      • 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:

      @ActionLayout(
          contributedAs    = ACTION|ASSOCIATION|BOTH   // default is "BOTH"; equivalent (inverse of) the current @NotContributed(As.Xxx)
      )
      

      which for domain service of VIEW or VIEW_CONTRIBUTIONS can restrict the contribution if required.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              danhaywood Dan Haywood
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: