Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-21669

The JS REST client: refactor and fix DiscoveryService class

    XMLWordPrintable

Details

    Description

      • The DiscoveryService uses a mixture of defining public methods inside the constructor function, as well as on the prototype object. In accordance with the rest of the API the methods should all be defined on the prototype object.
      • A lot of the DiscoveryServices functionality should be declared private (eg. copyToCache, discoverRoot, cacheObject, ...)
      • getObjectFromCache does not check for errors, in case it needs to utilize discoverRoot for the first time. This should definitely be fixed.
      • Broken cached object returned when searching for ...
      • The error checking if a response is valid or not should actually be done whenever such a request is made. Therefore the structure should be checked within the request handling of the discovery service, before the data is stored inside the cache. Everything inside the cache should be considered valid data as it does not make any sense to
        cache invalid retrieved information.

      Attachments

        Activity

          People

            Unassigned Unassigned
            Anton.Petrushenkov-obsolete@ez.no Anton Petrushenkov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 day
                1d