|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opencms.workplace.CmsWorkplace
org.opencms.workplace.tools.CmsToolDialog
org.opencms.workplace.CmsDialog
org.opencms.workplace.CmsLoginUserAgreement
public class CmsLoginUserAgreement
Provides methods to show a configurable user agreement dialog after a successful workplace login.
Field Summary | |
---|---|
static int |
ACTION_ACCEPT
Value for the action: accept the user agreement. |
static String |
DIALOG_TYPE
The dialog type. |
protected static String |
KEY_ACCEPTED_COUNT
JSON key name to store the count of the accepted agreement. |
protected static String |
KEY_ACCEPTED_VERSION
JSON key name to store the version of the accepted agreement. |
protected static String |
NODE_AGREE_COUNT
Node name for the element: AgreeCount. |
protected static String |
NODE_BUTTON_ACCEPT
Node name for the element: ButtonAccept. |
protected static String |
NODE_BUTTON_DECLINE
Node name for the element: ButtonDecline. |
protected static String |
NODE_DIALOG_TITLE
Node name for the element: DialogTitle. |
static String |
NODE_MESSAGE_DECLINED
Node name for the element: MessageDeclined. |
static String |
NODE_TEXT
Node name for the element: Text. |
protected static String |
NODE_VERSION
Node name for the element: Version. |
static String |
PARAM_WPRES
Request parameter name for the originally requested resource. |
protected static String |
VFS_PATH_CONFIGFOLDER
The VFS path to the folder containing the user agreement configuration files. |
Fields inherited from class org.opencms.workplace.tools.CmsToolDialog |
---|
PARAM_BASE, PARAM_FORCE, PARAM_PATH, PARAM_ROOT, PARAM_STYLE, STYLE_NEW |
Constructor Summary | |
---|---|
CmsLoginUserAgreement(CmsJspActionElement jsp)
Public constructor with JSP action element. |
|
CmsLoginUserAgreement(javax.servlet.jsp.PageContext context,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
Public constructor with JSP variables. |
Method Summary | |
---|---|
void |
acceptAgreement()
Stores the information about the accepted user agreement in the current users additional info. |
void |
actionAccept()
Performs the the user agreement accept action, will be called by the JSP page. |
void |
actionDecline()
Performs the user agreement declined action, will be called by the JSP page. |
protected void |
dialogButtonsHtml(StringBuffer result,
int button,
String attribute)
The standard "OK" and "Cancel" buttons are overridden to show other labels. |
String |
dialogScriptSubmit()
The standard JavaScript for submitting the dialog is overridden to show an alert in case that an agreement is declined. |
int |
getAcceptedCount()
Returns the number of times the user accepted the agreement. |
double |
getAcceptedVersion()
Returns the version of the user accepted agreement. |
protected CmsXmlContent |
getConfigurationContent()
Returns the user agreement configuration content. |
String |
getConfigurationContentStringValue(String path)
Returns the content value of the given path as String. |
String |
getConfigurationVfsPath()
Returns the absolute path in the OpenCms VFS to the user agreement configuration file. |
String |
getParamWpres()
Returns the originally requested workplace resource path parameter. |
double |
getRequiredVersion()
Returns the required version of the user accepted agreement. |
protected void |
initWorkplaceRequestValues(CmsWorkplaceSettings settings,
javax.servlet.http.HttpServletRequest request)
Analyzes the request for workplace parameters and adjusts the workplace settings accordingly. |
boolean |
isShowUserAgreement()
Returns if the user agreement page should be shown for the current user. |
void |
setAcceptedCount(int acceptedCount)
Sets the number of times the user accepted the agreement. |
void |
setAcceptedVersion(double acceptedVersion)
Sets the version of the user accepted agreement. |
void |
setParamWpres(String paramWpres)
Sets the originally requested workplace resource path parameter. |
void |
setRequiredVersion(double requiredVersion)
Sets the required version of the user accepted agreement. |
Methods inherited from class org.opencms.workplace.tools.CmsToolDialog |
---|
dialogTitle, getAdminTool, getCurrentToolPath, getParamBase, getParamForce, getParamPath, getParamRoot, getParamStyle, getParentPath, getToolManager, iconsBlockArea, iconsBlockAreaEnd, iconsBlockAreaStart, initAdminTool, pageBody, pageHtmlStyle, setParamBase, setParamForce, setParamPath, setParamRoot, setParamStyle, useNewStyle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int ACTION_ACCEPT
public static final String DIALOG_TYPE
public static final String NODE_MESSAGE_DECLINED
public static final String NODE_TEXT
public static final String PARAM_WPRES
protected static final String KEY_ACCEPTED_COUNT
protected static final String KEY_ACCEPTED_VERSION
protected static final String NODE_AGREE_COUNT
protected static final String NODE_BUTTON_ACCEPT
protected static final String NODE_BUTTON_DECLINE
protected static final String NODE_DIALOG_TITLE
protected static final String NODE_VERSION
protected static final String VFS_PATH_CONFIGFOLDER
Constructor Detail |
---|
public CmsLoginUserAgreement(CmsJspActionElement jsp)
jsp
- an initialized JSP action elementpublic CmsLoginUserAgreement(javax.servlet.jsp.PageContext context, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
context
- the JSP page contextreq
- the JSP requestres
- the JSP responseMethod Detail |
---|
public void acceptAgreement()
public void actionAccept() throws IOException
IOException
- if problems while redirecting occurpublic void actionDecline() throws IOException
IOException
- if problems while redirecting occurpublic String dialogScriptSubmit()
See also CmsDialog.dialogScriptSubmit()
dialogScriptSubmit
in class CmsDialog
public int getAcceptedCount()
public double getAcceptedVersion()
public String getConfigurationContentStringValue(String path)
path
- the path to get the content value for
public String getParamWpres()
public double getRequiredVersion()
public boolean isShowUserAgreement()
true
if the user agreement page should be shown for the current user, otherwise false
public void setAcceptedCount(int acceptedCount)
acceptedCount
- the number of times the user accepted the agreementpublic void setAcceptedVersion(double acceptedVersion)
acceptedVersion
- the version of the user accepted agreementpublic void setParamWpres(String paramWpres)
paramWpres
- the originally requested workplace resource path parameterpublic void setRequiredVersion(double requiredVersion)
requiredVersion
- the required version of the user accepted agreementprotected void dialogButtonsHtml(StringBuffer result, int button, String attribute)
See also CmsDialog.dialogButtonsHtml(StringBuffer, int, String)
dialogButtonsHtml
in class CmsDialog
result
- a string buffer where the rendered HTML gets appended tobutton
- a integer key to identify the buttonattribute
- an optional string with possible tag attributes, or nullprotected CmsXmlContent getConfigurationContent()
public String getConfigurationVfsPath()
protected void initWorkplaceRequestValues(CmsWorkplaceSettings settings, javax.servlet.http.HttpServletRequest request)
CmsWorkplace
initWorkplaceRequestValues
in class CmsDialog
settings
- the workplace settingsrequest
- the current requestCmsWorkplace.initWorkplaceRequestValues(org.opencms.workplace.CmsWorkplaceSettings, javax.servlet.http.HttpServletRequest)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |