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

Allow @Mixin annotation to specify the method name to use (instead of '$$') meaning to infer the mixin name from the mixin type. Also, allow '$' to be used as separator of the mixin type.

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.13.1
    • Fix Version/s: 1.13.2
    • Component/s: None
    • Labels:
      None

      Description

      The current mixin conventions gives rise to code such as:

      mixin(Invoice._approve.class, invoice).$$();
      

      where:

      public class Invoice {
          ...
          @Mixin
          public static class _approve {
              ...
              public Invoice $$() { ... }
          }
      }
      

      We'd like it instead to read:

      mixin(Invoice.Approve.class, invoice).exec();
      

      ie:

      • change "$$" to "exec" (or any other verb)
      • not require the leading "_" in the mixin name
      • allow the class to be capitalized

      Suggestion is:

      public class Invoice {
          ...
          @Mixin(method="exec")
          public static class Approve {
              public void exec() { ... }
          }
      }
      

      or (if using `@DomainObject`)

      public class Invoice {
          ...
          @DomainObject(nature=MIXIN, mixinMethod="exec")
          public static class Approve {
              public void exec() { ... }
          }
      }
      

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: