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

Fix support for publishing of wrapper calling programmatically instantiated mixin.

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.12.1
    • Fix Version/s: 1.13.0
    • Component/s: Core
    • Labels:
      None

      Description

      suppose we have a mixin:

      Touchable_touch

      whose action "$$" is published.

      What already works is that this will be published as an action "touch" on the mixed-in domain object.

      However, if we try to do this programmatically via the WrapperFactory, ie

      wrapperFactory.wrap(factoryService.mixin(Touchable_touch.class, touchable)).$$();
      

      then the target that is published is the (transient) mixin object itself, rather than the domain object.

      ~~~
      The fix is therefore to make the wrapper factory's wrapper proxy more intelligent, by invoking on the mixed-in action on the mixed-in domain object, rather than simply on the regular default action of the mixin (transient) object.

      If this

        Activity

        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit ffd9f08c9487d1c785d8ebd10fb99c0da3aa47fe in isis's branch refs/heads/master from Dan Haywood
        [ https://git-wip-us.apache.org/repos/asf?p=isis.git;h=ffd9f08 ]

        ISIS-1425: making the wrapper factory intelligent enough to handle (dereference) programmatically instantiated mixins

        Show
        jira-bot ASF subversion and git services added a comment - Commit ffd9f08c9487d1c785d8ebd10fb99c0da3aa47fe in isis's branch refs/heads/master from Dan Haywood [ https://git-wip-us.apache.org/repos/asf?p=isis.git;h=ffd9f08 ] ISIS-1425 : making the wrapper factory intelligent enough to handle (dereference) programmatically instantiated mixins
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 964ab406680d62c24a8ae4153af96ab895ecffed in isis's branch refs/heads/master from Dan Haywood
        [ https://git-wip-us.apache.org/repos/asf?p=isis.git;h=964ab40 ]

        ISIS-1425: adding fallback to original behaviour if cannot locate the mixed-in action

        Show
        jira-bot ASF subversion and git services added a comment - Commit 964ab406680d62c24a8ae4153af96ab895ecffed in isis's branch refs/heads/master from Dan Haywood [ https://git-wip-us.apache.org/repos/asf?p=isis.git;h=964ab40 ] ISIS-1425 : adding fallback to original behaviour if cannot locate the mixed-in action
        Hide
        danhaywood Dan Haywood added a comment -

        communication channel and others failing, can't find the mixin. Need to explore further. For now, revert to previous impl if unable to find (rather than fail-fast).

        Show
        danhaywood Dan Haywood added a comment - communication channel and others failing, can't find the mixin. Need to explore further. For now, revert to previous impl if unable to find (rather than fail-fast).
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 33b75cb070a9b158a0affba3c17359f20151dfb4 in isis's branch refs/heads/master from Dan Haywood
        [ https://git-wip-us.apache.org/repos/asf?p=isis.git;h=33b75cb ]

        ISIS-1425: refactored so that if fail to dereference regular action/mixin (to get to mixedin action/target) then indicate optionally by returning null rather than failing fast with an exception. Allows less ugly code to fallback to original behaviour.

        Show
        jira-bot ASF subversion and git services added a comment - Commit 33b75cb070a9b158a0affba3c17359f20151dfb4 in isis's branch refs/heads/master from Dan Haywood [ https://git-wip-us.apache.org/repos/asf?p=isis.git;h=33b75cb ] ISIS-1425 : refactored so that if fail to dereference regular action/mixin (to get to mixedin action/target) then indicate optionally by returning null rather than failing fast with an exception. Allows less ugly code to fallback to original behaviour.

          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:

              Development