public interface PostForumSession extends OsidSession
This session provides methods to retrieve Post
to
Forum
mappings. A Post
may appear in multiple
Forums.
Each Forum
may have its own
authorizations governing who is allowed to look at it.
This lookup session defines several views:
Modifier and Type | Method and Description |
---|---|
boolean |
canLookupPostForumMappings()
Tests if this user can perform lookups of post/forum mappings.
|
IdList |
getForumIdsByPost(Id postId)
Gets the list of
Forum Ids mapped to a
Post. |
ForumList |
getForumsByPost(Id postId)
Gets the list of
Forum objects mapped to a Post. |
IdList |
getPostIdsByForum(Id forumId)
Gets the list of Post Ids associated with a
Forum. |
IdList |
getPostIdsByForums(IdList forumIds)
Gets the list of
Post Ids corresponding to a list of
Forum objects. |
PostList |
getPostsByForum(Id forumId)
Gets the list of
Posts associated with a Forum. |
PostList |
getPostsByForums(IdList forumIds)
Gets the list of
Posts corresponding to a list of
Forums. |
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
Post and Forum
returns is desired. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
boolean canLookupPostForumMappings()
PERMISSION_DENIED.
This is intendedas
a hint to an application that may opt not to offer lookup operations
to unauthorized users. false
if looking up mappings is not authorized,
true
otherwisemandatory
- This method must be implemented. void useComparativeForumView()
mandatory
- This method is must be implemented. void usePlenaryForumView()
Post
and 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. IdList getPostIdsByForum(Id forumId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Forum.
forumId
- Id
of a Forum.
Ids
NotFoundException
- forumId
is not foundNullArgumentException
- forumId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. PostList getPostsByForum(Id forumId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Posts
associated with a Forum.
forumId
- Id
of a Forum
NotFoundException
- forumId
is not foundNullArgumentException
- forumId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. IdList getPostIdsByForums(IdList forumIds) throws OperationFailedException, PermissionDeniedException
Post Ids
corresponding to a list of
Forum
objects.forumIds
- list of forum Ids
Ids
NullArgumentException
- forumIds
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. PostList getPostsByForums(IdList forumIds) throws OperationFailedException, PermissionDeniedException
Posts
corresponding to a list of
Forums.
forumIds
- list of forum Ids
NullArgumentException
- forumIds
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. IdList getForumIdsByPost(Id postId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Forum
Ids
mapped to a
Post.
postId
- Id
of a Post
Ids
NotFoundException
- postId
is not foundNullArgumentException
- postId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. ForumList getForumsByPost(Id postId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Forum
objects mapped to a Post.
postId
- Id
of a Post
NotFoundException
- postId
is not foundNullArgumentException
- postId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.