public interface ProfileItemLookupSession extends OsidSession
This session provides methods for retrieving ProfileItem
objects.
This session defines two sets of views which offer differing behaviors when retrieving multiple objects.
ProfileItemAdminSession. 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.
| Modifier and Type | Method and Description |
|---|---|
boolean |
canLookupProfileItems()
Tests if this user can perform
ProfileItem lookups. |
Profile |
getProfile()
Gets the
Profile associated with this session. |
Id |
getProfileId()
Gets the
Profile Id associated with this
session. |
ProfileItem |
getProfileItem(Id profileItemId)
Gets the
ProfileItem specified by its Id. |
ProfileItemList |
getProfileItems()
Gets all
ProfileItems. |
ProfileItemList |
getProfileItemsByGenusType(Type profileItemGenusType)
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. |
ProfileItemList |
getProfileItemsByIds(IdList profileItemIds)
Gets a
ProfileItemList corresponding to the given
IdList. |
ProfileItemList |
getProfileItemsByParentGenusType(Type profileItemGenusType)
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. |
ProfileItemList |
getProfileItemsByRecordType(Type profileItemRecordType)
Gets a
ProfileItemList containing the given profile
item record Type. |
void |
useComparativeProfileItemView()
The returns from the lookup methods may omit or translate elements
based on this session, such as authorization, and not result in an
error.
|
void |
useFederatedProfileView()
Federates the view for methods in this session.
|
void |
useIsolatedProfileView()
Isolates the view for methods in this session.
|
void |
usePlenaryProfileItemView()
A complete view of the
ProfileItem returns is desired. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseId getProfileId()
Profile Id associated with this
session. Profile Id associated with this sessionmandatory - This method must be implemented. Profile getProfile() throws OperationFailedException, PermissionDeniedException
Profile associated with this session. Profile associated with this sessionOperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean canLookupProfileItems()
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. false if lookup methods are not authorized,
true otherwisemandatory - This method must be implemented. void useComparativeProfileItemView()
mandatory - This method is must be implemented. void usePlenaryProfileItemView()
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.mandatory - This method is must be implemented. void useFederatedProfileView()
mandatory - This method is must be implemented. void useIsolatedProfileView()
mandatory - This method is must be implemented. ProfileItem getProfileItem(Id profileItemId) throws NotFoundException, OperationFailedException, PermissionDeniedException
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.profileItemId - the Id of the ProfileItem
to retrieve ProfileItem NotFoundException - no ProfileItem found
with the given Id NullArgumentException - profileItemId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. ProfileItemList getProfileItemsByIds(IdList profileItemIds) throws NotFoundException, OperationFailedException, PermissionDeniedException
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.profileItemIds - the list of Ids to retrieve ProfileItem listNotFoundException - an Id was not foundNullArgumentException - profileItemIds
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. ProfileItemList getProfileItemsByGenusType(Type profileItemGenusType) throws OperationFailedException, PermissionDeniedException
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.profileItemGenusType - a profile item genus type ProfileItem listNullArgumentException - profileItemGenusType
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. ProfileItemList getProfileItemsByParentGenusType(Type profileItemGenusType) throws OperationFailedException, PermissionDeniedException
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.profileItemGenusType - a profile item genus type ProfileItem listNullArgumentException - profileItemGenusType
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. ProfileItemList getProfileItemsByRecordType(Type profileItemRecordType) throws OperationFailedException, PermissionDeniedException
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.profileItemRecordType - a profile item record type ProfileItem listNullArgumentException - profileItemRecordType
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. ProfileItemList getProfileItems() throws OperationFailedException, PermissionDeniedException
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. ProfileItems OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.