org.opencms.workplace
Class CmsLogin

java.lang.Object
  extended byorg.opencms.jsp.CmsJspBean
      extended byorg.opencms.jsp.CmsJspActionElement
          extended byorg.opencms.jsp.CmsJspLoginBean
              extended byorg.opencms.workplace.CmsLogin

public class CmsLogin
extends CmsJspLoginBean

Handles the login of Users to the OpenCms workplace.

Since:
6.0.0
Version:
$Revision: 1.24 $
Author:
Alexander Kandzior

Field Summary
 
Fields inherited from class org.opencms.jsp.CmsJspActionElement
NOT_INITIALIZED
 
Constructor Summary
CmsLogin(javax.servlet.jsp.PageContext context, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          Public constructor for login page.
 
Method Summary
protected  void appendDefaultLoginScript(java.lang.StringBuffer html, CmsMessageContainer message)
          Appends the JavaScript for the login screen to the given HTML buffer.
protected  void appendWorkplaceOpenerScript(java.lang.StringBuffer html, java.lang.String requestedResource, CmsMessageContainer message)
          Appends the JavaScript that opens the Workplace window after a successful login to the given HTML buffer.
 java.lang.String displayDialog()
          Returns the HTML for the login dialog in it's current state.
protected  java.lang.String displayLoginForm()
          Returns the HTML for the login form.
 
Methods inherited from class org.opencms.jsp.CmsJspLoginBean
getFormLink, getLoginException, getUser, getUserName, isLoggedIn, isLoginSuccess, login, login, login, logout
 
Methods inherited from class org.opencms.jsp.CmsJspActionElement
editable, editable, getContent, getContent, getMessages, getMessages, getMessages, getMessages, getNavigation, img, img, include, include, include, include, include, includeSilent, includeSilent, includeSilent, includeSilent, info, label, link, properties, properties, property, property, property, property, template, template, template, toAbsolute, user
 
Methods inherited from class org.opencms.jsp.CmsJspBean
getCmsObject, getController, getJspContext, getMessage, getRequest, getRequestContext, getResponse, handleException, init, isNotInitialized, isSupressingExceptions, setContentType, setStatus, setSupressingExceptions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CmsLogin

public CmsLogin(javax.servlet.jsp.PageContext context,
                javax.servlet.http.HttpServletRequest req,
                javax.servlet.http.HttpServletResponse res)
Public constructor for login page.

Parameters:
context - the JSP page context object
req - the JSP request
res - the JSP response
Method Detail

displayDialog

public java.lang.String displayDialog()
                               throws java.io.IOException
Returns the HTML for the login dialog in it's current state.

Returns:
the HTML for the login dialog
Throws:
java.io.IOException - in case a redirect fails

appendDefaultLoginScript

protected void appendDefaultLoginScript(java.lang.StringBuffer html,
                                        CmsMessageContainer message)
Appends the JavaScript for the login screen to the given HTML buffer.

Parameters:
html - the html buffer to append the script to
message - the message to display after an unsuccessful login

appendWorkplaceOpenerScript

protected void appendWorkplaceOpenerScript(java.lang.StringBuffer html,
                                           java.lang.String requestedResource,
                                           CmsMessageContainer message)
Appends the JavaScript that opens the Workplace window after a successful login to the given HTML buffer.

Parameters:
html - the html buffer to append the script to
requestedResource - the requested resource to open in a new window
message - the message to display if the originally requested resource is not available

displayLoginForm

protected java.lang.String displayLoginForm()
Returns the HTML for the login form.

Returns:
the HTML for the login form