Uploaded image for project: 'Jackrabbit Content Repository'
  1. Jackrabbit Content Repository
  2. JCR-876

ManageableCollectionUtil should not throw "unsupported" JcrMapping exception

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.5
    • jackrabbit-ocm
    • None
    • All

    Description

      Many times, the object model'd code cannot be altered for ocm.

      To avoid the "unsupported" exception in almost all such cases, use a delegating wrapper class to encapsulate a Collection. The wrapper class implements MaangeableCollection.

      Since delegation is a performance hit, make the test below the last resort for object conversion in the method:
      public static ManageableCollection getManageableCollection(Object object)

      Proposed "catchall" test and program action:

      if (object instanceof Collection)

      { return new ManageableCollectionImpl((Collection)object); }

      Attachments

        Activity

          People

            Unassigned Unassigned
            dsconnelly Dan Connelly
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: