| java.lang.Object net.jforum.ControllerUtils
ControllerUtils | public class ControllerUtils (Code) | | Common methods used by the controller.
author: Rafael Steil version: $Id: ControllerUtils.java,v 1.38 2007/08/01 22:30:06 rafaelsteil Exp $ |
addCookie | public static void addCookie(String name, String value)(Code) | | Add or update a cookie. This method adds a cookie, serializing its value using XML.
Parameters: name - The cookie name. Parameters: value - The cookie value |
addCookieTemplate | protected void addCookieTemplate(String name, String value)(Code) | | Template method to add a cookie.
Useful to suatins when a subclass wants to add
a cookie in a fashion different than the normal
behaviour
Parameters: name - The cookie name Parameters: value - The cookie value See Also: ControllerUtils.addCookie(String,String) |
checkAutoLogin | protected boolean checkAutoLogin(UserSession userSession)(Code) | | Checks user credentials / automatic login.
Parameters: userSession - The UserSession instance associated to the user's session true if auto login was enabled and the user was sucessfuly logged in. throws: DatabaseException - |
checkSSO | protected void checkSSO(UserSession userSession)(Code) | | Checks for user authentication using some SSO implementation
Parameters: userSession - UserSession |
configureUserSession | protected void configureUserSession(UserSession userSession, User user)(Code) | | Setup optios and values for the user's session if authentication was ok.
Parameters: userSession - The UserSession instance of the user Parameters: user - The User instance of the authenticated user |
getCookie | public static Cookie getCookie(String name)(Code) | | Gets a cookie by its name.
Parameters: name - The cookie name to retrieve The Cookie object if found, or null oterwhise |
getCookieTemplate | protected Cookie getCookieTemplate(String name)(Code) | | Template method to get a cookie.
Useful to situations when a subclass
wants to have a different way to
retrieve a cookie.
Parameters: name - The cookie name to retrieve The Cookie object if found, or null otherwise See Also: ControllerUtils.getCookie(String) |
prepareTemplateContext | public void prepareTemplateContext(SimpleHash context, ForumContext jforumContext)(Code) | | Setup common variables used by almost all templates.
Parameters: context - SimpleHash The context to use Parameters: jforumContext - JForumContext |
refreshSession | public void refreshSession()(Code) | | Do a refresh in the user's session. This method will update the last visit time for the
current user, as well checking for authentication if the session is new or the SSO user has
changed
|
|
|