Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-6223

Provide proper API for resource change communication

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.4.6
    • Component/s: None
    • Labels:
      None

      Description

      The current interface and implementation of Origin.watchForChanges() is flawed in a several aspects:

      • The origins don't necessarily trigger callbacks for all files (e.g if a directory is modified, its children won't necessarily be called back)
      • Thus, we end up having to traverse the modified directory anyway. And this obviously doesn't tell us that a file in a that directory was removed.
      • Current Origin implementations mandate that the underlying resource (file, node, ...) actually exist
      • The above thus makes it difficult to callback with a ResourcePath that was deleted, regardless of whether we pass an event type in the visitor or not.
      • At least for the case of registries and configuration, we'll probably end up calling back the registry and have it reload everything. In turn, that means that passing a ResourceVisitor (or Predicate and Function like we had previously) just won't cut it.

        Checklists

        Acceptance criteria

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                apchelintcev Aleksandr Pchelintcev
                Reporter:
                gjoseph Magnolia International
                Votes:
                1 Vote for this issue
                Watchers:
                5 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:
                  Date of First Response:

                    Checklists

                    Task DoR