Package | osid.profile |
---|---|
Title | Profile Open Service Interface Definitions |
Version | 3.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 ProfileEntry A 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 Profile Cataloging Sub Packages The profile OSID contains a Profile Rules OSID for
managing the effectiveness of ExampleAn 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
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");} } |