Class LimitConditions
java.lang.Object
dev.jcputney.elearning.parser.input.scorm2004.ims.ss.sequencing.LimitConditions
- All Implemented Interfaces:
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 Summary
ConstructorsConstructorDescriptionDefault constructor for the LimitConditions class.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. -
Method Summary
Modifier and TypeMethodDescriptionbooleanRetrieves the absolute duration limit for the activity.Retrieves the experienced duration limit for the activity.Retrieves the absolute duration limit for an attempt.Retrieves the experienced duration limit for an attempt.Retrieves the maximum number of attempts allowed.Retrieves the starting time limit for an activity or process.Retrieves the ending time limit for an activity or process.inthashCode()voidsetActivityAbsoluteDurationLimit(Duration activityAbsoluteDurationLimit) Sets the absolute duration limit for the activity.voidsetActivityExperiencedDurationLimit(Duration activityExperiencedDurationLimit) Sets the experienced duration limit for the activity.voidsetAttemptAbsoluteDurationLimit(Duration attemptAbsoluteDurationLimit) Sets the absolute duration limit for a single attempt in the activity or process.voidsetAttemptExperiencedDurationLimit(Duration attemptExperiencedDurationLimit) Sets the experienced duration limit for an attempt.voidsetAttemptLimit(Integer attemptLimit) Sets the maximum number of attempts allowed.voidsetBeginTimeLimit(Instant beginTimeLimit) Sets the starting time limit for an activity or process.voidsetEndTimeLimit(Instant endTimeLimit) Sets the ending time limit for an activity or process.
-
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 limitattemptAbsoluteDurationLimit- the absolute duration limit for an attempt as aDuration, or null if not setattemptExperiencedDurationLimit- the experienced duration limit for an attempt as aDuration, or null if not setactivityAbsoluteDurationLimit- the absolute duration limit for the activity as aDuration, or null if not setactivityExperiencedDurationLimit- the experienced duration limit for the activity as aDuration, or null if not setbeginTimeLimit- the start time limit as anInstant, or null to indicate no limitendTimeLimit- the end time limit as anInstant, 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
Retrieves the maximum number of attempts allowed.- Returns:
- the maximum number of attempts as an Integer, or null if not set.
-
setAttemptLimit
Sets the maximum number of attempts allowed.- Parameters:
attemptLimit- the maximum number of attempts as an Integer, or null to indicate no limit.
-
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
Sets the absolute duration limit for a single attempt in the activity or process.- Parameters:
attemptAbsoluteDurationLimit- the absolute duration limit for an attempt as aDuration, or null to indicate no limit is set.
-
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
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 aDuration, or null to indicate that no such limit is set.
-
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
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 aDuration, or null to indicate no limit is set.
-
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
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 aDuration, or null to indicate no such limit is set.
-
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
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 anInstant, or null to indicate no limit.
-
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
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 anInstant, or null to indicate no limit.
-
equals
-
hashCode
public int hashCode()
-