Adds the before login message from the configuration.<p>

@param message the login message to add
504600
public void setBeforeLoginMessage(CmsLoginMessage message) {

        m_beforeLoginMessage = message;
        if (CmsLog.INIT.isInfoEnabled()) {
            CmsLog.INIT.info(
                Messages.get().getBundle().key(
                    Messages.INIT_LOGINMESSAGE_3,
                    Boolean.valueOf(message.isEnabled()),
                    Boolean.valueOf(message.isLoginForbidden()),
                    message.getMessage()));
        }
    }
1203683
void logInfo(final String message) {
      if(logger != null) {
         try {
            StringBuilder buf = new StringBuilder(name);
            buf.append(": ");
            buf.append(message);
            logger.info(buf.toString());            
         } catch(Throwable t) {
            //Ignore - logging should not kill anything
         }
      }
   }
1063636
@Override
    public void info(String message) {
        if(this.logger.isInfoEnabled()) {
            this.logger.info(buildMessage(message));
        }
    }
1193215
public void init(BaseMessage message, Object objRawMessage)
    {
        m_message = message;
        if (message != null)
            message.setExternalMessage(this);
        if (objRawMessage != null)
            this.setRawData(objRawMessage);
    }
1231284
@Override
    public void warning(String message) {
        if(this.logger.isWarnEnabled()) {
            this.logger.warn(buildMessage(message));
        }
    }
928671
@Override public void addWarning(String message) {
		ast.printMessage(Diagnostic.Kind.WARNING, message, this, null, false);
	}
422800
public void checkLoginAllowed() throws CmsAuthentificationException {

        if ((m_loginMessage != null) && (m_loginMessage.isLoginCurrentlyForbidden())) {
            // login message has been set and is active
            throw new CmsAuthentificationException(
                Messages.get().container(Messages.ERR_LOGIN_FAILED_WITH_MESSAGE_1, m_loginMessage.getMessage()));
        }
    }
1365228
protected void info(String message) {
		final Log log = getLog();
		if (log != null)
			log.info(message);
	}
1089775
protected final void beforeDelivery(MessageEndpoint endpoint) {

        if (TRACE.isEntryEnabled()) {
            final String methodName = "beforeDelivery";
            SibTr.entry(this, TRACE, methodName, endpoint);
            SibTr.exit(this, TRACE, methodName);
        }

    }
199201
protected void addMessage(String message)
    {
        messages.add(message);
        messageCount++;
        if (messageCount > messagesQueueMax)
        {
            messages.remove();
            messageCount--;
        }
    }
835485
public BasicSebConfiguration addSystemPropertiesBefore(String beforeKey) {
		return (BasicSebConfiguration) addPropertiesBefore(beforeKey, SYSTEM_PROPERTIES_KEY, System.getProperties());
	}
874192
protected void submit() {

        CmsLoginMessage loginMessage = new CmsLoginMessage();
        CmsLoginMessage beforeLoginMessage = new CmsLoginMessage();
        try {
            m_formBinderAfter.writeBean(loginMessage);
            m_formBinderBefore.writeBean(beforeLoginMessage);
            OpenCms.getLoginManager().setLoginMessage(A_CmsUI.getCmsObject(), loginMessage);
            OpenCms.getLoginManager().setBeforeLoginMessage(A_CmsUI.getCmsObject(), beforeLoginMessage);
            // update the system configuration
            OpenCms.writeConfiguration(CmsVariablesConfiguration.class);
        } catch (Exception e) {
            LOG.error("Unable to save Login Message", e);
        }
    }
218737
public ConditionMessage append(String message) {
		if (!StringUtils.hasLength(message)) {
			return this;
		}
		if (!StringUtils.hasLength(this.message)) {
			return new ConditionMessage(message);
		}

		return new ConditionMessage(this.message + " " + message);
	}
