Class CmsLoginUserAgreement

    • Constructor Detail

      • CmsLoginUserAgreement

        public CmsLoginUserAgreement​(javax.servlet.jsp.PageContext context,
                                     javax.servlet.http.HttpServletRequest req,
                                     javax.servlet.http.HttpServletResponse res)
        Public constructor with JSP variables.

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

      • acceptAgreement

        public void acceptAgreement()
        Stores the information about the accepted user agreement in the current users additional info.

      • actionAccept

        public void actionAccept()
                          throws java.io.IOException
        Performs the the user agreement accept action, will be called by the JSP page.

        Throws:
        java.io.IOException - if problems while redirecting occur
      • actionDecline

        public void actionDecline()
                           throws java.io.IOException
        Performs the user agreement declined action, will be called by the JSP page.

        Throws:
        java.io.IOException - if problems while redirecting occur
      • getAcceptedCount

        public int getAcceptedCount()
        Returns the number of times the user accepted the agreement.

        Returns:
        the number of times the user accepted the agreement
      • getAcceptedVersion

        public double getAcceptedVersion()
        Returns the version of the user accepted agreement.

        Returns:
        the version of the user accepted agreement
      • getConfigurationContentStringValue

        public java.lang.String getConfigurationContentStringValue​(java.lang.String path)
        Returns the content value of the given path as String.

        Parameters:
        path - the path to get the content value for
        Returns:
        the content value of the given path as String
      • getConfigurationVfsPath

        public java.lang.String getConfigurationVfsPath()
        Returns the absolute path in the OpenCms VFS to the user agreement configuration file.

        Returns:
        the absolute path in the OpenCms VFS to the user agreement configuration file
      • getParamWpres

        public java.lang.String getParamWpres()
        Returns the originally requested workplace resource path parameter.

        Returns:
        the originally requested workplace resource path parameter
      • getRequiredVersion

        public double getRequiredVersion()
        Returns the required version of the user accepted agreement.

        Returns:
        the required version of the user accepted agreement
      • isShowUserAgreement

        public boolean isShowUserAgreement()
        Returns if the user agreement page should be shown for the current user.

        Returns:
        true if the user agreement page should be shown for the current user, otherwise false
      • setAcceptedCount

        public void setAcceptedCount​(int acceptedCount)
        Sets the number of times the user accepted the agreement.

        Parameters:
        acceptedCount - the number of times the user accepted the agreement
      • setAcceptedVersion

        public void setAcceptedVersion​(double acceptedVersion)
        Sets the version of the user accepted agreement.

        Parameters:
        acceptedVersion - the version of the user accepted agreement
      • setParamWpres

        public void setParamWpres​(java.lang.String paramWpres)
        Sets the originally requested workplace resource path parameter.

        Parameters:
        paramWpres - the originally requested workplace resource path parameter
      • setRequiredVersion

        public void setRequiredVersion​(double requiredVersion)
        Sets the required version of the user accepted agreement.

        Parameters:
        requiredVersion - the required version of the user accepted agreement
      • dialogButtonsHtml

        protected void dialogButtonsHtml​(java.lang.StringBuffer result,
                                         int button,
                                         java.lang.String attribute)
        The standard "OK" and "Cancel" buttons are overridden to show other labels.

        See also CmsDialog.dialogButtonsHtml(StringBuffer, int, String)

        Overrides:
        dialogButtonsHtml in class CmsDialog
        Parameters:
        result - a string buffer where the rendered HTML gets appended to
        button - a integer key to identify the button
        attribute - an optional string with possible tag attributes, or null
      • initAcceptData

        protected void initAcceptData()
        Initializes the 'accepted' data from the current user.

        Returns the absolute path in the OpenCms VFS to the user agreement configuration file.