public class CmsLoginHelper extends CmsJspLoginBean
| Modifier and Type | Class and Description |
|---|---|
static class |
CmsLoginHelper.LoginParameters
Holds the current login parameters.
|
| Modifier and Type | Field and Description |
|---|---|
static int |
ACTION_DISPLAY
Action constant: Default action, display the dialog.
|
static int |
ACTION_LOGIN
Action constant: Login successful.
|
static int |
ACTION_LOGOUT
Action constant: Logout.
|
static java.lang.String |
PARAM_ACTION_GETOULIST
The parameter name for the "getoulist" action.
|
static java.lang.String |
PARAM_ACTION_LOGIN
The parameter name for the "login" action.
|
static java.lang.String |
PARAM_ACTION_LOGOUT
The parameter name for the "logout" action.
|
static java.lang.String |
PARAM_AUTHTOKEN
Parameter name for the authorization token.
|
static java.lang.String |
PARAM_FORM
The html id for the login form.
|
static java.lang.String |
PARAM_OUFQN
The parameter name for the organizational unit.
|
static java.lang.String |
PARAM_OUSEARCH
The parameter name for the search organizational unit.
|
static java.lang.String |
PARAM_PASSWORD
The parameter name for the password.
|
static java.lang.String |
PARAM_PCTYPE
The parameter name for the PC type.
|
static java.lang.String |
PARAM_PREDEF_OUFQN
The parameter name for the organizational unit.
|
static java.lang.String |
PARAM_RESET_PASSWORD
Parameter used to open the 'send reset mail' view instead of the login dialog.
|
static java.lang.String |
PARAM_USERNAME
The parameter name for the user name.
|
static java.lang.String |
PARAM_WPDATA
The parameter name for the workplace data.
|
static java.lang.String |
PCTYPE_PRIVATE
PC type constant: private PC.
|
static java.lang.String |
PCTYPE_PUBLIC
PC type constant: public PC.
|
NOT_INITIALIZED| Constructor and Description |
|---|
CmsLoginHelper() |
| Modifier and Type | Method and Description |
|---|---|
protected static javax.servlet.http.Cookie |
getCookie(javax.servlet.http.HttpServletRequest request,
java.lang.String name)
Returns the cookie with the given name, if not cookie is found a new one is created.
|
static java.lang.String |
getCopyrightHtml(java.util.Locale locale)
Gets the copyright information HTML.
|
static java.lang.String |
getDirectEditPath(CmsObject cms,
CmsUserSettings userSettings,
boolean forceDirectEdit)
Returns the direct edit path from the user settings, or
null if not set. |
static CmsLoginHelper.LoginParameters |
getLoginParameters(CmsObject cms,
javax.servlet.http.HttpServletRequest request,
boolean workplaceUiRequest)
Returns the login parameters for the current request.
|
static java.util.List<CmsOrganizationalUnit> |
getOrgUnitsForLoginDialog(CmsObject cms,
java.lang.String predefOu)
Gets the list of OUs which should be selectable in the login dialog.
|
static java.lang.String |
getStartView(CmsObject cms)
Returns the start view.
|
static java.lang.String |
getTitle(java.util.Locale locale)
Gets the window title for a given locale.
|
static CmsWorkplaceSettings |
initSiteAndProject(CmsObject cms)
Initializes the site and project for a CMS context after login, and returns the workplace settings for the corresponding user.
|
protected static void |
setCookie(javax.servlet.http.Cookie cookie,
boolean delete,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Sets the cookie in the response.
|
static void |
setCookieData(java.lang.String pcType,
java.lang.String username,
java.lang.String oufqn,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Sets the cookie data.
|
static CmsMessageContainer |
validateUserAndPasswordNotEmpty(java.lang.String username,
java.lang.String password)
Checks that the user name and password are not empty, and returns an error message if they are.
|
getFormLink, getLoginException, getUser, getUserName, isLoggedIn, isLoginSuccess, login, login, login, logLoginException, logouteditable, editable, editable, editableManualClose, editableManualOpen, getContent, getContent, getMessages, getMessages, getMessages, getMessages, getNavigation, getNavigationUri, img, img, include, include, include, include, include, include, includeSilent, includeSilent, includeSilent, includeSilent, info, label, link, link, properties, properties, property, property, property, property, template, template, template, toAbsolute, usergetCmsObject, getController, getJspContext, getMessage, getRequest, getRequestContext, getResponse, handleException, handleMissingFlexController, init, isNotInitialized, isSupressingExceptions, setContentType, setStatus, setSupressingExceptionspublic static final int ACTION_DISPLAY
public static final int ACTION_LOGIN
public static final int ACTION_LOGOUT
public static final java.lang.String PARAM_ACTION_GETOULIST
public static final java.lang.String PARAM_ACTION_LOGIN
public static final java.lang.String PARAM_ACTION_LOGOUT
public static final java.lang.String PARAM_AUTHTOKEN
public static final java.lang.String PARAM_FORM
public static final java.lang.String PARAM_OUFQN
public static final java.lang.String PARAM_OUSEARCH
public static final java.lang.String PARAM_PASSWORD
public static final java.lang.String PARAM_PCTYPE
public static final java.lang.String PARAM_PREDEF_OUFQN
public static final java.lang.String PARAM_USERNAME
public static final java.lang.String PARAM_RESET_PASSWORD
public static final java.lang.String PARAM_WPDATA
public static final java.lang.String PCTYPE_PRIVATE
public static final java.lang.String PCTYPE_PUBLIC
public CmsLoginHelper()
public static java.lang.String getCopyrightHtml(java.util.Locale locale)
locale - the locale for which to get the copyright infopublic static java.lang.String getDirectEditPath(CmsObject cms, CmsUserSettings userSettings, boolean forceDirectEdit)
null if not set.cms - the CMS context to useuserSettings - the user settingsforceDirectEdit - true to ignore the start viewpublic static CmsLoginHelper.LoginParameters getLoginParameters(CmsObject cms, javax.servlet.http.HttpServletRequest request, boolean workplaceUiRequest)
cms - the cms contextrequest - the requestworkplaceUiRequest - true if this is called from a workplace UI requestpublic static java.util.List<CmsOrganizationalUnit> getOrgUnitsForLoginDialog(CmsObject cms, java.lang.String predefOu)
cms - the CMS context to usepredefOu - the predefined OUpublic static java.lang.String getStartView(CmsObject cms)
cms - the cms contextpublic static java.lang.String getTitle(java.util.Locale locale)
locale - the localepublic static CmsWorkplaceSettings initSiteAndProject(CmsObject cms)
cms - the CMS context which should be initializedpublic static void setCookieData(java.lang.String pcType, java.lang.String username, java.lang.String oufqn, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
pcType - the pctype valueusername - the username valueoufqn - the oufqn valuerequest - the current requestresponse - the current responsepublic static CmsMessageContainer validateUserAndPasswordNotEmpty(java.lang.String username, java.lang.String password)
username - the user namepassword - the passwordprotected static javax.servlet.http.Cookie getCookie(javax.servlet.http.HttpServletRequest request, java.lang.String name)
request - the current requestname - the name of the cookieprotected static void setCookie(javax.servlet.http.Cookie cookie, boolean delete, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
cookie - the cookie to setdelete - flag to determine if the cookir should be deletedrequest - the current requestresponse - the current response