|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opencms.db.CmsLoginMessage
public class CmsLoginMessage
A message to display when a user logs in to the system.
Field Summary | |
---|---|
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). |
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final long DEFAULT_TIME_END
public static final long DEFAULT_TIME_START
Constructor Detail |
---|
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 activeMethod Detail |
---|
public java.lang.Object clone()
clone
in class 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()
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |