Interface ForumLookupSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface ForumLookupSession extends OsidSession

This session provides methods for retrieving Forums . The Forum represents a collection of posts and replies.

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
  • Method Details

    • canLookupForums

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

      void useComparativeForumView()
      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.
    • usePlenaryForumView

      void usePlenaryForumView()
      A complete view of the Forum 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.
    • getForum

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

      Gets a ForumList corresponding to the given IdList . In plenary mode, the returned list contains all of the forums specified in the Id list, in the order of the list, including duplicates, or an error results if an Id in the supplied list is not found or inaccessible. Otherwise, inaccessible Forums may be omitted from the list and may present the elements in any order including returning a unique set.
      Parameters:
      forumIds - the list of Ids to retrieve
      Returns:
      the returned Forum list
      Throws:
      NotFoundException - an Id was not found
      NullArgumentException - forumIds is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getForumsByGenusType

      ForumList getForumsByGenusType(Type forumGenusType) throws OperationFailedException, PermissionDeniedException
      Gets a ForumList corresponding to the given forum genus Type which does not include forums of genus types derived from the specified Type . In plenary mode, the returned list contains all known forums or an error results. Otherwise, the returned list may contain only those forums that are accessible through this session.
      Parameters:
      forumGenusType - a forum genus type
      Returns:
      the returned Forum list
      Throws:
      NullArgumentException - forumGenusType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getForumsByParentGenusType

      ForumList getForumsByParentGenusType(Type forumGenusType) throws OperationFailedException, PermissionDeniedException
      Gets a ForumList corresponding to the given forum genus Type and include any additional forums with genus types derived from the specified Type . In plenary mode, the returned list contains all known forums or an error results. Otherwise, the returned list may contain only those forums that are accessible through this session.
      Parameters:
      forumGenusType - a forum genus type
      Returns:
      the returned Forum list
      Throws:
      NullArgumentException - forumGenusType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getForumsByRecordType

      ForumList getForumsByRecordType(Type forumRecordType) throws OperationFailedException, PermissionDeniedException
      Gets a ForumList containing the given forum record Type . In plenary mode, the returned list contains all known forums or an error results. Otherwise, the returned list may contain only those forums that are accessible through this session.
      Parameters:
      forumRecordType - a forum record type
      Returns:
      the returned Forum list
      Throws:
      NullArgumentException - forumRecordType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getForumsByProvider

      ForumList getForumsByProvider(Id resourceId) throws OperationFailedException, PermissionDeniedException
      Gets a ForumList for the given provider. In plenary mode, the returned list contains all known forums or an error results. Otherwise, the returned list may contain only those forums that are accessible through this session.
      Parameters:
      resourceId - a resource Id
      Returns:
      the returned Forum list
      Throws:
      NullArgumentException - resourceId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getForums

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