Interface IdLookupSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session is for retrieving Id objects. getIds()
retrieves all known Ids . The existence of a single identifier can
be confirmed through the getId() method, or it can be used as a
means of Id translation.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanTests if this user can performIdlookups.Gets anId.getIdAliases(Id id) Gets a list ofIdaliases of anId.getIdAliasesByAuthority(Id id, String authority) Gets a list ofIdaliases in a authority for anId.getIdAliasesByAuthorityAndNamespace(Id id, String authority, String namespace) Gets a list ofIdaliases in a namespace for anId.getIds()Gets allIds.getIdsByAuthority(String authority) GetsIdsby the given authority.getIdsByAuthorityAndNamespace(String authority, String namespace) GetsIdsby the given authority and namespace.getIdsByIds(IdList ids) Gets a list ofIds.booleanisEquivalent(Id id, Id equivalentId) Tests if the twoIdsare equivalent.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
-
canLookupIds
boolean canLookupIds()Tests if this user can performIdlookups. 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.- Returns:
falseif lookup methods are not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
getId
Gets anId. This method serves to get the primaryIdif the givenIdIs an alias. Otherwise, the sameIdis returned.- Parameters:
id- anId- Returns:
- the
Id - Throws:
NotFoundException-idis not foundNullArgumentException-idisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getIdsByIds
IdList getIdsByIds(IdList ids) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets a list ofIds. This method serves to get the primaryIdsif different from the givenIds. Otherwise, the sameIdsare returned.- Parameters:
ids- a list ofIds- Returns:
- a list of
Ids - Throws:
NotFoundException- anidis not foundNullArgumentException-idsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getIdsByAuthority
IdList getIdsByAuthority(String authority) throws OperationFailedException, PermissionDeniedException GetsIdsby the given authority.- Parameters:
authority- an authority- Returns:
- a list of
Ids - Throws:
NullArgumentException-authorityisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getIdsByAuthorityAndNamespace
IdList getIdsByAuthorityAndNamespace(String authority, String namespace) throws OperationFailedException, PermissionDeniedException GetsIdsby the given authority and namespace.- Parameters:
authority- an authoritynamespace- a namespace- Returns:
- a list of
Ids - Throws:
NullArgumentException-authorityornamespaceisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getIds
Gets allIds.- Returns:
- the list of all
Ids - Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
isEquivalent
boolean isEquivalent(Id id, Id equivalentId) throws OperationFailedException, PermissionDeniedException Tests if the twoIdsare equivalent. TwoIdsare equivalent if they identify the same object such as one is an alias of the other.- Parameters:
id- anIdequivalentId- anId- Returns:
trueif theIdsare equivalent, false otherwise- Throws:
NullArgumentException-nullargument providedOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getIdAliases
Gets a list ofIdaliases of anId.- Parameters:
id- anId- Returns:
- a list of alias
Ids - Throws:
NullArgumentException-idisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getIdAliasesByAuthority
IdList getIdAliasesByAuthority(Id id, String authority) throws OperationFailedException, PermissionDeniedException Gets a list ofIdaliases in a authority for anId.- Parameters:
id- anIdauthority- an authority- Returns:
- a list of alias
Ids - Throws:
NullArgumentException-idorauthorityisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getIdAliasesByAuthorityAndNamespace
IdList getIdAliasesByAuthorityAndNamespace(Id id, String authority, String namespace) throws OperationFailedException, PermissionDeniedException Gets a list ofIdaliases in a namespace for anId.- Parameters:
id- anIdauthority- an authoritynamespace- a namespace- Returns:
- a list of alias
Ids - Throws:
NullArgumentException-id, authority, ornamespaceisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-