public interface PersonLookupSession extends OsidSession
This session defines methods for retrieving persons.
This lookup session defines several views:
PersonAdminSession.
The methods useFederatedRealmView()
and
useIsolatedRealmView()
behave as a radio group and one should be
selected before invoking any lookup methods.
Modifier and Type | Method and Description |
---|---|
boolean |
canLookupPersons()
Tests if this user can examine this realm.
|
Person |
getPerson(Id personId)
Gets the
Person specified by its Id. |
PersonList |
getPersons()
Gets all persons.
|
PersonList |
getPersonsByGenusType(Type personGenusType)
Gets a
PersonList corresponding to the given person
genus Type which does not include persons of types
derived from the specified Type. |
PersonList |
getPersonsByIds(IdList personIds)
Gets a
PersonList corresponding to the given
IdList. |
PersonList |
getPersonsByParentGenusType(Type personGenusType)
Gets a
PersonList corresponding to the given person
genus Type and include any additional persons with
genus types derived from the specified Type. |
PersonList |
getPersonsByRecordType(Type personRecordType)
Gets a
PersonList containing the given person record
Type. |
Realm |
getRealm()
Gets the
Realm associated with this session. |
Id |
getRealmId()
Gets the
Realm Id associated with this
session. |
void |
useComparativePersonView()
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 |
useFederatedRealmView()
Federates the view for methods in this session.
|
void |
useIsolatedRealmView()
Isolates the view for methods in this session.
|
void |
usePlenaryPersonView()
A complete view of the
Person returns is desired. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getRealmId()
Realm
Id
associated with this
session. Realm Id
associated with this sessionmandatory
- This method must be implemented. Realm getRealm() throws OperationFailedException, PermissionDeniedException
Realm
associated with this session.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canLookupPersons()
PERMISSION_DENIED.
This is intended as a hint to an
application that may opt not to offer these operations. false
if realm reading methods are not
authorized, true
otherwisemandatory
- This method must be implemented. void useComparativePersonView()
mandatory
- This method is must be implemented. void usePlenaryPersonView()
Person
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 useFederatedRealmView()
mandatory
- This method is must be implemented. void useIsolatedRealmView()
mandatory
- This method is must be implemented. Person getPerson(Id personId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Person
specified by its Id.
In
plenary mode, the exact Id
is found or a
NOT_FOUND
results. Otherwise, the returned Person
may have a different Id
than requested, such as
the case where a duplicate Id
was assigned to a
Person
and retained for compatibility.personId
- the Id
of the Person
to
retrieve Person
NotFoundException
- no Person
found with
the given Id
NullArgumentException
- personId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. PersonList getPersonsByIds(IdList personIds) throws NotFoundException, OperationFailedException, PermissionDeniedException
PersonList
corresponding to the given
IdList.
In plenary mode, the returned list contains all of the
persons 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 persons may be omitted from the list and may present the
elements in any order including returning a unique set.personIds
- the list of Ids
to retrieve Person list
NotFoundException
- an Id was
not foundNullArgumentException
- personIds
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. PersonList getPersonsByGenusType(Type personGenusType) throws OperationFailedException, PermissionDeniedException
PersonList
corresponding to the given person
genus Type
which does not include persons of types
derived from the specified Type.
In plenary mode, the
returned list contains all known persons or an error results.
Otherwise, the returned list may contain only those persons that are
accessible through this session.personGenusType
- a persons genus type Person list
NullArgumentException
- personGenusType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. PersonList getPersonsByParentGenusType(Type personGenusType) throws OperationFailedException, PermissionDeniedException
PersonList
corresponding to the given person
genus Type
and include any additional persons with
genus types derived from the specified Type.
In plenary
mode, the returned list contains all known persons or an error
results. Otherwise, the returned list may contain only those persons
that are accessible through this session.personGenusType
- a person genus type Person list
NullArgumentException
- personGenusType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. PersonList getPersonsByRecordType(Type personRecordType) throws OperationFailedException, PermissionDeniedException
PersonList
containing the given person record
Type.
In plenary mode, the returned list contains all
known persons or an error results. Otherwise, the returned list may
contain only those persons that are accessible through this session.personRecordType
- a person record type PersonList
NullArgumentException
- personRecordType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. PersonList getPersons() throws OperationFailedException, PermissionDeniedException
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.