public class CmsLoginMessage
extends java.lang.Object
限定符和类型 | 字段和说明 |
---|---|
static long |
DEFAULT_TIME_END
The default end time (if none has been set).
|
static long |
DEFAULT_TIME_START
The default start time (if none has been set).
|
构造器和说明 |
---|
CmsLoginMessage()
Creates a new login message with all default values.
|
CmsLoginMessage(long timeStart,
long timeEnd,
java.lang.String message,
boolean loginForbidden)
Creates a new login message with the given parameters.
|
CmsLoginMessage(java.lang.String message,
boolean loginForbidden)
Creates a new login message with the given parameters.
|
限定符和类型 | 方法和说明 |
---|---|
protected void |
checkFrozen()
Checks if this message is frozen.
|
java.lang.Object |
clone() |
java.lang.String |
getMessage()
Returns the message.
|
long |
getTimeEnd()
Returns the time the message ends.
|
long |
getTimeStart()
Returns the time the message starts.
|
boolean |
isActive()
Returns
true if this message is currently active. |
boolean |
isEnabled()
Returns
true if this login message is the enabled. |
boolean |
isLoginCurrentlyForbidden()
Returns
true if logins are currently forbidden according to the settings
of this message. |
boolean |
isLoginForbidden()
Returns
true if logins are forbidden while this message is active. |
void |
setEnabled(boolean enabled)
Sets the enabled status of this message.
|
protected void |
setFrozen()
Freezes the configuration of this login message object to prevent later changes.
|
void |
setLoginForbidden(boolean loginForbidden)
Sets the flag that controls if logins are forbidden while this message is active.
|
void |
setMessage(java.lang.String message)
Sets the message to display.
|
void |
setTimeEnd(long timeEnd)
Sets the time when to finish displaying this message.
|
void |
setTimeStart(long timeStart)
Sets the time when to start displaying this message.
|
public static final long DEFAULT_TIME_END
public static final long DEFAULT_TIME_START
public CmsLoginMessage()
public CmsLoginMessage(long timeStart, long timeEnd, java.lang.String message, boolean loginForbidden)
timeStart
- the time when to start displaying this messagetimeEnd
- the time when to finish displaying this messagemessage
- the message to displayloginForbidden
- controls if logins are forbidden while this message is activepublic CmsLoginMessage(java.lang.String message, boolean loginForbidden)
message
- the message to displayloginForbidden
- controls if logins are forbidden while this message is activepublic java.lang.Object clone()
clone
在类中 java.lang.Object
Object.clone()
public java.lang.String getMessage()
public long getTimeEnd()
public long getTimeStart()
public boolean isActive()
true
if this message is currently active.A message is active if it is enabled and the current time is after the message start time and before the message end time.
true
if this message is currently activepublic boolean isEnabled()
true
if this login message is the enabled.true
if this login message is the enabledpublic boolean isLoginCurrentlyForbidden()
true
if logins are currently forbidden according to the settings
of this message.
This checks the time settings using
and
isActive()
as well as the
isEnabled()
flag.isLoginForbidden()
true
if logins are currently forbidden according to the settings of this messagepublic boolean isLoginForbidden()
true
if logins are forbidden while this message is active.true
if logins are forbidden while this message is activepublic void setEnabled(boolean enabled)
enabled
- the enabled status to setpublic void setLoginForbidden(boolean loginForbidden)
loginForbidden
- the flag to setpublic void setMessage(java.lang.String message)
message
- the message to setpublic void setTimeEnd(long timeEnd)
timeEnd
- the time to setpublic void setTimeStart(long timeStart)
timeStart
- the time to setprotected void checkFrozen() throws CmsRuntimeException
CmsRuntimeException
- in case the message is already frozenprotected void setFrozen()