Interface DirectoryQuerySession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
All Known Subinterfaces:
DirectorySearchSession

public interface DirectoryQuerySession extends OsidSession

This session provides methods for searching among Directory objects. The search query is constructed using the DirectoryQuery .

This session defines views that offer differing behaviors for searching.

  • federated directory view: searches include directories in directories of which this directory is an ancestor
  • isolated directory view: searches are restricted to diectories in this directory only
  • Method Details

    • getDirectoryId

      Id getDirectoryId()
      Gets the Id of this directory.
      Returns:
      the Id of 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 request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • canSearchDirectories

      boolean canSearchDirectories()
      Tests if this user can perform Directory searches. 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 search operations to unauthorized users.
      Returns:
      false if search methods are not authorized, true otherwise
      Compliance:
      mandatory - This method 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.
    • getDirectoryQuery

      DirectoryQuery getDirectoryQuery()
      Gets a directory query.
      Returns:
      the directory query
      Compliance:
      mandatory - This method must be implemented.
    • getDirectoriesByQuery

      DirectoryList getDirectoriesByQuery(DirectoryQuery directoryQuery) throws OperationFailedException, PermissionDeniedException
      Gets a list of Directory objects matching the given directory query.
      Parameters:
      directoryQuery - the directory query
      Returns:
      the returned DirectoryList
      Throws:
      NullArgumentException - directoryQuery is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      UnsupportedException - directoryQuery is not of this service
      Compliance:
      mandatory - This method must be implemented.