615894
protected void appendDefaultLoginScript(StringBuffer html, CmsMessageContainer message) {

        html.append("<script type=\"text/javascript\" src=\"");
        html.append(CmsWorkplace.getSkinUri()).append("jquery/packed/jquery.js");
        html.append("\"></script>\n");
        html.append("<script type=\"text/javascript\">\n");
        if (message != null) {
            html.append("function showAlert() {\n");
            html.append("\talert(\"");
            html.append(CmsStringUtil.escapeJavaScript(message.key(m_locale)));
            html.append("\");\n");
            html.append("}\n");
        }
        html.append("var orgUnitShow = false;\n");
        html.append("var orgUnits = null;\n");
        html.append("var activeOu = -1;\n");
        html.append("var searchTimeout;\n");
        html.append("var searchDefaultValue = \"");
        html.append(Messages.get().getBundle(m_locale).key(Messages.GUI_LOGIN_ORGUNIT_SEARCH_0));
        html.append("\";\n");

        // triggers the options to select the OU to login to
        html.append("function orgUnitSelection() {\n");
        html.append("\tif (!orgUnitShow) {\n");
        html.append("\t\tif (orgUnits == null) {\n");
        html.append("\t\t\t$.post(\"");
        html.append(getFormLink());
        html.append("\", { ");
        html.append(PARAM_ACTION_GETOULIST);
        html.append(": \"true\" }");
        html.append(", function(data){ fillOrgUnits(data); });\n");
        html.append("\t\t}\n");
        html.append("\t\tdocument.getElementById('ouSelId').style.display = 'block';\n");
        html.append("\t\tdocument.getElementById('ouLabelId').style.display = 'block';\n");
        html.append("\t\tdocument.getElementById('ouSearchId').style.display = 'block';\n");
        html.append("\t\tdocument.getElementById('ouBtnId').value = '");
        html.append(Messages.get().getBundle(m_locale).key(Messages.GUI_LOGIN_ORGUNIT_SELECT_OFF_0));
        html.append("';\n");
        html.append("\t} else {\n");
        html.append("\t\tdocument.getElementById('ouSelId').style.display = 'none';\n");
        html.append("\t\tdocument.getElementById('ouLabelId').style.display = 'none';\n");
        html.append("\t\tdocument.getElementById('ouSearchId').style.display = 'none';\n");
        html.append("\t\tdocument.getElementById('ouBtnId').value = '");
        html.append(Messages.get().getBundle(m_locale).key(Messages.GUI_LOGIN_ORGUNIT_SELECT_ON_0));
        html.append("';\n");
        html.append("\t}\n");
        html.append("\torgUnitShow = !orgUnitShow;\n");
        html.append("\tdocument.getElementById('titleId').style.display = 'block';\n");
        html.append("\tdocument.getElementById('titleIdOu').style.display = 'none';\n");
        html.append("}\n");

        // creates the HTML for the OUs to login to
        html.append("function fillOrgUnits(data) {\n");
        html.append("\torgUnits = eval(data);\n");
        html.append("\tvar html = \"\";\n");
        html.append("\tvar foundOu = false;\n");
        html.append("\tvar activeIndex = -1;\n");
        html.append("\tfor (var i = 0; i < orgUnits.length; i++) {\n");
        html.append("\t\tvar currOu = orgUnits[i];\n");
        html.append("\t\tvar actClass = \"\";\n");
        html.append("\t\tif (currOu.active == true) {\n");
        html.append("\t\t\t// this is the active OU\n");
        html.append("\t\t\tactiveOu = currOu.index;\n");
        html.append("\t\t\tactClass = \" class=\\\"active\\\"\";\n");
        html.append("\t\t}\n");
        html.append("\t\tvar actStyle = \"\";\n");
        html.append("\t\tif (currOu.level > 0) {\n");
        html.append("\t\t\tactStyle = \" style=\\\"margin-left: \" + (currOu.level * 20) + \"px;\\\"\";\n");
        html.append("\t\t}\n");
        html.append("\t\thtml += \"<div\";\n");
        html.append("\t\thtml += actClass;\n");
        html.append("\t\thtml += actStyle;\n");
        html.append("\t\thtml += \" id=\\\"ou\" + currOu.index;\n");
        html.append("\t\thtml += \"\\\" onclick=\\\"selectOu('\";\n");
        html.append("\t\thtml += currOu.name;\n");
        html.append("\t\thtml += \"', \" + currOu.index;\n");
        html.append("\t\thtml += \");\\\"><span class=\\\"name\\\">\";\n");
        html.append("\t\thtml += currOu.description;\n");
        html.append("\t\thtml += \"</span>\";\n");
        html.append("\t\tif (currOu.name != \"\") {\n");
        html.append("\t\t\thtml += \"<span class=\\\"path\\\"\";\n");
        html.append("\t\t\thtml += \" title=\\\"\";\n");
        html.append("\t\t\thtml += currOu.name;\n");
        html.append("\t\t\thtml += \"\\\">\";\n");
        html.append("\t\t\thtml += currOu.simplename;\n");
        html.append("\t\t\thtml += \"</span>\";\n");
        html.append("\t\t}\n");
        html.append("\t\thtml += \"</div>\";\n");
        html.append("\t}\n");
        html.append(
            "\thtml += \"<div id=\\\"nooufound\\\" style=\\\"display: none;\\\"><span class=\\\"name\\\">\";\n");
        html.append("\thtml += \"");
        html.append(Messages.get().getBundle(m_locale).key(Messages.GUI_LOGIN_ORGUNIT_SEARCH_NORESULTS_0));
        html.append("\";\n");
        html.append("\thtml += \"</span></div>\";\n");
        html.append("\t$(\"#ouSelId\").append(html);\n");
        html.append("\t$(\"#ouSelId\").slideDown();\n");
        html.append("\tscrollToActiveOu();\n");
        html.append("}\n");

        // shows the list of OUs matching the search term or all OUs if the search term is empty
        html.append("function showOrgUnits(searchTerm) {\n");
        html.append("\tvar html = \"\";\n");
        html.append("\tvar foundOu = false;\n");
        html.append("\tfor (var i = 0; i < orgUnits.length; i++) {\n");
        html.append("\t\tvar currOu = orgUnits[i];\n");
        html.append("\t\tif (searchTerm != \"\") {\n");
        html.append("\t\t\tvar stLower = searchTerm.toLowerCase();\n");
        html.append(
            "\t\t\tif (currOu.name.toLowerCase().indexOf(stLower )== -1 && currOu.description.toLowerCase().indexOf(stLower) == -1) {\n");
        html.append("\t\t\t\t$(\"#ou\" + i + \":visible\").slideUp();\n");
        html.append("\t\t\t} else {\n");
        html.append("\t\t\t\t$(\"#ou\" + i + \":hidden\").slideDown();\n");
        html.append("\t\t\t\t$(\"#ou\" + i).removeAttr(\"style\");\n");
        html.append("\t\t\t\tfoundOu = true;\n");
        html.append("\t\t\t}\n");
        html.append("\t\t} else {\n");
        html.append("\t\t\tfoundOu = true;\n");
        html.append("\t\t\tvar actStyle = \"\";\n");
        html.append("\t\t\tif (currOu.level > 0) {\n");
        html.append("\t\t\t\tactStyle = \"margin-left: \" + (currOu.level * 20) + \"px;\";\n");
        html.append("\t\t\t}\n");
        html.append("\t\t\t$(\"#ou\" + i).attr(\"style\", actStyle);\n");
        html.append("\t\t\t$(\"#ou\" + i + \":hidden\").slideDown();\n");
        html.append("\t\t}\n");
        html.append("\t}\n");
        html.append("\tif (searchTerm != \"\" && foundOu == false) {\n");
        html.append("\t\t$(\"#nooufound:hidden\").slideDown();\n");
        html.append("\t} else {\n");
        html.append("\t\t$(\"#nooufound:visible\").slideUp();\n");
        html.append("\t}\n");
        html.append("\tif (searchTerm == \"\") {\n");
        html.append("\t\tscrollToActiveOu();\n");
        html.append("\t}\n");
        html.append("}\n");

        // selects the OU to login to
        html.append("function selectOu(ouPath, ouIndex) {\n");
        html.append("\tif (ouIndex != -1 && ouIndex != activeOu) {\n");
        html.append("\t\t$(\"#ou\" + ouIndex).addClass(\"active\");\n");
        html.append("\t\torgUnits[ouIndex].active = true;\n");
        html.append("\t\t$(\"#");
        html.append(PARAM_OUFQN);
        html.append("\").val(ouPath);\n");
        html.append("\t\tif (activeOu != -1) {\n");
        html.append("\t\t\torgUnits[activeOu].active = false;\n");
        html.append("\t\t\t$(\"#ou\" + activeOu).removeClass();\n");
        html.append("\t\t}\n");
        html.append("\t\tactiveOu = ouIndex;\n");
        html.append("\t}\n");
        html.append("}\n");

        // filters the OUs by the provided search term using a timeout, called by the onkeyup event of the search input field
        html.append("function searchOu() {\n");
        html.append("\tvar searchElem = $(\"#");
        html.append(PARAM_OUSEARCH);
        html.append("\");\n");
        html.append("\tvar searchTerm = searchElem.val();\n");
        html.append("\tif (searchTerm == searchDefaultValue) {");
        html.append("\t\tsearchTerm = \"\";");
        html.append("\t}");
        html.append("\tclearTimeout(searchTimeout);\n");
        html.append("\tsearchTimeout = setTimeout(\"showOrgUnits(\\\"\" + trim(searchTerm) + \"\\\");\", 750);\n");
        html.append("}\n");

        // sets the value of the OU search input field, called by the onfocus and onblur event of the field
        html.append("function checkOuValue() {\n");
        html.append("\tvar searchElem = $(\"#");
        html.append(PARAM_OUSEARCH);
        html.append("\");\n");
        html.append("\tif (searchElem.val() == searchDefaultValue) {");
        html.append("\t\tsearchElem.val(\"\");");
        html.append("\t\tsearchElem.removeAttr(\"class\");");
        html.append("\t} else if (searchElem.val() == \"\") {");
        html.append("\t\tsearchElem.val(searchDefaultValue);");
        html.append("\t\tsearchElem.attr(\"class\", \"inactive\");");
        html.append("\t}");
        html.append("}\n");

        // scrolls to the currently selected OU if it is out of visible range
        html.append("function scrollToActiveOu() {\n");
        html.append("\tif (activeOu != -1) {\n");
        html.append("\t\tvar activeOffset = $(\"#ou\" + activeOu).offset().top;\n");
        html.append("\t\tvar parentOffset = $(\"#ouSelId\").offset().top;\n");
        html.append("\t\tactiveOffset = activeOffset - parentOffset;\n");
        html.append("\t\tif (activeOffset > $(\"#ouSelId\").height()) {;\n");
        html.append("\t\t\t$(\"#ouSelId\").animate({scrollTop: activeOffset}, 500);\n");
        html.append("\t\t};\n");
        html.append("\t}\n");
        html.append("}\n");

        // function to check IE version, in case of a version < IE8 login will be disabled and an error message shown.
        html.append("function checkBrowser(){\n ");
        html.append("var div = document.createElement(\"div\");\n");
        html.append("div.innerHTML = \"<!--[if lt IE 8]><i></i><![endif]-->\";\n");
        html.append("var isIeLessThan8 = (div.getElementsByTagName(\"i\").length == 1);\n");
        html.append("if (isIeLessThan8) {\n  $('#");
        html.append(PARAM_FORM);
        html.append(
            "').after('<div style=\"color: #B31B34; font-weight: bold; font-size: 14px; margin: 20px; text-align: center;\">");
        html.append(Messages.get().getBundle(m_locale).key(Messages.GUI_LOGIN_UNSUPPORTED_BROWSER_0));
        html.append("</div>');\n $('#");
        html.append(PARAM_FORM);
        html.append(
            "').css(\"display\",\"none\"); /** $('input').attr('disabled', 'disabled');\n  alert('wrong browser'); */\n}\n}\n");

        // called when the login form page is loaded
        html.append("function doOnload() {\n checkBrowser();\n");
        html.append("\tdocument.");
        html.append(PARAM_FORM);
        html.append(".");
        html.append(PARAM_USERNAME);
        html.append(".select();\n");
        html.append("\tdocument.");
        html.append(PARAM_FORM);
        html.append(".");
        html.append(PARAM_USERNAME);
        html.append(".focus();\n");
        if (message != null) {
            html.append("\tshowAlert();\n");
        }
        html.append("}\n");

        // helper function to trim a given string
        html.append("function trim (myStr) {\n");
        html.append("\treturn myStr.replace(/^\\s+/, '').replace (/\\s+$/, '');\n");
        html.append("}\n");

        html.append("</script>\n");
    }
