public interface TrustLookupSession extends OsidSession
This session provides methods for retrieving Trusts.
The
Trust
represents the trust level of an agent. The
relationship among Agents
and Trust
is not
explicity managed but understood by an Authentication OSID Provider when
orchestration to an Authorization OSID Provider is desired.
This session defines two sets of views which offer differing behaviors when retrieving multiple objects.
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.
Trusts may have an additional records indicated by their respective
record types. The record may not be accessed through a cast of the
Trust.
Modifier and Type | Method and Description |
---|---|
boolean |
canLookupTrusts()
Tests if this user can perform
Trust lookups. |
Agency |
getAgency()
Gets the
Agency associated with this session. |
Id |
getAgencyId()
Gets the
Agency Id associated with this
session. |
TrustList |
getCircleOfTrust(Id trustId)
Gets a
TrustList in the same circle, or the same level
of confidence, as the given trust. |
Trust |
getTrust(Id trustId)
Gets the
Trust specified by its Id. |
TrustList |
getTrusts()
Gets all
Trusts. |
TrustList |
getTrustsByGenusType(Type trustGenusType)
Gets a
TrustList corresponding to the given trust genus
Type which does not include trusts of genus types
derived from the specified Type. |
TrustList |
getTrustsByIds(IdList trustIds)
Gets a
TrustList corresponding to the given
IdList. |
TrustList |
getTrustsByParentGenusType(Type trustGenusType)
Gets a
TrustList corresponding to the given trust genus
Type and include any additional trusts with genus types
derived from the specified Type. |
TrustList |
getTrustsByRecordType(Type trustRecordType)
Gets a
TrustList containing the given trust record
Type. |
void |
useComparativeTrustView()
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 |
useFederatedAgencyView()
Federates the view for methods in this session.
|
void |
useIsolatedAgencyView()
Isolates the view for methods in this session.
|
void |
usePlenaryTrustView()
A complete view of the
Trust returns is desired. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getAgencyId()
Agency
Id
associated with this
session. Agency Id
associated with this sessionmandatory
- This method must be implemented. Agency getAgency() throws OperationFailedException, PermissionDeniedException
Agency
associated with this session. Agency
associated with this sessionOperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canLookupTrusts()
Trust
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 useComparativeTrustView()
mandatory
- This method is must be implemented. void usePlenaryTrustView()
Trust
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 useFederatedAgencyView()
mandatory
- This method is must be implemented. void useIsolatedAgencyView()
mandatory
- This method is must be implemented. Trust getTrust(Id trustId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Trust
specified by its Id.
In
plenary mode, the exact Id
is found or a
NOT_FOUND
results. Otherwise, the returned Trust
may have a different Id
than requested, such as
the case where a duplicate Id
was assigned to a
Trust
and retained for compatibility.trustId
- the Id
of the Trust
to
retrieve Trust
NotFoundException
- no Trust
found with
the given Id
NullArgumentException
- trustId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. TrustList getTrustsByIds(IdList trustIds) throws NotFoundException, OperationFailedException, PermissionDeniedException
TrustList
corresponding to the given
IdList.
In plenary mode, the returned list contains all of the
trusts 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 Trusts
may be omitted from the list and
may present the elements in any order including returning a unique
set.trustIds
- a list of trust Ids
Trust list
NotFoundException
- an Id was
not foundNullArgumentException
- trustIds
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. TrustList getTrustsByGenusType(Type trustGenusType) throws OperationFailedException, PermissionDeniedException
TrustList
corresponding to the given trust genus
Type
which does not include trusts of genus types
derived from the specified Type.
In plenary mode, the
returned list contains all known trusts or an error results.
Otherwise, the returned list may contain only those trusts that are
accessible through this session.trustGenusType
- a trust genus type Trust
listNullArgumentException
- trustGenusType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. TrustList getTrustsByParentGenusType(Type trustGenusType) throws OperationFailedException, PermissionDeniedException
TrustList
corresponding to the given trust genus
Type
and include any additional trusts with genus types
derived from the specified Type.
In plenary mode, the
returned list contains all known trusts or an error results.
Otherwise, the returned list may contain only those trusts that are
accessible through this session.trustGenusType
- a trust genus type Trust
listNullArgumentException
- trustGenusType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. TrustList getTrustsByRecordType(Type trustRecordType) throws OperationFailedException, PermissionDeniedException
TrustList
containing the given trust record
Type.
In plenary mode, the returned list contains all
known trusts or an error results. Otherwise, the returned list may
contain only those trusts that are accessible through this session.trustRecordType
- a trust record type Trust
listNullArgumentException
- trustRecordType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. TrustList getCircleOfTrust(Id trustId) throws NotFoundException, OperationFailedException, PermissionDeniedException
TrustList
in the same circle, or the same level
of confidence, as the given trust. In plenary mode, the returned list
contains all known trusts or an error results. Otherwise, the returned
list may contain only those trusts that are accessible through this
session.trustId
- a trust Id
Trust
listNotFoundException
- trustId
is not foundNullArgumentException
- trustId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. TrustList getTrusts() throws OperationFailedException, PermissionDeniedException
Trusts.
In plenary mode, the returned list
contains all known trusts or an error results. Otherwise, the returned
list may contain only those trusts that are accessible through this
session. Trusts
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.