Method Summary |
|
public static synchronized void | addCategory(Category c) Adds a new category to the cache. |
public static synchronized void | addForum(Forum forum) |
public static void | clearModeratorList() |
public static List | getAllCategories(int userId) Gets all categories from the cache. |
public static List | getAllCategories() Get all categories.
A call to @link #getAllCategories(int) is made, passing
the return of SessionFacade.getUserSession().getUserId()
as the value for the "userId" argument.
List with the categories. |
public static Category | getCategory(int categoryId) Gets a category by its id. |
public static Category | getCategory(int userId, int categoryId) Gets a category by its id. |
public static Category | getCategory(PermissionControl pc, int categoryId) |
public static Forum | getForum(int forumId) |
public static LastPostInfo | getLastPostInfo(Forum forum) Gets information about the last message posted in some forum. |
public static LastPostInfo | getLastPostInfo(int forumId) Gets information about the last message posted in some forum. |
public static String | getListAllowedForums() |
public static List | getModeratorList(int forumId) Gets information about the moderators of some forum. |
public static MostUsersEverOnline | getMostUsersEverOnline() |
public static int | getTotalMessages() Gets the number of messages in the entire board. |
public static int | getTotalMessages(boolean fromDb) Gets the number of messags in the entire board.
Parameters: fromDb - If true , a query to the database willbe made, to retrieve the desired information. |
public static synchronized void | incrementTotalMessages() |
public static void | incrementTotalUsers() |
public static boolean | isCategoryAccessible(int userId, int categoryId) Check is some category is accessible. |
public static boolean | isCategoryAccessible(int categoryId) Check if some category is accessible. |
public static boolean | isCategoryAccessible(PermissionControl pc, int categoryId) Check is some category is accessible. |
public static boolean | isForumAccessible(int forumId) |
public static boolean | isForumAccessible(int userId, int forumId) |
public static boolean | isForumAccessible(int userId, int categoryId, int forumId) |
public static User | lastRegisteredUser() |
public static synchronized void | refreshCategory(Category c) Refreshes a category entry in the cache. |
public static synchronized void | refreshForum(Forum forum) |
public static synchronized void | reloadCategory(Category c) Updates some category.
This method only updated the "name" and "order" fields. |
public static synchronized void | reloadForum(int forumId) Reloads a forum.
The forum should already be in the cache and SHOULD NOT
have its order changed. |
public static synchronized void | removeCategory(Category c) Remove a category from the cache
Parameters: c - The category to remove. |
public static synchronized void | removeForum(Forum forum) Removes a forum from the cache. |
public static Category | retrieveCategory(int categoryId) |
public void | setCacheEngine(CacheEngine engine) |
public static void | setLastRegisteredUser(User user) |
public static synchronized void | start(ForumDAO fm, CategoryDAO cm, ConfigDAO configModel) Starts the repository. |
public static Integer | totalUsers() |
public static synchronized void | updateForumStats(Topic t, User u, Post p) |
public static void | updateMostUsersEverOnline(MostUsersEverOnline m) Update the value of most online users ever.
Parameters: m - MostUsersEverOnline The new value to store. |