357613
public void addError(I_CmsXmlContentValue value, String message) {

        m_hasErrors = true;
        Locale locale = value.getLocale();
        Map<String, String> localeErrors = getLocalIssueMap(m_errors, locale);
        localeErrors.put(value.getPath(), message);

        if (LOG.isDebugEnabled()) {
            LOG.debug(
                Messages.get().getBundle().key(Messages.LOG_XMLCONTENT_VALIDATION_ERR_2, value.getPath(), message));
        }
    }
279971
@Override
	public void processMessage( Message message ) {

		if( message instanceof MsgNotifMachineDown )
			processMsgNotifMachineDown((MsgNotifMachineDown) message );

		else if( message instanceof MsgNotifInstanceChanged )
			processMsgNotifInstanceChanged((MsgNotifInstanceChanged) message );

		else if( message instanceof MsgNotifInstanceRemoved )
			processMsgNotifInstanceRemoved((MsgNotifInstanceRemoved) message );

		else if( message instanceof MsgNotifHeartbeat )
			processMsgNotifHeartbeat((MsgNotifHeartbeat) message );

		else if(message instanceof MsgNotifAutonomic)
			processMsgMonitoringEvent((MsgNotifAutonomic) message );

		else if( message instanceof MsgEcho )
			this.manager.debugMngr().notifyMsgEchoReceived((MsgEcho) message );

		else if( message instanceof MsgNotifLogs )
			processMsgNotifLogs((MsgNotifLogs) message );

		else
			this.logger.warning( "The DM got an undetermined message to process: " + message.getClass().getName());
	}
64006
protected void initLoginMessageObject() {

        Object o = getDialogObject();

        if ((o == null) || !(o instanceof CmsLoginMessage)) {
            o = OpenCms.getLoginManager().getLoginMessage();
        }

        if (o != null) {
            m_loginMessage = (CmsLoginMessage)((CmsLoginMessage)o).clone();
        } else {
            m_loginMessage = new CmsLoginMessage();
        }
    }