Interface ProfileEntryLookupSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session defines methods to search and retrieve
ProfileEntries .
This lookup session defines two sets of views:
- isolated profile view: All profile methods in this session
operate, retrieve and pertain to
ProfileEntriesdefined explicitly in the currentProfile. Using an isolated view is useful for managingProfileEntrieswith theProfileEntryAdminSession. - federated profile view; All profile methods in this session operate, retrieve and pertain to all profile entries defined in this profile and any other entries implicitly available in this profile through profile inheritence.
- effective profile entry view: All profil eentry lookup methods return edges where the current dates falls in between the effective dates inclusive.
- any effective profile entry edge view: Profil eentries of any effective date are returned.
- explicit profile entry view: All profile methods in this session
operate, retrieve and pertain to only those profile entries that have
been explicitly defined and not derived from
Resourcegroups. - implicit profile entry view; All profile entry methods in this
session operate, retrieve and pertain to all profile entries including
those derived from
Resourcegroups. - explicit resource view: Only show profile entries explicitly mapped to the given resource when looking up profile entries by resource.
- implicit resource view: Include all profile entries related to the resource including profile entries using any agent of the resource.
The view methods such as useExplicitProfileEntryView() and
useImplicitProfileEntryView() behave as a radio group and one
should be selected before invoking any lookup methods.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanTests if this user can perform profile lookups.getExplicitProfileEntry(Id profileEntryId) Gets the explicitProfileEntrythat generated the given implicit profile entry.Gets theProfileassociated with this session.Geta allProfileEntries.getProfileEntriesByGenusType(Type profileEntryGenusType) Gets aProfileEntryListcorresponding to the given profile entry genusTypewhich does not include profile entries of genus types derived from the specifiedType.getProfileEntriesByIds(IdList profileEntryIds) Gets anProfileEntryListcorresponding to the givenIdList.getProfileEntriesByParentGenusType(Type profileEntryGenusType) Gets aProfileEntryListcorresponding to the given profile entry genusType andinclude profile entries of genus types derived from the specifiedType.getProfileEntriesByRecordType(Type profileEntryRecordType) Gets aProfileEntryListcontaining the given profile entry recordType.getProfileEntriesForAgent(Id agentId) Gets a list ofProfileEntriesassociated with a given agent.getProfileEntriesForAgentAndProfileItem(Id agentId, Id profileItemId) Gets a list ofProfileEntriesassociated for entries explicitly mapped to a given agent and profile item.getProfileEntriesForAgentAndProfileItemOnDate(Id agentId, Id profileItemId, DateTime from, DateTime to) Gets aProfileEntryListfor entries explicitly mapped to a given agent and profile item and effective during the entire given date range inclusive but not confined to the date range.getProfileEntriesForAgentOnDate(Id agentId, DateTime from, DateTime to) Gets aProfileEntryListfor the given agent and effective during the entire given date range inclusive but not confined to the date range.getProfileEntriesForProfileItem(Id profileItemId) Gets aProfileEntryListfor a given profile item.getProfileEntriesForProfileItemOnDate(Id profileItemId, DateTime from, DateTime to) Gets aProfileEntryListfor the given profile item and effective during the entire given date range inclusive but not confined to the date range.getProfileEntriesForResource(Id resourceId) Gets a list ofProfileEntriesassociated for entries related to a given resource.getProfileEntriesForResourceAndProfileItem(Id resourceId, Id profileItemId) Gets a list ofProfileEntriesassociated for entries explicitly mapped to a given resource and profile item.getProfileEntriesForResourceAndProfileItemOnDate(Id resourceId, Id profileItemId, DateTime from, DateTime to) Gets aProfileEntryListfor entries explicitly mapped to a given resource and profile item and effective during the entire given date range inclusive but not confined to the date range.getProfileEntriesForResourceOnDate(Id resourceId, DateTime from, DateTime to) Gets aProfileEntryListfor entries explicitly mapped to a given resource and effective during the entire given date range inclusive but not confined to the date range.getProfileEntriesOnDate(DateTime from, DateTime to) Gets aProfileEntryListeffective date during the entire given date range inclusive but not confined to the date range.getProfileEntry(Id profileEntryId) Gets theProfileEntryspecified by itsId.Gets theProfileIdassociated with this session.voidAll profile entries of any effective dates are returned by all methods in this session.voidThe returns from the lookup methods may omit or translate elements based on this session, such as authorization, and not result in an error.voidOnly profile entries whose effective dates are current are returned by methods in this session.voidSets the view for methods in this session to explicit profile entries.voidOnly include profile entries explicitly mapped to the given resource when looking up profile entries by resource.voidFederates the view for methods in this session.voidSets the view for methods in this session to implicit profile entries.voidInclude profile entries of any agent of a resource when looking up profile entries by resource.voidIsolates the view for methods in this session.voidA complete view of theProfileEntryreturns is desired.Methods inherited from interface OsidSession
closeMethods inherited from interface OsidSession
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionsModifier and TypeMethodDescriptionGets the agent authenticated to this session.Gets theIdof the agent authenticated to this session.Gets the rate of the service clock.getDate()Gets the service date which may be the current date or the effective date in which this session exists.Gets the effective agent in use by this session.Gets theIdof the effective agent in use by this session.Gets theDisplayTextformatTypepreference in effect for this session.Gets the locale indicating the localization preferences in effect for this session.booleanTests if an agent is authenticated to this session.Starts a new transaction for this sesson.booleanTests for the availability of transactions.
-
Method Details
-
getProfileId
Id getProfileId()Gets theProfileIdassociated with this session.- Returns:
- the
Profile Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getProfile
Gets theProfileassociated with this session.- Returns:
- the
Profileassociated with this session - Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canLookupProfileEntries
boolean canLookupProfileEntries()Tests if this user can perform profile 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 aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer lookup operations to unauthorized users.- Returns:
falseif lookup methods are not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
useComparativeProfileEntryView
void useComparativeProfileEntryView()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.- Compliance:
mandatory- This method is must be implemented.
-
usePlenaryProfileEntryView
void usePlenaryProfileEntryView()A complete view of theProfileEntryreturns 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.- Compliance:
mandatory- This method is must be implemented.
-
useFederatedProfileView
void useFederatedProfileView()Federates the view for methods in this session. A federated view will include profile entries in profiles which are children of this profile in the profile hierarchy.- Compliance:
mandatory- This method is must be implemented.
-
useIsolatedProfileView
void useIsolatedProfileView()Isolates the view for methods in this session. An isolated view restricts lookups to this profile only.- Compliance:
mandatory- This method is must be implemented.
-
useEffectiveProfileEntryView
void useEffectiveProfileEntryView()Only profile entries whose effective dates are current are returned by methods in this session.- Compliance:
mandatory- This method is must be implemented.
-
useAnyEffectiveProfileEntryView
void useAnyEffectiveProfileEntryView()All profile entries of any effective dates are returned by all methods in this session.- Compliance:
mandatory- This method is must be implemented.
-
useImplicitProfileEntryView
void useImplicitProfileEntryView()Sets the view for methods in this session to implicit profile entries. An implicit view will include profile entries derived from other entries as a result of theProfileItemorResourcehierarchies. This method is the opposite ofexplicitProfileEntryView().- Compliance:
mandatory- This method is must be implemented.
-
useExplicitProfileEntryView
void useExplicitProfileEntryView()Sets the view for methods in this session to explicit profile entries. An explicit view includes only those profile entries that were explicitly defined and not implied. This method is the opposite ofimplicitProfileEntryView().- Compliance:
mandatory- This method is must be implemented.
-
useImplicitResourceView
void useImplicitResourceView()Include profile entries of any agent of a resource when looking up profile entries by resource.- Compliance:
mandatory- This method is must be implemented.
-
useExplicitResourceView
void useExplicitResourceView()Only include profile entries explicitly mapped to the given resource when looking up profile entries by resource.- Compliance:
mandatory- This method is must be implemented.
-
getProfileEntry
ProfileEntry getProfileEntry(Id profileEntryId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets theProfileEntryspecified by itsId. In plenary mode, the exactIdis found or aNOT_FOUNDresults. Otherwise, the returnedProfileEntrymay have a differentIdthan requested, such as the case where a duplicateIdwas assigned to anProfileEntryand retained for compatibility. In effective mode, profile entries are returned that are currently effective. In any effective mode, effective profile entries and those currently expired are returned.- Parameters:
profileEntryId- theIdof theProfileEntryto retrieve- Returns:
- the returned
ProfileEntry - Throws:
NotFoundException- noProfileEntryfound with the givenIdNullArgumentException-profileEntryIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getProfileEntriesByIds
ProfileEntryList getProfileEntriesByIds(IdList profileEntryIds) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets anProfileEntryListcorresponding to the givenIdList. In plenary mode, the returned list contains all of the entries specified in theIdlist, in the order of the list, including duplicates, or an error results if anIdin the supplied list is not found or inaccessible. Otherwise, inaccessibleProfileEntriesmay be omitted from the list and may present the elements in any order including returning a unique set. In effective mode, profile entries are returned that are currently effective. In any effective mode, effective profile entries and those currently expired are returned.- Parameters:
profileEntryIds- the list ofIdsto retrieve- Returns:
- the returned
ProfileEntry list - Throws:
NotFoundException- anId wasnot foundNullArgumentException-profileEntryIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getProfileEntriesByGenusType
ProfileEntryList getProfileEntriesByGenusType(Type profileEntryGenusType) throws OperationFailedException, PermissionDeniedException Gets aProfileEntryListcorresponding to the given profile entry genusTypewhich does not include profile entries of genus types derived from the specifiedType. In plenary mode, the returned list contains all known profile entries or an error results. Otherwise, the returned list may contain only those profile ebtries that are accessible through this session. In effective mode, profile entries are returned that are currently effective. In any effective mode, effective profile entries and those currently expired are returned.- Parameters:
profileEntryGenusType- a profile entry genus type- Returns:
- the returned
ProfileEntrylist - Throws:
NullArgumentException-profileEntryGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure occurred- Compliance:
mandatory- This method must be implemented.
-
getProfileEntriesByParentGenusType
ProfileEntryList getProfileEntriesByParentGenusType(Type profileEntryGenusType) throws OperationFailedException, PermissionDeniedException Gets aProfileEntryListcorresponding to the given profile entry genusType andinclude profile entries of genus types derived from the specifiedType. In plenary mode, the returned list contains all known profile entries or an error results. Otherwise, the returned list may contain only those profile ebtries that are accessible through this session. In effective mode, profile entries are returned that are currently effective. In any effective mode, effective profile entries and those currently expired are returned.- Parameters:
profileEntryGenusType- a profile entry genus type- Returns:
- the returned
ProfileEntrylist - Throws:
NullArgumentException-profileEntryGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure occurred- Compliance:
mandatory- This method must be implemented.
-
getProfileEntriesByRecordType
ProfileEntryList getProfileEntriesByRecordType(Type profileEntryRecordType) throws OperationFailedException, PermissionDeniedException Gets aProfileEntryListcontaining the given profile entry recordType. In plenary mode, the returned list contains all known profile entries or an error results. Otherwise, the returned list may contain only those profile entries that are accessible through this session. In effective mode, profile entries are returned that are currently effective. In any effective mode, effective profile entries and those currently expired are returned.- Parameters:
profileEntryRecordType- a profile entry record type- Returns:
- the returned
ProfileEntrylist - Throws:
NullArgumentException-profileEntryRecordTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure occurred- Compliance:
mandatory- This method must be implemented.
-
getProfileEntriesOnDate
ProfileEntryList getProfileEntriesOnDate(DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets aProfileEntryListeffective date during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known authorizations or an error results. Otherwise, the returned list may contain only those authorizations that are accessible through this session. In effective mode, profile entries are returned that are currently effective in addition to being effective durting the date range. In any effective mode, effective profile entries and those currently expired are returned.- Parameters:
from- starting dateto- ending date- Returns:
- the returned
ProfileEntrylist - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-fromortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure occurred- Compliance:
mandatory- This method must be implemented.
-
getProfileEntriesForResource
ProfileEntryList getProfileEntriesForResource(Id resourceId) throws OperationFailedException, PermissionDeniedException Gets a list ofProfileEntriesassociated for entries related to a given resource. In explicit resource view, only include entries with the given resource. In implicit resource view, also include entries using any agent of the given resource. In plenary mode, the returned list contains all known profile entries or an error results. Otherwise, the returned list may contain only those profile ebtries that are accessible through this session. In effective mode, profile entries are returned that are currently effective. In any effective mode, effective profile entries and those currently expired are returned.- Parameters:
resourceId- a resourceId- Returns:
- the returned
ProfileEntry list - Throws:
NullArgumentException-resourceIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getProfileEntriesForResourceOnDate
ProfileEntryList getProfileEntriesForResourceOnDate(Id resourceId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets aProfileEntryListfor entries explicitly mapped to a given resource and effective during the entire given date range inclusive but not confined to the date range. In explicit resource view, only include entries with the given resource. In implicit resource view, also include entries using any agent of the given resource. In plenary mode, the returned list contains all known authorizations or an error results. Otherwise, the returned list may contain only those authorizations that are accessible through this session. In effective mode, profile entries are returned that are currently effective. In any effective mode, effective profile entries and those currently expired are returned.- Parameters:
resourceId- a resourceIdfrom- starting dateto- ending date- Returns:
- the returned
ProfileEntrylist - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-resourceId, fromortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure occurred- Compliance:
mandatory- This method must be implemented.
-
getProfileEntriesForAgent
ProfileEntryList getProfileEntriesForAgent(Id agentId) throws OperationFailedException, PermissionDeniedException Gets a list ofProfileEntriesassociated with a given agent. In plenary mode, the returned list contains all known profile entries or an error results. Otherwise, the returned list may contain only those profile ebtries that are accessible through this session. In effective mode, profile entries are returned that are currently effective. In any effective mode, effective profile entries and those currently expired are returned.- Parameters:
agentId- an agentId- Returns:
- the returned
ProfileEntry list - Throws:
NullArgumentException-agentIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getProfileEntriesForAgentOnDate
ProfileEntryList getProfileEntriesForAgentOnDate(Id agentId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets aProfileEntryListfor the given agent and effective during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known authorizations or an error results. Otherwise, the returned list may contain only those authorizations that are accessible through this session. In effective mode, profile entries are returned that are currently effective in addition to being effective during the date range. In any effective mode, effective profile entries and those currently expired are returned.- Parameters:
agentId- an agentIdfrom- starting dateto- ending date- Returns:
- the returned
ProfileEntrylist - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-agentId, fromortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure occurred- Compliance:
mandatory- This method must be implemented.
-
getProfileEntriesForProfileItem
ProfileEntryList getProfileEntriesForProfileItem(Id profileItemId) throws OperationFailedException, PermissionDeniedException Gets aProfileEntryListfor a given profile item. In plenary mode, the returned list contains all known profile entries or an error results. Otherwise, the returned list may contain only those profile entries that are accessible through this session. In effective mode, profile entries are returned that are currently effective. In any effective mode, effective profile entries and those currently expired are returned.- Parameters:
profileItemId- a profile itemId- Returns:
- the returned
ProfileEntry list - Throws:
NullArgumentException-profileItemIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getProfileEntriesForProfileItemOnDate
ProfileEntryList getProfileEntriesForProfileItemOnDate(Id profileItemId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets aProfileEntryListfor the given profile item and effective during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known authorizations or an error results. Otherwise, the returned list may contain only those authorizations that are accessible through this session. In effective mode, profile entries are returned that are currently effectiv in addition to being effective during the date range. In any effective mode, effective profile entries and those currently expired are returned.- Parameters:
profileItemId- a profile itemIdfrom- starting dateto- ending date- Returns:
- the returned
ProfileEntrylist - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-profileItemId, fromortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure occurred- Compliance:
mandatory- This method must be implemented.
-
getProfileEntriesForResourceAndProfileItem
ProfileEntryList getProfileEntriesForResourceAndProfileItem(Id resourceId, Id profileItemId) throws OperationFailedException, PermissionDeniedException Gets a list ofProfileEntriesassociated for entries explicitly mapped to a given resource and profile item. In explicit resource view, only include entries with the given resource. In implicit resource view, also include entries using any agent of the given resource. In plenary mode, the returned list contains all known profile entries or an error results. Otherwise, the returned list may contain only those profile ebtries that are accessible through this session. In effective mode, profile entries are returned that are currently effective. In any effective mode, effective profile entries and those currently expired are returned.- Parameters:
resourceId- a resourceIdprofileItemId- a profile itemId- Returns:
- the returned
ProfileEntry list - Throws:
NullArgumentException-resourceIdorprofileItemIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getProfileEntriesForResourceAndProfileItemOnDate
ProfileEntryList getProfileEntriesForResourceAndProfileItemOnDate(Id resourceId, Id profileItemId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets aProfileEntryListfor entries explicitly mapped to a given resource and profile item and effective during the entire given date range inclusive but not confined to the date range. In explicit resource view, only include entries with the given resource. In implicit resource view, also include entries using any agent of the given resource. In plenary mode, the returned list contains all known authorizations or an error results. Otherwise, the returned list may contain only those authorizations that are accessible through this session. In effective mode, profile entries are returned that are currently effective. In any effective mode, effective profile entries and those currently expired are returned.- Parameters:
resourceId- a resourceIdprofileItemId- a profile itemIdfrom- starting dateto- ending date- Returns:
- the returned
ProfileEntrylist - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-resourceId, profileItemId, fromortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure occurred- Compliance:
mandatory- This method must be implemented.
-
getProfileEntriesForAgentAndProfileItem
ProfileEntryList getProfileEntriesForAgentAndProfileItem(Id agentId, Id profileItemId) throws OperationFailedException, PermissionDeniedException Gets a list ofProfileEntriesassociated for entries explicitly mapped to a given agent and profile item. In plenary mode, the returned list contains all known profile entries or an error results. Otherwise, the returned list may contain only those profile ebtries that are accessible through this session. In effective mode, profile entries are returned that are currently effective. In any effective mode, effective profile entries and those currently expired are returned.- Parameters:
agentId- an agentIdprofileItemId- a profile itemId- Returns:
- the returned
ProfileEntry list - Throws:
NullArgumentException-agentIdorprofileItemIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getProfileEntriesForAgentAndProfileItemOnDate
ProfileEntryList getProfileEntriesForAgentAndProfileItemOnDate(Id agentId, Id profileItemId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets aProfileEntryListfor entries explicitly mapped to a given agent and profile item and effective during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known authorizations or an error results. Otherwise, the returned list may contain only those authorizations that are accessible through this session. In effective mode, profile entries are returned that are currently effective. In any effective mode, effective profile entries and those currently expired are returned.- Parameters:
agentId- an agentIdprofileItemId- a profile itemIdfrom- starting dateto- ending date- Returns:
- the returned
ProfileEntrylist - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-agentId, profileItemId, fromortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure occurred- Compliance:
mandatory- This method must be implemented.
-
getExplicitProfileEntry
ProfileEntry getExplicitProfileEntry(Id profileEntryId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the explicitProfileEntrythat generated the given implicit profile entry. If the givenProfileEntryis explicit, then the sameProfileEntryis returned.- Parameters:
profileEntryId- a profile entry- Returns:
- the explicit
ProfileEntry - Throws:
NotFoundException-profileEntryIdis not foundNullArgumentException-profileEntryIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getProfileEntries
Geta allProfileEntries. In plenary mode, the returned list contains all known profile entries or an error results. Otherwise, the returned list may contain only those profile ebtries that are accessible through this session. In effective mode, profile entries are returned that are currently effective. In any effective mode, effective profile entries and those currently expired are returned.- Returns:
- a list of
ProfileEntries - Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-