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

Allow members (and their supporting methods) to have non-public visibility. Allow properties/collections to have no getters & setters, or non-public getters and setters.

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: In Progress
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.0.0-M5
    • Fix Version/s: 2.0.0-M7
    • Component/s: Isis Core
    • Labels:
      None

      Description

      See also ISIS-2782, which is closely related.  And discussion at https://the-asf.slack.com/archives/CFC42LWBV/p1625205578149000?thread_ts=1624911448.097500&cid=CFC42LWBV

       

      ~~~~~~

      Rationale here is: encapsulation, "tell not ask".

      Thus:

      • Our definition of a property or collection should be either with a publicly available getter or setter, or a field annotated with @Property or @Collection.
      • Our definition of an action should be either a publicly available method (if explicit actions config property not set), or a method with any visibility and annotated with @Action.
      • Our definition of a supporting method is either one with public visibility or with some other visibility but annotated with @MemberSupport.

      See this blog https://thorben-janssen.com/access-strategies-in-jpa-and-hibernate/ for reasons as to why field-level annotations are also recommended for ORMs (JPA in this case).

        Attachments

          Activity

            People

            • Assignee:
              hobrom Andi Huber
              Reporter:
              danhaywood Daniel Keir Haywood
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: