Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-7097

Make EntityReference immutables and add Locale in DocumentReference

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Major
    • 3.3-milestone-2
    • 3.2
    • Old Core
    • None
    • Unit
    • Medium

    Description

      Make entity reference immutable:

      • make all setters protected
      • remove getChild()
      • remove clone() and Clonable
      • add a copy constructor
      • add a copy and replace parent construtor: copy a reference, and replace one of the parent in the parent chain by another one. This is helps circumvent most current use of setters in existing code. Existing code should be latter improved to avoid this. In particular, resolver could use a private mutable reference as suggested by Thomas.

      Add parameters to EntityReference:

      • add a TreeMap of parameters
      • add public getter and protected setter for a parameter
      • add construtor with parameters
      • update copy constructors, equals, hashcode and Comparable

      Add Locale and Version to DocumentReference:

      • add getter and protected setter for locale and version
      • add construtors with locale and/or version

      see http://markmail.org/thread/rjtoldp6wntf662h for vote and discussion

      Attachments

        Issue Links

          Activity

            People

              softec Denis Gervalle
              softec Denis Gervalle
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: