Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-31406

write a demo provider to supply Institutional Anonymous IDs and "additional information"



    • Type: (Deprecated) Contributed Patch
    • Status: RESOLVED
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 11.0
    • Fix Version/s: 12.0
    • Component/s: Providers
    • Labels:


      In order for the features described in SAK-31404 & SAK-31405 to be QAd, a provider that is used in "demo mode" needs to be written. This should provide additional attributes ("Institutional Anonymous IDs" & "Additional Information") about Demo Sakai users (ie, users that are created when Sakai is run in demo mode).

      The demo provider should be used when sakai.demo=true system property is set (by having a components.demo.xml file in a sakai-component). It should have implementations of all of the interface and should exercise all possible cases that the interfaces defines. It should not have a list of valid users but should work for any user passed to it.

      The provider should have 2 ways of deciding on the returned value:

      1/ If a property is set on the objects passed in then they should be returned. These properties should be documented. This is to allow testing of specific cases. On the user object it could be a resource property keyed with "INSTITUTIONAL_ANONYMOUS_ID" for example.

      2/ If the property isn't set a simple algorithm should be used. This allows for easy testing without any setup and for testing of larger datasets. For deciding on return options is to use the hash of the ID of the objects passed into it. So for example to decide if there should be a candidate ID returned the provider can take get the hash of the ID and then just see it the least significant digit is divisible by 4 and if it is then don't return a candidate ID, otherwise return the last 5 characters of the SHA1 of the ID. The algorithm has to be consistent in the return values it generates.

        Gliffy Diagrams



              Issue Links



                  farreri Miguel Pellicer
                  adamm Adam Marshall
                  0 Vote for this issue
                  3 Start watching this issue



                      Git Integration