Class ScheduleData


  • public class ScheduleData
    extends Object
    Definition when a schedule should be executed.
    • Constructor Detail

      • ScheduleData

        public ScheduleData()
    • Method Detail

      • getType

        public ScheduleType getType()
        Get the schedule type.
        Returns:
        The schedule type.
      • setType

        public ScheduleData setType​(ScheduleType type)
        Set the schedule type.
        Parameters:
        type - The schedule type.
        Returns:
        fluent API
      • getStartTimestamp

        public int getStartTimestamp()
        Get the start timestamp.
        Returns:
        The start timestamp.
      • setStartTimestamp

        public ScheduleData setStartTimestamp​(int startTimestamp)
        Set the start timestamp.
        Parameters:
        startTimestamp - The start timestamp.
        Returns:
        fluent API
      • getEndTimestamp

        public int getEndTimestamp()
        Get the end timestamp.
        Returns:
        The end timestamp.
      • setEndTimestamp

        public ScheduleData setEndTimestamp​(int endTimestamp)
        Set the end timestamp.
        Parameters:
        endTimestamp - The end timestamp.
        Returns:
        fluent API
      • getInterval

        public ScheduleInterval getInterval()
        Get the interval definition.
        Returns:
        The interval definition.
      • setInterval

        public ScheduleData setInterval​(ScheduleInterval interval)
        Set the interval definition.
        Parameters:
        interval - The interval definition.
        Returns:
        fluent API
      • getFollow

        public ScheduleFollow getFollow()
        Get the followup definition.
        Returns:
        The followup definition.
      • setFollow

        public ScheduleData setFollow​(ScheduleFollow follow)
        Set the followup definition.
        Parameters:
        follow - The followup definition.
        Returns:
        fluent API
      • isValid

        public boolean isValid()
        Check if the schedule data is valid.

        Validation depends on the schedule type:

        • once: the startTimestamp must be greater than zero
        • interval: the #getInterval() interval must be set and be valid
        • followup: the follow up must be set and contain at least one ID
        • manual: always valid

        Returns: