Package lumis.portal.clock
Class ClockConfig
- java.lang.Object
-
- lumis.portal.clock.ClockConfig
-
@StableMinor(version="17.0", sinceVersion="4.0") public class ClockConfig extends java.lang.Object
A portal clock, which represents an execution that is scheduled to be executed in regular intervals.- Since:
- 4.0.0
- Version:
- $Revision$ $Date$
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
INTERVAL_DEFINITION_TYPE_DAYS
static java.lang.String
INTERVAL_DEFINITION_TYPE_HOURS
static java.lang.String
INTERVAL_DEFINITION_TYPE_MINUTES
static java.lang.String
INTERVAL_DEFINITION_TYPE_SECONDS
static int
INTERVAL_TYPE_DAYS
static int
INTERVAL_TYPE_HOURS
static int
INTERVAL_TYPE_MINUTES
static int
INTERVAL_TYPE_SECONDS
-
Constructor Summary
Constructors Constructor Description ClockConfig()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
java.lang.String
getClockClass()
Returns the full class name for this clock implementation.java.lang.String
getId()
Returns the identifier for this clock.java.util.Date
getLastTick()
Returns the date-time this clock has completed its last execution.java.util.Date
getLastTickStart()
Returns the date-time this clock has started its last execution.int
getMaxRunTime()
Returns the maximum run time for this clock in seconds.java.util.Date
getNextScheduleDate()
Returns the date-time for which this clock is scheduled for its next execution.java.lang.String
getRunOnlyOnServer()
java.lang.String
getServiceId()
Returns the identifier of the service this clock belongs to.java.util.Date
getStartTime()
java.util.Date
getStopTime()
int
getTickInterval()
int
getTickIntervalType()
int
hashCode()
boolean
isEnabled()
Indicates if this clock is enabled.boolean
isRunning()
Indicates if this clock is currently running.void
setClockClass(java.lang.String clockClass)
Sets the class name for this clock implementation.void
setDefinition(org.w3c.dom.Node definition)
void
setEnabled(boolean enabled)
Enables or disables this clock.void
setId(java.lang.String id)
Sets the identifier for this clock.void
setLastTick(java.util.Date lastTick)
Sets the date-time this clock has completed its last execution.void
setLastTickStart(java.util.Date lastTickStart)
Sets the date-time this clock has started its last execution.void
setMaxRunTime(int maxRunTime)
Sets the maximum run time for a this clock in minutes.void
setNextScheduleDate(java.util.Date nextScheduleDate)
Sets the date-time for which this clock is scheduled for its next execution.void
setRunning(boolean running)
Sets if this clock is currently running.void
setRunOnlyOnServer(java.lang.String runOnlyOnServer)
void
setServiceId(java.lang.String serviceId)
Sets the service this clock belongs to.void
setStartTime(java.util.Date startTime)
void
setStopTime(java.util.Date stopTime)
void
setTickInterval(int tickInterval)
void
setTickIntervalType(int tickIntervalType)
-
-
-
Field Detail
-
INTERVAL_TYPE_SECONDS
public static final int INTERVAL_TYPE_SECONDS
- See Also:
- Constant Field Values
-
INTERVAL_TYPE_MINUTES
public static final int INTERVAL_TYPE_MINUTES
- See Also:
- Constant Field Values
-
INTERVAL_TYPE_HOURS
public static final int INTERVAL_TYPE_HOURS
- See Also:
- Constant Field Values
-
INTERVAL_TYPE_DAYS
public static final int INTERVAL_TYPE_DAYS
- See Also:
- Constant Field Values
-
INTERVAL_DEFINITION_TYPE_SECONDS
public static final java.lang.String INTERVAL_DEFINITION_TYPE_SECONDS
- See Also:
- Constant Field Values
-
INTERVAL_DEFINITION_TYPE_MINUTES
public static final java.lang.String INTERVAL_DEFINITION_TYPE_MINUTES
- See Also:
- Constant Field Values
-
INTERVAL_DEFINITION_TYPE_HOURS
public static final java.lang.String INTERVAL_DEFINITION_TYPE_HOURS
- See Also:
- Constant Field Values
-
INTERVAL_DEFINITION_TYPE_DAYS
public static final java.lang.String INTERVAL_DEFINITION_TYPE_DAYS
- See Also:
- Constant Field Values
-
-
Method Detail
-
setDefinition
public void setDefinition(org.w3c.dom.Node definition) throws java.lang.Exception
- Throws:
java.lang.Exception
-
getClockClass
public java.lang.String getClockClass()
Returns the full class name for this clock implementation.- Returns:
- the clock class name.
-
setClockClass
public void setClockClass(java.lang.String clockClass)
Sets the class name for this clock implementation.- Parameters:
clockClass
- the clock class name.
-
isEnabled
public boolean isEnabled()
Indicates if this clock is enabled.- Returns:
- true if enabled, false otherwise.
-
setEnabled
public void setEnabled(boolean enabled)
Enables or disables this clock.- Parameters:
enabled
- true to enable it, or false to disable it.
-
getId
public java.lang.String getId()
Returns the identifier for this clock.- Returns:
- the identifier for this clock.
-
setId
public void setId(java.lang.String id)
Sets the identifier for this clock.- Parameters:
id
- the identifier to set.
-
getLastTick
public java.util.Date getLastTick()
Returns the date-time this clock has completed its last execution.- Returns:
- the date-time this clock has completed its last execution.
-
setLastTick
public void setLastTick(java.util.Date lastTick)
Sets the date-time this clock has completed its last execution.- Parameters:
lastTick
- the date-time.
-
getNextScheduleDate
public java.util.Date getNextScheduleDate()
Returns the date-time for which this clock is scheduled for its next execution.- Returns:
- the date-time.
-
setNextScheduleDate
public void setNextScheduleDate(java.util.Date nextScheduleDate)
Sets the date-time for which this clock is scheduled for its next execution.- Parameters:
the
- date-time.
-
getRunOnlyOnServer
public java.lang.String getRunOnlyOnServer()
- Returns:
- Returns the runOnlyOnServer.
-
setRunOnlyOnServer
public void setRunOnlyOnServer(java.lang.String runOnlyOnServer)
- Parameters:
runOnlyOnServer
- The runOnlyOnServer to set.
-
getServiceId
public java.lang.String getServiceId()
Returns the identifier of the service this clock belongs to.- Returns:
- the identifier of the service this clock belongs to.
-
setServiceId
public void setServiceId(java.lang.String serviceId)
Sets the service this clock belongs to.- Parameters:
serviceId
- the service's identifier.
-
getStartTime
public java.util.Date getStartTime()
- Returns:
- Returns the startTime.
-
setStartTime
public void setStartTime(java.util.Date startTime)
- Parameters:
startTime
- The startTime to set.
-
getStopTime
public java.util.Date getStopTime()
- Returns:
- Returns the stopTime.
-
setStopTime
public void setStopTime(java.util.Date stopTime)
- Parameters:
stopTime
- The stopTime to set.
-
getTickInterval
public int getTickInterval()
- Returns:
- Returns the tickInterval.
-
setTickInterval
public void setTickInterval(int tickInterval)
- Parameters:
tickInterval
- The tickInterval to set.
-
getTickIntervalType
public int getTickIntervalType()
- Returns:
- Returns the tickIntervalType.
-
setTickIntervalType
public void setTickIntervalType(int tickIntervalType)
- Parameters:
tickIntervalType
- The tickIntervalType to set.
-
getMaxRunTime
public int getMaxRunTime()
Returns the maximum run time for this clock in seconds.- Returns:
- the maximum run time for this clock in seconds.
-
setMaxRunTime
public void setMaxRunTime(int maxRunTime)
Sets the maximum run time for a this clock in minutes.- Parameters:
maxRunTime
- the value in minutes.
-
isRunning
public boolean isRunning()
Indicates if this clock is currently running.- Returns:
- true if it is running, false otherwise.
-
setRunning
public void setRunning(boolean running)
Sets if this clock is currently running.- Parameters:
true
- if it is running, false otherwise.
-
getLastTickStart
public java.util.Date getLastTickStart()
Returns the date-time this clock has started its last execution.- Returns:
- the date-time, or null if this clock has never executed.
- Since:
- 4.2.0
-
setLastTickStart
public void setLastTickStart(java.util.Date lastTickStart)
Sets the date-time this clock has started its last execution.- Parameters:
lastTickStart
- the date-time value.- Since:
- 4.2.0
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-