Skip to Content.
Sympa Menu

grouper-dev - [grouper-dev] storing favorite and recently used data about a user

Subject: Grouper Developers Forum

List archive

[grouper-dev] storing favorite and recently used data about a user


Chronological Thread 
  • From: Chris Hyzer <>
  • To: "" <>
  • Subject: [grouper-dev] storing favorite and recently used data about a user
  • Date: Wed, 17 Jul 2013 05:10:00 +0000
  • Accept-language: en-US

This is implemented in trunk:

 

https://spaces.internet2.edu/display/Grouper/Grouper+UI+favorites+and+preferences+user+data

 

The Grouper 2.2 UI can hold preferences, favorites, and recently used objects are stored with the user.

 

This information is stored as attributes on a membership on a UI users group.  This group is generally internal to the UI and not needed outside.  If no one can READ or VIEW it, it is invisible to users.

 

The attributes are single assignable, and single valued.  The value type is String.

 

Attribute data is stored as a JSON object in the attribute value.  The structure of the recently used objects and favorites is:

 

{

  "list": [

    {

      "timestamp": 1374034138579,

      "uuid": "d9b0b9c3d3bc43ddb082a3f2fde6fee5"

    },

    {

      "timestamp": 1374034119978,

      "uuid": "c0cc2ebbbe994574ab5deed048d92676"

    }

  ]

}

The JSON is stored in one attribute which has a max size of 4k characters, and the max number of elements is 30.  So if you have more than 30 favorites, they are in a queue by date, and the oldest one will fall off.

 

The built in user data types are:

 

favoriteAttributeDef

favoriteAttributeDefName

favoriteGroup

favoriteMember

favoriteStem

recentAttributeDef

recentAttributeDefName

recentGroup

recentMember

recentStem

The API to manipulate the attribute is:

 

GrouperUserDataApi.recentlyUsedStemAdd(userDataGroupName, SubjectTestHelper.SUBJ0, recentlyUsed0);

Note that the userDataGroupName is the group which has the membership.  So multiple UIs could use this feature to store their own recently used or favorite items.

 

In the UI, we will store changes periodically, and eventually we should mark the attributes as not applicable for auditing and point in time auditing.



  • [grouper-dev] storing favorite and recently used data about a user, Chris Hyzer, 07/17/2013

Archive powered by MHonArc 2.6.16.

Top of Page