OSID Logo
OSID Specifications
profile package
Version 3.0.0
Release Candidate Preview
Interfaceosid.profile.ProfileItemLookupSession
Implementsosid.OsidSession
Description

This session provides methods for retrieving ProfileItem objects.

This session defines two sets of views which offer differing behaviors when retrieving multiple objects.

  • comparative view: elements may be silently omitted or re-ordered
  • plenary view: provides a complete and ordered result set or is an error condition
  • isolated profile view: All profile item methods in this session operate, retrieve and pertain to profile items defined explicitly in the current profile. Using an isolated view is useful for managing profile items with the ProfileItemAdminSession.
  • federated profile view: All profile item methods in this session operate, retrieve and pertain to all profile items defined in this profile and any other profiles implicitly available in this profile through profile inheritence.

Generally, the comparative view should be used for most applications as it permits operation even if there a particular element is inaccessible. For example, a hierarchy output can be plugged into a lookup method to retrieve all objects known to a hierarchy, but it may not be necessary to break execution if a node from the hierarchy no longer exists. However, some administrative applications may need to know whether it had retrieved an entire set of objects and may sacrifice some interoperability for the sake of precision.

ProfileItems may have an additional records indicated by their respective record types.

MethodgetProfileId
Description

Gets the Profile Id associated with this session.

Returnosid.id.Idthe Profile Id associated with this session
CompliancemandatoryThis method must be implemented.
MethodgetProfile
Description

Gets the Profile associated with this session.

Returnosid.profile.Profilethe Profile associated with this session
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanLookupProfileItems
Description

Tests if this user can perform ProfileItem lookups. A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer lookup operations.

Returnboolean false if lookup methods are not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethoduseComparativeProfileItemView
Description

The returns from the lookup methods may omit or translate elements based on this session, such as authorization, and not result in an error. This view is used when greater interoperability is desired at the expense of precision.

CompliancemandatoryThis method is must be implemented.
MethodusePlenaryProfileItemView
Description

A complete view of the ProfileItem returns is desired. Methods will return what is requested or result in an error. This view is used when greater precision is desired at the expense of interoperability.

CompliancemandatoryThis method is must be implemented.
MethoduseFederatedProfileView
Description

Federates the view for methods in this session. A federated view will include items in profiles which are children of this profile in the profile hierarchy.

CompliancemandatoryThis method is must be implemented.
MethoduseIsolatedProfileView
Description

Isolates the view for methods in this session. An isolated view restricts lookups to this profile only.

CompliancemandatoryThis method is must be implemented.
MethodgetProfileItem
Description

Gets the ProfileItem specified by its Id. In plenary mode, the exact Id is found or a NOT_FOUND results. Otherwise, the returned ProfileItem may have a different Id than requested, such as the case where a duplicate Id was assigned to a ProfileItem and retained for compatibility.

Parametersosid.id.IdprofileItemIdthe Id of the ProfileItem to retrieve
Returnosid.profile.ProfileItemthe returned ProfileItem
ErrorsNOT_FOUNDno ProfileItem found with the given Id
NULL_ARGUMENT profileItemId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetProfileItemsByIds
Description

Gets a ProfileItemList corresponding to the given IdList. In plenary mode, the returned list contains all of the profile items specified in the Id list, in the order of the list, including duplicates, or an error results if an Id in the supplied list is not found or inaccessible. Otherwise, inaccessible ProfileItems may be omitted from the list and may present the elements in any order including returning a unique set.

Parametersosid.id.IdListprofileItemIdsthe list of Ids to retrieve
Returnosid.profile.ProfileItemListthe returned ProfileItem list
ErrorsNOT_FOUNDan Id was not found
NULL_ARGUMENT profileItemIds is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetProfileItemsByGenusType
Description

Gets a ProfileItemList corresponding to the given profile item genus Type which does not include profile items of genus types derived from the specified Type. In plenary mode, the returned list contains all known profile items or an error results. Otherwise, the returned list may contain only those profile items that are accessible through this session.

Parametersosid.type.TypeprofileItemGenusTypea profile item genus type
Returnosid.profile.ProfileItemListthe returned ProfileItem list
ErrorsNULL_ARGUMENT profileItemGenusType is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetProfileItemsByParentGenusType
Description

Gets a ProfileItemList corresponding to the given profile item genus Type and include any additional profile item with genus types derived from the specified Type. In plenary mode, the returned list contains all known profile items or an error results. Otherwise, the returned list may contain only those profile items that are accessible through this session.

Parametersosid.type.TypeprofileItemGenusTypea profile item genus type
Returnosid.profile.ProfileItemListthe returned ProfileItem list
ErrorsNULL_ARGUMENT profileItemGenusType is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetProfileItemsByRecordType
Description

Gets a ProfileItemList containing the given profile item record Type. In plenary mode, the returned list contains all known profile items or an error results. Otherwise, the returned list may contain only those profile items that are accessible through this session.

Parametersosid.type.TypeprofileItemRecordTypea profile item record type
Returnosid.profile.ProfileItemListthe returned ProfileItem list
ErrorsNULL_ARGUMENT profileItemRecordType is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetProfileItems
Description

Gets all ProfileItems. In plenary mode, the returned list contains all known profile items or an error results. Otherwise, the returned list may contain only those profile items that are accessible through this session.

Returnosid.profile.ProfileItemLista list of ProfileItems
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.