/** * Sets the flag that controls if logins are forbidden while this message is active.<p> * * @param loginForbidden the flag to set */ public void setLoginForbidden(boolean loginForbidden) { checkFrozen(); m_loginForbidden = loginForbidden; }
/** * Sets the enabled status of this message.<p> * * @param enabled the enabled status to set */ public void setEnabled(boolean enabled) { checkFrozen(); m_enabled = enabled; }
/** * Sets the enabled status of this message.<p> * * @param enabled the enabled status to set */ public void setEnabled(boolean enabled) { checkFrozen(); m_enabled = enabled; }
/** * Sets the flag that controls if logins are forbidden while this message is active.<p> * * @param loginForbidden the flag to set */ public void setLoginForbidden(boolean loginForbidden) { checkFrozen(); m_loginForbidden = loginForbidden; }
/** * Sets the time when to start displaying this message.<p> * * @param timeStart the time to set */ public void setTimeStart(long timeStart) { checkFrozen(); if (timeStart < 0) { throw new CmsIllegalArgumentException( Messages.get().container(Messages.ERR_LOGIN_MESSAGE_BAD_TIME_1, new Long(timeStart))); } if (timeStart == 0) { timeStart = DEFAULT_TIME_START; } m_timeStart = timeStart; }
/** * Sets the time when to start displaying this message.<p> * * @param timeStart the time to set */ public void setTimeStart(long timeStart) { checkFrozen(); if (timeStart < 0) { throw new CmsIllegalArgumentException(Messages.get().container( Messages.ERR_LOGIN_MESSAGE_BAD_TIME_1, new Long(timeStart))); } if (timeStart == 0) { timeStart = DEFAULT_TIME_START; } m_timeStart = timeStart; }
/** * Sets the time when to finish displaying this message.<p> * * @param timeEnd the time to set */ public void setTimeEnd(long timeEnd) { checkFrozen(); if (timeEnd < 0) { throw new CmsIllegalArgumentException( Messages.get().container(Messages.ERR_LOGIN_MESSAGE_BAD_TIME_1, new Long(timeEnd))); } if (timeEnd == 0) { timeEnd = DEFAULT_TIME_END; } if ((m_timeStart > 0) && (timeEnd <= m_timeStart)) { throw new CmsIllegalArgumentException(Messages.get().container(Messages.ERR_LOGIN_MESSAGE_BAD_END_TIME_0)); } m_timeEnd = timeEnd; }
/** * Sets the message to display.<p> * * @param message the message to set */ public void setMessage(String message) { checkFrozen(); if (isEnabled() && CmsStringUtil.isEmptyOrWhitespaceOnly(message)) { throw new CmsIllegalArgumentException(Messages.get().container(Messages.ERR_LOGIN_MESSAGE_BAD_MESSAGE_0)); } m_message = message; }
/** * Sets the time when to finish displaying this message.<p> * * @param timeEnd the time to set */ public void setTimeEnd(long timeEnd) { checkFrozen(); if (timeEnd < 0) { throw new CmsIllegalArgumentException(Messages.get().container( Messages.ERR_LOGIN_MESSAGE_BAD_TIME_1, new Long(timeEnd))); } if (timeEnd == 0) { timeEnd = DEFAULT_TIME_END; } if ((m_timeStart > 0) && (timeEnd <= m_timeStart)) { throw new CmsIllegalArgumentException(Messages.get().container(Messages.ERR_LOGIN_MESSAGE_BAD_END_TIME_0)); } m_timeEnd = timeEnd; }
/** * Sets the message to display.<p> * * @param message the message to set */ public void setMessage(String message) { checkFrozen(); if (isEnabled() && CmsStringUtil.isEmptyOrWhitespaceOnly(message)) { throw new CmsIllegalArgumentException(Messages.get().container(Messages.ERR_LOGIN_MESSAGE_BAD_MESSAGE_0)); } m_message = message; }