Package lumis.portal.clock
Class ClockConfig
- java.lang.Object
-
- lumis.portal.clock.ClockConfig
-
@StableMinor(version="14.1", sinceVersion="4.0") public class ClockConfig extends Object
A portal clock, which represents an execution that is scheduled to be executed in regular intervals.- Since:
- 4.0.0
- Version:
- $Revision: 24683 $ $Date: 2021-08-23 18:55:58 -0300 (Mon, 23 Aug 2021) $
-
-
Field Summary
Fields Modifier and Type Field Description static String
INTERVAL_DEFINITION_TYPE_DAYS
static String
INTERVAL_DEFINITION_TYPE_HOURS
static String
INTERVAL_DEFINITION_TYPE_MINUTES
static 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(Object obj)
String
getClockClass()
Returns the full class name for this clock implementation.String
getId()
Returns the identifier for this clock.Date
getLastTick()
Returns the date-time this clock has completed its last execution.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.Date
getNextScheduleDate()
Returns the date-time for which this clock is scheduled for its next execution.String
getRunOnlyOnServer()
String
getServiceId()
Returns the identifier of the service this clock belongs to.Date
getStartTime()
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(String clockClass)
Sets the class name for this clock implementation.void
setDefinition(Node definition)
void
setEnabled(boolean enabled)
Enables or disables this clock.void
setId(String id)
Sets the identifier for this clock.void
setLastTick(Date lastTick)
Sets the date-time this clock has completed its last execution.void
setLastTickStart(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(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(String runOnlyOnServer)
void
setServiceId(String serviceId)
Sets the service this clock belongs to.void
setStartTime(Date startTime)
void
setStopTime(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 String INTERVAL_DEFINITION_TYPE_SECONDS
- See Also:
- Constant Field Values
-
INTERVAL_DEFINITION_TYPE_MINUTES
public static final String INTERVAL_DEFINITION_TYPE_MINUTES
- See Also:
- Constant Field Values
-
INTERVAL_DEFINITION_TYPE_HOURS
public static final String INTERVAL_DEFINITION_TYPE_HOURS
- See Also:
- Constant Field Values
-
INTERVAL_DEFINITION_TYPE_DAYS
public static final String INTERVAL_DEFINITION_TYPE_DAYS
- See Also:
- Constant Field Values
-
-
Method Detail
-
getClockClass
public String getClockClass()
Returns the full class name for this clock implementation.- Returns:
- the clock class name.
-
setClockClass
public void setClockClass(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 String getId()
Returns the identifier for this clock.- Returns:
- the identifier for this clock.
-
setId
public void setId(String id)
Sets the identifier for this clock.- Parameters:
id
- the identifier to set.
-
getLastTick
public 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(Date lastTick)
Sets the date-time this clock has completed its last execution.- Parameters:
lastTick
- the date-time.
-
getNextScheduleDate
public Date getNextScheduleDate()
Returns the date-time for which this clock is scheduled for its next execution.- Returns:
- the date-time.
-
setNextScheduleDate
public void setNextScheduleDate(Date nextScheduleDate)
Sets the date-time for which this clock is scheduled for its next execution.- Parameters:
the
- date-time.
-
getRunOnlyOnServer
public String getRunOnlyOnServer()
- Returns:
- Returns the runOnlyOnServer.
-
setRunOnlyOnServer
public void setRunOnlyOnServer(String runOnlyOnServer)
- Parameters:
runOnlyOnServer
- The runOnlyOnServer to set.
-
getServiceId
public 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(String serviceId)
Sets the service this clock belongs to.- Parameters:
serviceId
- the service's identifier.
-
getStartTime
public Date getStartTime()
- Returns:
- Returns the startTime.
-
setStartTime
public void setStartTime(Date startTime)
- Parameters:
startTime
- The startTime to set.
-
getStopTime
public Date getStopTime()
- Returns:
- Returns the stopTime.
-
setStopTime
public void setStopTime(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 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(Date lastTickStart)
Sets the date-time this clock has started its last execution.- Parameters:
lastTickStart
- the date-time value.- Since:
- 4.2.0
-
-