Interface DirectoryLookupSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session defines methods for looking up directories in the current directory.
This session defines the following views:
- comparative view: elements may be silently omitted or re-ordered
- plenary view: provides a complete result set or is an error condition
- federated directory view: searches include entries in directories of which this directory is an ancestor
- isolated directory view: lookups are restricted to entries in this directory only
Generally, the comparative view should be used for most applications as it permits operation even if there is data out of sync. 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 using the plenary view.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanTests if this user can perform entry lookups.Gets the list of directories inthis directory.getDirectoriesByGenusType(Type dircetoryGenusType) Gets aDirectoryListcorresponding to the given directory genusTypewhich does not include directories of genus types derived from the specifiedType.In plenary mode, the returned list contains all known directories or an error results.getDirectoriesByIds(IdList directoryIds) Gets aDirectoryListcorresponding to the givenIdList.getDirectoriesByParentGenusType(Type directoryGenusType) Gets aDirectoryListcorresponding to the given directory genusTypeand include any additional directories with genus types derived from the specifiedType.In plenary mode, the returned list contains all known directories or an error results.getDirectoriesByProvider(Id resourceId) Gets aDirectoryListfor the given provider.getDirectoriesByRecordType(Type directoryRecordType) Gets aDirectoryListcorresponding to the given directory recordType.Gets the directory associated with this session.getDirectory(Id directoryId) Gets a specified directory.Gets theIdof this directory.voidThe returns from the lookup methods may omit or translate elements based on this session, such as authorization, and not result in an error.voidFederates the view for methods in this session.voidIsolates the view for methods in this session.voidA complete view of the directory returns 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
-
getDirectoryId
Id getDirectoryId()Gets theIdof this directory.- Returns:
- the
Idof this directory - Compliance:
mandatory- This method must be implemented.
-
getDirectory
Gets the directory associated with this session.- Returns:
- the directory associated with this session
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canLookupDirectories
boolean canLookupDirectories()Tests if this user can perform entry 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.- Returns:
falseif lookup methods are not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
useComparativeDirectoryView
void useComparativeDirectoryView()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.
-
usePlenaryDirectoryView
void usePlenaryDirectoryView()A complete view of the directory 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.- Compliance:
mandatory- This method is must be implemented.
-
useFederatedDirectoryView
void useFederatedDirectoryView()Federates the view for methods in this session. A federated view will include entries in directories which are children of this directory.- Compliance:
mandatory- This method is must be implemented.
-
useIsolatedDirectoryView
void useIsolatedDirectoryView()Isolates the view for methods in this session. An isolated view restricts lookups to this directory only.- Compliance:
mandatory- This method is must be implemented.
-
getDirectory
Directory getDirectory(Id directoryId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets a specified directory. In plenary mode, the exact Id is found or aNOT_FOUNDresults. Otherwise, the returnedDirectorymay have a differentIdthan requested such as with a link.- Parameters:
directoryId- theIdto the directory- Returns:
- the directory
- Throws:
NotFoundException-directoryIdis not foundNullArgumentException-directoryIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getDirectoriesByIds
DirectoryList getDirectoriesByIds(IdList directoryIds) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets aDirectoryListcorresponding to the givenIdList. In plenary mode, the returned list contains all of the directories 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, inaccessibleDirectoriesmay be omitted from the list and may present the elements in any order including returning a unique set.- Parameters:
directoryIds- the list ofIdsto retrieve- Returns:
- the returned
Directorylist - Throws:
NotFoundException- anIdwas not foundNullArgumentException-directoryIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getDirectoriesByGenusType
DirectoryList getDirectoriesByGenusType(Type dircetoryGenusType) throws OperationFailedException, PermissionDeniedException Gets aDirectoryListcorresponding to the given directory genusTypewhich does not include directories of genus types derived from the specifiedType.In plenary mode, the returned list contains all known directories or an error results. Otherwise, the returned list may contain only those directories that are accessible through this session.- Parameters:
dircetoryGenusType- a directory genus type- Returns:
- the returned
Directory list - Throws:
NullArgumentException-directoryGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getDirectoriesByParentGenusType
DirectoryList getDirectoriesByParentGenusType(Type directoryGenusType) throws OperationFailedException, PermissionDeniedException Gets aDirectoryListcorresponding to the given directory genusTypeand include any additional directories with genus types derived from the specifiedType.In plenary mode, the returned list contains all known directories or an error results. Otherwise, the returned list may contain only those directories that are accessible through this session.- Parameters:
directoryGenusType- a directory genus type- Returns:
- the returned
Directorylist - Throws:
NullArgumentException-directoryGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getDirectoriesByRecordType
DirectoryList getDirectoriesByRecordType(Type directoryRecordType) throws OperationFailedException, PermissionDeniedException Gets aDirectoryListcorresponding to the given directory recordType. The set of directories implementing the given record type is returned. In plenary mode, the returned list contains all known directories or an error results. Otherwise, the returned list may contain only those directories that are accessible through this session.- Parameters:
directoryRecordType- a directory record type- Returns:
- the returned
Directorylist - Throws:
NullArgumentException-directoryRecordTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getDirectoriesByProvider
DirectoryList getDirectoriesByProvider(Id resourceId) throws OperationFailedException, PermissionDeniedException Gets aDirectoryListfor the given provider. In plenary mode, the returned list contains all known directories or an error results. Otherwise, the returned list may contain only those directories that are accessible through this session.- Parameters:
resourceId- a resource Id- Returns:
- the returned
Directorylist - Throws:
NullArgumentException-resourceIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getDirectories
Gets the list of directories inthis directory. In a federated view, this method returns all directories in descendant directories. In plenary mode, the returned list contains all known directories or an error results. Otherwise, the returned list may contain only those directories that are accessible through this session.- Returns:
- the list of directories in this directory
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-