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

Provide proper API for resource change communication

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Fixed
    • Icon: Major Major
    • 5.4.6
    • None
    • None
    • None

      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.

        Acceptance criteria

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

                Created:
                Updated:
                Resolved:

                  Task DoR