| java.lang.Object net.jforum.entities.Category
Category | public class Category implements Serializable(Code) | | Represents a category in the System.
Each category holds a reference to all its forums, which
can be retrieved by calling either @link #getForums(),
#getForum(int) and related methods. This class also controls the access to its forums, so a callto @link #getForums() will only return the forums accessibleto the user who make the call tho the method. author: Rafael Steil version: $Id: Category.java,v 1.22 2007/08/18 07:03:20 andowson Exp $ |
Category | public Category()(Code) | | |
Category | public Category(int id)(Code) | | |
addForum | public void addForum(Forum forum)(Code) | | Adds a forum to this category
Parameters: forum - Forum |
changeForumOrder | public void changeForumOrder(Forum forum)(Code) | | Changes a forum's display order.
This method changes the position of the
forum in the current display order of the
forum instance passed as argument, if applicable.
Parameters: forum - The forum to change |
getForum | public Forum getForum(int userId, int forumId)(Code) | | Gets a forum.
Parameters: userId - The user's id who is trying to see the forum Parameters: forumId - The id of the forum to get The Forum instance if found, or null otherwhise. See Also: Category.getForum(int) |
getForum | public Forum getForum(int forumId)(Code) | | Gets a forum.
Parameters: forumId - The forum's id The requested forum, if found, or null ifthe forum does not exists or access to it is denied. See Also: Category.getForum(int,int) |
getForums | public Collection getForums()(Code) | | Get all forums from this category.
All forums, regardless it is accessible to the user or not. |
getForums | public Collection getForums(int userId)(Code) | | Gets all forums from this category.
The forums available to the user who make the call See Also: Category.getForums() Parameters: userId - int |
getId | public int getId()(Code) | | int |
getOrder | public int getOrder()(Code) | | int |
isModerated | public boolean isModerated()(Code) | | |
reloadForum | public void reloadForum(Forum forum)(Code) | | Reloads a forum.
The forum should already be in the cache and SHOULD NOT
have its order changed. If the forum's order was changed,
then you MUST CALL @link #changeForumOrder(Forum) BEFORE
calling this method.
Parameters: forum - The forum to reload its information See Also: Category.changeForumOrder(Forum) |
removeForum | public void removeForum(int forumId)(Code) | | Removes a forum from the list.
Parameters: forumId - int |
setId | public void setId(int id)(Code) | | Sets the id.
Parameters: id - The id to set |
setModerated | public void setModerated(boolean status)(Code) | | |
setName | public void setName(String name)(Code) | | Sets the name.
Parameters: name - The name to set |
setOrder | public void setOrder(int order)(Code) | | Sets the order.
Parameters: order - The order to set |
|
|