Interface SiteLookupSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface SiteLookupSession extends OsidSession

This session provides methods for retrieving Site objects. The Site represents a collection of Installations .

This session defines views that offer differing behaviors when retrieving multiple objects.

  • comparative view: elements may be silently omitted or re-ordered
  • plenary view: provides a complete set or is an error condition

Sites may have an additional records indicated by their respective record types. The record may not be accessed through a cast of the Site .

  • Method Details

    • canLookupSites

      boolean canLookupSites()
      Tests if this user can perform Site 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 to unauthorized users.
      Returns:
      false if lookup methods are not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • useComparativeSiteView

      void useComparativeSiteView()
      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.
    • usePlenarySiteView

      void usePlenarySiteView()
      A complete view of the Site 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.
    • getSite

      Gets the Site specified by its Id . In plenary mode, the exact Id is found or a NOT_FOUND results. Otherwise, the returned Site may have a different Id than requested, such as the case where a duplicate Id was assigned to a Site and retained for compatibility.
      Parameters:
      siteId - Id of the Site
      Returns:
      the site
      Throws:
      NotFoundException - siteId not found
      NullArgumentException - siteId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method is must be implemented.
    • getSites

      Gets all Sites . In plenary mode, the returned list contains all known sites or an error results. Otherwise, the returned list may contain only those sites that are accessible through this session.
      Returns:
      a SiteList
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.