public interface PostForumAssignmentSession extends OsidSession
This session provides methods to re-assign Posts to
Forums. A Post may map to multiple
Forums and removing the last reference to a Post is
the equivalent of deleting it. Each Forum may have its own
authorizations governing who is allowed to operate on it.
Adding a reference of a Post to another Forum
is not a copy operation (eg: does not change its Id
).
| Modifier and Type | Method and Description |
|---|---|
void |
assignPostToForum(Id postId,
Id forumId)
Adds an existing
Post to a Forum. |
boolean |
canAssignPosts()
Tests if this user can alter post/forum mappings.
|
boolean |
canAssignPostsToForum(Id forumId)
Tests if this user can alter post/forum mappings.
|
IdList |
getAssignableForumIds(Id forumId)
Gets a list of forums including and under the given forum node in
which any post can be assigned.
|
IdList |
getAssignableForumIdsForPost(Id forumId,
Id postId)
Gets a list of forums including and under the given forum node in
which a specific post can be assigned.
|
void |
reassignPostToForum(Id postId,
Id fromPostId,
Id toPostId)
Moves a
Post from one Forum to another. |
void |
unassignPostFromForum(Id postId,
Id forumId)
Removes a
Post from a Forum. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseboolean canAssignPosts()
PERMISSION_DENIED. This is intended as a hint to
an application that may opt not to offer assignment operations to
unauthorized users. false if mapping is not authorized, true
otherwisemandatory - This method must be implemented. boolean canAssignPostsToForum(Id forumId)
PERMISSION_DENIED. This is intended as a hint to
an application that may opt not to offer assignment operations to
unauthorized users.forumId - the Id of the Forum false if mapping is not authorized, true
otherwiseNullArgumentException - forumId is
null mandatory - This method must be implemented. IdList getAssignableForumIds(Id forumId) throws OperationFailedException
forumId - the Id of the Forum Ids NullArgumentException - forumId is
null OperationFailedException - unable to complete requestmandatory - This method must be implemented. IdList getAssignableForumIdsForPost(Id forumId, Id postId) throws OperationFailedException
forumId - the Id of the Forum postId - the Id of the Post Ids NullArgumentException - forumId or
postId is null OperationFailedException - unable to complete requestmandatory - This method must be implemented. void assignPostToForum(Id postId, Id forumId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Post to a Forum. postId - the Id of the Post forumId - the Id of the Forum AlreadyExistsException - postId is
already assigned to forumId NotFoundException - postId or
forumId not foundNullArgumentException - postId or
forumId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void unassignPostFromForum(Id postId, Id forumId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Post from a Forum. postId - the Id of the Post forumId - the Id of the Forum NotFoundException - postId or
forumId not found or postId not
assigned to forumId NullArgumentException - postId or
forumId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void reassignPostToForum(Id postId, Id fromPostId, Id toPostId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Post from one Forum to another.
Mappings to other Forums are unaffected.postId - the Id of the Post fromPostId - the Id of the current Forum
toPostId - the Id of the destination Forum
NotFoundException - postId, fromForumId,
or toForumId not found or postId
not mapped to fromForumId NullArgumentException - postId, fromForumId,
or toForumId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.