Interface AuthorizationQuerySession

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

public interface AuthorizationQuerySession extends OsidSession

This session provides methods for searching Authorization objects. The search query is constructed using the AuthorizationQuery .

This session defines views that offer differing behaviors for searching.

  • federated view: searches include authorizations in Vaults of which this vault is an ancestor in the vault hierarchy
  • isolated view: searches are restricted to authorizations in this Vault
  • implicit authorization view: authorizations include implicit authorizations
  • explicit authorization view: only explicit authorizations are returned
  • Method Details

    • getVaultId

      Id getVaultId()
      Gets the Vault Id associated with this session.
      Returns:
      the Vault Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getVault

      Gets the Vault associated with this session.
      Returns:
      the Vault associated with this session
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • canSearchAuthorizations

      boolean canSearchAuthorizations()
      Tests if this user can perform authorization 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.
    • useFederatedVaultView

      void useFederatedVaultView()
      Federates the view for methods in this session. A federated view will include authorizations in vaults which are children of this vault in the vault hierarchy.
      Compliance:
      mandatory - This method is must be implemented.
    • useIsolatedVaultView

      void useIsolatedVaultView()
      Isolates the view for methods in this session. An isolated view restricts searches to this vault only.
      Compliance:
      mandatory - This method is must be implemented.
    • useImplicitAuthorizationView

      void useImplicitAuthorizationView()
      Sets the view for methods in this session to implicit authorizations. An implicit view will include authorizations derived from other authorizations as a result of the Qualifier , Function or Resource hierarchies. This method is the opposite of explicitAut
      Compliance:
      mandatory - This method is must be implemented.
    • useExplicitAuthorizationView

      void useExplicitAuthorizationView()
      Sets the view for methods in this session to explicit authorizations. An explicit view includes only those authorizations that were explicitly defined and not implied. This method is the opposite of implicitAuthorizationView() .
      Compliance:
      mandatory - This method is must be implemented.
    • getAuthorizationQuery

      AuthorizationQuery getAuthorizationQuery()
      Gets an authorization query.
      Returns:
      the authorization query
      Compliance:
      mandatory - This method must be implemented.
    • getAuthorizationsByQuery

      AuthorizationList getAuthorizationsByQuery(AuthorizationQuery authorizationQuery) throws OperationFailedException, PermissionDeniedException
      Gets a list of Authorizations matching the given query.
      Parameters:
      authorizationQuery - the authorization query
      Returns:
      the returned AuthorizationList
      Throws:
      NullArgumentException - authorizationQuery is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      UnsupportedException - authorizationQuery is not of this service
      Compliance:
      mandatory - This method must be implemented.