Interface ForumHierarchyDesignSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session manages a hierarchy of forums. Forums may be organized
into a hierarchy for organizing or federating. A parent Forum
includes all of the replies of its children such that a single root node
contains all of the replies of the federation.
Like all OsidSessions, ForumHierarchyDesignSessions
are dedicated to single processing threads and a single authenticated
user.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddChildForum(Id forumId, Id childId) Adds a child to a forum.voidaddRootForum(Id forumId) Adds a root forum.booleanTests if this user can change the hierarchy.Gets the hierarchy associated with this session.Gets the hierarchyIdassociated with this session.voidremoveChildForum(Id forumId, Id childId) Removes a child from a forum.voidremoveChildForums(Id forumId) Removes all children from a forum.voidremoveRootForum(Id forumId) Removes a root forum.Methods inherited from interface OsidSession
closeMethods inherited from interface OsidSession
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatTypes, getLocales, isAuthenticated, startTransaction, supportsTransactions
-
Method Details
-
getForumHierarchyId
Id getForumHierarchyId()Gets the hierarchyIdassociated with this session.- Returns:
- the hierarchy
Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getForumHierarchy
Gets the hierarchy associated with this session.- Returns:
- the hierarchy associated with this session
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canModifyForumHierarchy
boolean canModifyForumHierarchy()Tests if this user can change the hierarchy. A return of true does not guarantee successful authorization. A return of false indicates that it is known performing any update will result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer these operations to an unauthorized user.- Returns:
falseif changing this hierarchy is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
addRootForum
void addRootForum(Id forumId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds a root forum.- Parameters:
forumId- theIdof a forum- Throws:
AlreadyExistsException-forumIdis already in hierarchyNotFoundException-forumIdis not foundNullArgumentException-forumIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
removeRootForum
void removeRootForum(Id forumId) throws NotFoundException, OperationFailedException, PermissionDeniedException Removes a root forum.- Parameters:
forumId- theIdof a forum- Throws:
NotFoundException-forumIdis not a rootNullArgumentException-forumIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
addChildForum
void addChildForum(Id forumId, Id childId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds a child to a forum.- Parameters:
forumId- theIdof a forumchildId- theIdof the new child- Throws:
AlreadyExistsException-forumIdis already a parent ofchildIdNotFoundException-forumIdorchildIdnot foundNullArgumentException-forumIdorchildIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
removeChildForum
void removeChildForum(Id forumId, Id childId) throws NotFoundException, OperationFailedException, PermissionDeniedException Removes a child from a forum.- Parameters:
forumId- theIdof a forumchildId- theIdof the new child- Throws:
NotFoundException-forumIdnot a parent ofchildIdNullArgumentException-forumIdorchildIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
removeChildForums
void removeChildForums(Id forumId) throws NotFoundException, OperationFailedException, PermissionDeniedException Removes all children from a forum.- Parameters:
forumId- theIdof a forum- Throws:
NotFoundException-forumIdnot foundNullArgumentException-forumIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-