java.lang.Object
dev.jcputney.elearning.parser.input.scorm2004.ims.ss.sequencing.LimitConditions
All Implemented Interfaces:
Serializable

public final class LimitConditions extends Object implements Serializable
Represents the limit conditions for a learning activity within the SCORM IMS Simple Sequencing (IMSSS) schema. Limit conditions define constraints on the learner's interaction with an activity, such as the maximum number of attempts, time limits for activity completion, and specific duration constraints.

These limit conditions are used to control the availability and accessibility of a learning activity based on the time spent, the number of attempts made, and specified start and end times for access. They are a key component in defining how learners can progress through SCORM content, especially for time-sensitive or attempt-limited activities.

Common use cases include:

  • Setting an attempt limit to restrict the number of times the user can access an activity.
  • Applying time limits to control the duration of an activity attempt.
  • Defining start and end times to establish an available time window for an activity.

The IMSSS namespace is specified by IMSSS.NAMESPACE_URI, and this class aligns with SCORM 2004 standards for sequencing and navigation.

See Also:
  • Constructor Details

    • LimitConditions

      public LimitConditions(Integer attemptLimit, Duration attemptAbsoluteDurationLimit, Duration attemptExperiencedDurationLimit, Duration activityAbsoluteDurationLimit, Duration activityExperiencedDurationLimit, Instant beginTimeLimit, Instant endTimeLimit)
      Constructs a LimitConditions object with the specified constraints and duration limits.
      Parameters:
      attemptLimit - the maximum number of attempts allowed, or null to indicate no limit
      attemptAbsoluteDurationLimit - the absolute duration limit for an attempt as a Duration, or null if not set
      attemptExperiencedDurationLimit - the experienced duration limit for an attempt as a Duration, or null if not set
      activityAbsoluteDurationLimit - the absolute duration limit for the activity as a Duration, or null if not set
      activityExperiencedDurationLimit - the experienced duration limit for the activity as a Duration, or null if not set
      beginTimeLimit - the start time limit as an Instant, or null to indicate no limit
      endTimeLimit - the end time limit as an Instant, or null to indicate no limit
    • LimitConditions

      public LimitConditions()
      Default constructor for the LimitConditions class.

      Creates an instance of LimitConditions with no predefined constraints or duration limits. This constructor initializes the object without setting any specific values for the associated fields.

  • Method Details

    • getAttemptLimit

      public Integer getAttemptLimit()
      Retrieves the maximum number of attempts allowed.
      Returns:
      the maximum number of attempts as an Integer, or null if not set.
    • setAttemptLimit

      public void setAttemptLimit(Integer attemptLimit)
      Sets the maximum number of attempts allowed.
      Parameters:
      attemptLimit - the maximum number of attempts as an Integer, or null to indicate no limit.
    • getAttemptAbsoluteDurationLimit

      public Duration getAttemptAbsoluteDurationLimit()
      Retrieves the absolute duration limit for an attempt.
      Returns:
      the absolute duration limit for an attempt as a Duration, or null if not set.
    • setAttemptAbsoluteDurationLimit

      public void setAttemptAbsoluteDurationLimit(Duration attemptAbsoluteDurationLimit)
      Sets the absolute duration limit for a single attempt in the activity or process.
      Parameters:
      attemptAbsoluteDurationLimit - the absolute duration limit for an attempt as a Duration, or null to indicate no limit is set.
    • getAttemptExperiencedDurationLimit

      public Duration getAttemptExperiencedDurationLimit()
      Retrieves the experienced duration limit for an attempt. This represents the maximum time allowed for an attempt that has been experienced or in progress.
      Returns:
      the experienced duration limit of an attempt as a Duration, or null if not set.
    • setAttemptExperiencedDurationLimit

      public void setAttemptExperiencedDurationLimit(Duration attemptExperiencedDurationLimit)
      Sets the experienced duration limit for an attempt. This represents the maximum time the attempt can actively be worked on, as perceived by the user, before being considered over the limit.
      Parameters:
      attemptExperiencedDurationLimit - the experienced duration limit for an attempt as a Duration, or null to indicate that no such limit is set.
    • getActivityAbsoluteDurationLimit

      public Duration getActivityAbsoluteDurationLimit()
      Retrieves the absolute duration limit for the activity. This duration represents the maximum amount of time that the activity can remain active before exceeding the defined limit.
      Returns:
      the absolute duration limit for the activity as a Duration, or null if no limit is set.
    • setActivityAbsoluteDurationLimit

      public void setActivityAbsoluteDurationLimit(Duration activityAbsoluteDurationLimit)
      Sets the absolute duration limit for the activity. This duration represents the maximum amount of time that the activity can remain active before exceeding the defined limit.
      Parameters:
      activityAbsoluteDurationLimit - the absolute duration limit for the activity as a Duration, or null to indicate no limit is set.
    • getActivityExperiencedDurationLimit

      public Duration getActivityExperiencedDurationLimit()
      Retrieves the experienced duration limit for the activity. This duration represents the maximum allowable active time for the activity, as perceived by the user, before it exceeds the defined limit.
      Returns:
      the experienced duration limit for the activity as a Duration, or null if no limit is set.
    • setActivityExperiencedDurationLimit

      public void setActivityExperiencedDurationLimit(Duration activityExperiencedDurationLimit)
      Sets the experienced duration limit for the activity. This represents the maximum allowable active time for the activity, as perceived by the user, before it exceeds the defined limit.
      Parameters:
      activityExperiencedDurationLimit - the experienced duration limit for the activity as a Duration, or null to indicate no such limit is set.
    • getBeginTimeLimit

      public Instant getBeginTimeLimit()
      Retrieves the starting time limit for an activity or process.
      Returns:
      the begin time limit as an Instant, or null if no limit is set.
    • setBeginTimeLimit

      public void setBeginTimeLimit(Instant beginTimeLimit)
      Sets the starting time limit for an activity or process. This specifies the earliest point in time when the activity or process is allowed to begin.
      Parameters:
      beginTimeLimit - the starting time limit as an Instant, or null to indicate no limit.
    • getEndTimeLimit

      public Instant getEndTimeLimit()
      Retrieves the ending time limit for an activity or process.
      Returns:
      the end time limit as an Instant, or null if no limit is set.
    • setEndTimeLimit

      public void setEndTimeLimit(Instant endTimeLimit)
      Sets the ending time limit for an activity or process. This specifies the latest point in time by which the activity or process must be completed.
      Parameters:
      endTimeLimit - the ending time limit as an Instant, or null to indicate no limit.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object