public interface ForumLookupSession extends OsidSession
This session provides methods for retrieving Forum
objects. The Forum
represents a collection of posts and
replies.
This session defines views that offer differing behaviors when retrieving multiple objects.
Modifier and Type | Method and Description |
---|---|
boolean |
canLookupForums()
Tests if this user can perform
Forum lookups. |
Forum |
getForum(Id forumId)
Gets the
Forum specified by its Id. |
ForumList |
getForums()
Gets all
Forums. |
ForumList |
getForumsByGenusType(Type forumGenusType)
Gets a
ForumList corresponding to the given forum genus
Type which does not include forums of genus types
derived from the specified Type. |
ForumList |
getForumsByIds(IdList forumIds)
Gets a
ForumList corresponding to the given
IdList. |
ForumList |
getForumsByParentGenusType(Type forumGenusType)
Gets a
ForumList corresponding to the given forum genus
Type and include any additional forums with genus types
derived from the specified Type. |
ForumList |
getForumsByProvider(Id resourceId)
Gets a
ForumList for the given provider . |
ForumList |
getForumsByRecordType(Type forumRecordType)
Gets a
ForumList containing the given forum record
Type. |
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.
|
void |
usePlenaryForumView()
A complete view of the
Forum returns is desired. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
boolean canLookupForums()
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. false
if lookup methods are not authorized,
true
otherwisemandatory
- This method must be implemented. void useComparativeForumView()
mandatory
- This method is must be implemented. void usePlenaryForumView()
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.mandatory
- This method is must be implemented. Forum getForum(Id forumId) throws NotFoundException, OperationFailedException, PermissionDeniedException
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.forumId
- Id
of the Forum
NotFoundException
- forumId
not foundNullArgumentException
- forumId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method is must be implemented. ForumList getForumsByIds(IdList forumIds) throws NotFoundException, OperationFailedException, PermissionDeniedException
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.forumIds
- the list of Ids
to retrieve Forum
listNotFoundException
- an Id was
not foundNullArgumentException
- forumIds
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. ForumList getForumsByGenusType(Type forumGenusType) throws OperationFailedException, PermissionDeniedException
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.forumGenusType
- a forum genus type Forum
listNullArgumentException
- forumGenusType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. ForumList getForumsByParentGenusType(Type forumGenusType) throws OperationFailedException, PermissionDeniedException
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.forumGenusType
- a forum genus type Forum
listNullArgumentException
- forumGenusType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. ForumList getForumsByRecordType(Type forumRecordType) throws OperationFailedException, PermissionDeniedException
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.forumRecordType
- a forum record type Forum
listNullArgumentException
- forumRecordType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. ForumList getForumsByProvider(Id resourceId) throws OperationFailedException, PermissionDeniedException
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.resourceId
- a resource Id
Forum
listNullArgumentException
- resourceId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. ForumList getForums() throws OperationFailedException, PermissionDeniedException
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. Forums
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.