OSID Logo
OSID Specifications
profile package
Version 3.0.0
Release Candidate Preview
Packageosid.profile
TitleProfile Open Service Interface Definitions
Version3.0.0
Description

The Profile OSID serves to help applications make decisions based on user attributes. The format and interpretation of the user attributes are abstracted to allow the application to ask questions of the profile service. The Profile OSID can be used to make application decisions regarding localization, accessibility, or roles.

ProfileItems

ProfileItems represent questions an application may wish to ask in the context of a user. The evaluation of a ProfileItem always returns a boolean result. Examples may be "display menu?" or "use audio?"

ProfileEntry

A ProfileEntry is an OsidRelationship between a ProfileItem and a user. Explicit profile entries can be created using either the Resource or an Agent. A Resource that maps to multiple Agents or a Resource that represents a group of other Resources may result in the implicit existence of additional profile entries.

The Profile OSID is similar in operation to the Authorization OSID without a Qualifier. In both cases, an OSID Consumer asks questions identified by an OSID Id in the context of an Agent to determine how to proceed. In the Profile OSID, the Agent who is authenticated to the Profile service itself is used.

Profile Cataloging

ProfileEntries and ProfileItems may be organized into one or many Profiles. This serves to categorize profile data for the purpose of browsing or auditing. Profiles are hierarchical where each node includes all the profile data of its children. A single root node will make available all known profile entries and is a reasonable choice for a default Profile for a non-federated aware consumer. A federated profile scheme is one in which Profiles are available for selection.

Sub Packages

The profile OSID contains a Profile Rules OSID for managing the effectiveness of ProfileEntries and a Profile Batch OSID for managing ProfileItems and ProfileEntries in bulk.

Example

An application wishing to display an additional menu for users who live in Maine may traditionally do something like:

                         
                         
                         if (user.getAttribute("location") == "Maine") {
                             displayAdditionalMenu();
                         }
                         
                                 
                         
                    

The Profile OSID rephrases the question to the application viewpoint to allow for the extensibility and variation of interpretation of the attributes.

                         
                         
                         if (hasProfileEntry(displayAdditionalMenuId)) {
                             displayAdditionalMenu();
                         }
                         
                                 
                         
                    

Certain consumers may wish to be notified of changes within the service. Profile supports notifications via ProfileEntryNotificationSession, ProfileItemNotificationSession and ProfileNotificationSession.

                         
                         
                         if (manager.supportsProfileEntryNotification()) {
                             ProfileEntryNotificationSession ans = manager.getProfileEntryNotificationSession(receiver);           
                             ans.registerForDeletedProfileEntries();
                         }
                         
                         ProfileEntryReceiver receiver {
                             newProfileEntry(ProfileEntry a) {print("profile entry created");}
                             deletedProfileEntry(ProfileEntry a) {print("profile entry removed");}
                         }