Class ClockConfig


  • @StableMinor(version="16.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: 25808 $ $Date: 2023-07-04 15:20:55 -0300 (Tue, 04 Jul 2023) $
    • Field Detail

      • 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
    • Constructor Detail

      • ClockConfig

        public ClockConfig()
    • 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 class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object