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

Rationalize the way that service instances are referenced by RO vs rest of the framework

    Details

      Description

      The URLs in Restful Objects viewer are derived from ServiceUtil.id(...), which evaluates the getId() method of the service class, otherwise falls back to the simpleName of the class.

      Meanwhile in the metamodel itself - ie the ObjectSpecId, as used in the first part of the objectType and bookmarks - is always simply the fully-qualified class name.

      In the Wicket viewer (unlike entities) this FQCN doesn't normally manifests as a URL, though it can be seen for bookmarked actions. It can also be seen for published interactions, as the target object.

      To rationalize things:

      • introduce a new @DomainService#serviceType (analogous to @DomainObject#objectType
      • use the value of this serviceType if present
      • otherwise fallback to getId()
      • otherwise fallback to the fully qualified class name.

      This final fallback is a slight change in default behaviour for any apps just using the RO viewer - its default would have been just the simple class name of the service. The workaround is to add either serviceType or getId() explicitly.

        Activity

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

        Commit 5a3029eb04a12b851a73ebac634fb504a82aaa05 in isis's branch refs/heads/maint-1.14.0 from Dan Haywood
        [ https://git-wip-us.apache.org/repos/asf?p=isis.git;h=5a3029e ]

        ISIS-1586: adds @DomainService(objectType) and rationalizes w.r.t getId()

        Also updates to documentation, to make clear what the precedence is for objectType (for both domain objects and domain services).

        Show
        jira-bot ASF subversion and git services added a comment - Commit 5a3029eb04a12b851a73ebac634fb504a82aaa05 in isis's branch refs/heads/maint-1.14.0 from Dan Haywood [ https://git-wip-us.apache.org/repos/asf?p=isis.git;h=5a3029e ] ISIS-1586 : adds @DomainService(objectType) and rationalizes w.r.t getId() Also updates to documentation, to make clear what the precedence is for objectType (for both domain objects and domain services).
        Hide
        jira-bot ASF subversion and git services added a comment -

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

        ISIS-1586: adds @DomainService(objectType) and rationalizes w.r.t getId()

        Also updates to documentation, to make clear what the precedence is for objectType (for both domain objects and domain services).

        Show
        jira-bot ASF subversion and git services added a comment - Commit 5a3029eb04a12b851a73ebac634fb504a82aaa05 in isis's branch refs/heads/master from Dan Haywood [ https://git-wip-us.apache.org/repos/asf?p=isis.git;h=5a3029e ] ISIS-1586 : adds @DomainService(objectType) and rationalizes w.r.t getId() Also updates to documentation, to make clear what the precedence is for objectType (for both domain objects and domain services).

          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