DTO_ScheduledParameterDefinition
Class · Group: Schedulables
@JsonAccess(serializable='always' deserializable='always') global inherited sharing class DTO_ScheduledParameterDefinition extends DTO_JsonBaseExtends: DTO_JsonBase
A Data Transfer Object describing a single parameter definition supported by a scheduled job class. Used by classes implementing IF_Schedulable to declare their configurable parameters via getParameterDefinitions(), enabling dynamic form rendering in the scheduledJobEditor LWC component. Uses a fluent builder pattern.
Since: 1.0
Example:
DTO_ScheduledParameterDefinition.of('profileNames')
.required()
.withDescription('Pipe-separated profile names to target')See Also: IF_Schedulable, SCHED_Base, DTO_JsonBase
Properties
| Property | Description |
|---|---|
| global enum DataType | Enumeration of supported input data types for scheduled job parameters. |
Fields
| Field | Description |
|---|---|
| global String dataType | The input data type name determining which UI control to render. |
| global String defaultValue | The default value pre-populated when the parameter is not yet configured. |
| global String description | Help text describing the parameter's purpose and expected format. |
| global Boolean isRequired | Whether this parameter must be provided for the job to function. |
| global String label | The user-facing display label for the parameter. |
| global String name | The API name of the parameter (key used in DTO_NameValues). |
Methods
| Method | Description |
|---|---|
| global DTO_ScheduledParameterDefinition asBoolean() | Sets the data type to FLAG (boolean). |
| global DTO_ScheduledParameterDefinition asNumeric() | Sets the data type to NUMERIC (whole number input). |
| global static DTO_ScheduledParameterDefinition of(String name) | Creates a new TEXT parameter definition with a label derived from the API name. |
| global static DTO_ScheduledParameterDefinition of(String name, String label) | Creates a new TEXT parameter definition with an explicit label. |
| global DTO_ScheduledParameterDefinition required() | Marks this parameter as required. |
| global DTO_ScheduledParameterDefinition withDefault(String defaultValue) | Sets the default value for this parameter. |
| global DTO_ScheduledParameterDefinition withDescription(String description) | Sets the help text description for this parameter. |
Method Details
asBoolean
global DTO_ScheduledParameterDefinition asBoolean()Sets the data type to FLAG (boolean).
Returns: DTO_ScheduledParameterDefinition - This parameter instance for method chaining.
Since: 1.0
Example:
DTO_ScheduledParameterDefinition.of('allOrNothing', 'All or Nothing').asBoolean().withDefault('false')asNumeric
global DTO_ScheduledParameterDefinition asNumeric()Sets the data type to NUMERIC (whole number input).
Returns: DTO_ScheduledParameterDefinition - This parameter instance for method chaining.
Since: 1.0
Example:
DTO_ScheduledParameterDefinition.of('batchSize', 'Batch Size').asNumeric().withDefault('2000')of
global static DTO_ScheduledParameterDefinition of(String name)Creates a new TEXT parameter definition with a label derived from the API name. Optional by default. Use .withLabel() to override the label, .asNumeric() or .asBoolean() to change the data type.
Parameters:
name(String) - The API name of the parameter. Also used to generate the display label by splitting on camelCase boundaries (e.g., 'profileNames' becomes 'Profile Names').
Returns: DTO_ScheduledParameterDefinition - A new DTO_ScheduledParameterDefinition instance with TEXT data type.
Since: 1.0
Example:
DTO_ScheduledParameterDefinition.of('profileNames')
.required()
.withDescription('Pipe-separated profile names to target')of
global static DTO_ScheduledParameterDefinition of(String name, String label)Creates a new TEXT parameter definition with an explicit label. Optional by default. Use .asNumeric() or .asBoolean() to change the data type.
Parameters:
Returns: DTO_ScheduledParameterDefinition - A new DTO_ScheduledParameterDefinition instance with TEXT data type.
Since: 1.0
Example:
DTO_ScheduledParameterDefinition.of('minimumNumberOfDays', 'Minimum Age (Days)').asNumeric()required
global DTO_ScheduledParameterDefinition required()Marks this parameter as required.
Returns: DTO_ScheduledParameterDefinition - This parameter instance for method chaining.
Since: 1.0
Example:
DTO_ScheduledParameterDefinition.of('objectName', 'Object Name').required()withDefault
global DTO_ScheduledParameterDefinition withDefault(String defaultValue)Sets the default value for this parameter.
Parameters:
defaultValue(String) - The default value as a string.
Returns: DTO_ScheduledParameterDefinition - This parameter instance for method chaining.
Since: 1.0
Example:
DTO_ScheduledParameterDefinition.of('batchSize').asNumeric()
.withDefault('2000')withDescription
global DTO_ScheduledParameterDefinition withDescription(String description)Sets the help text description for this parameter.
Parameters:
description(String) - The description text to display as field-level help.
Returns: DTO_ScheduledParameterDefinition - This parameter instance for method chaining.
Since: 1.0
Example:
DTO_ScheduledParameterDefinition.of('profileNames', 'Profile Names')
.withDescription('Pipe-separated profile names to target')Field Details
dataType
@AuraEnabled global String dataTypeType: String
The input data type name determining which UI control to render. Stored as the DataType enum name string (TEXT, NUMERIC, FLAG) because the Aura transport serializes Apex enums as empty objects.
Since: 1.0
defaultValue
@AuraEnabled global String defaultValueType: String
The default value pre-populated when the parameter is not yet configured.
Since: 1.0
description
@AuraEnabled global String descriptionType: String
Help text describing the parameter's purpose and expected format.
Since: 1.0
isRequired
@AuraEnabled global Boolean isRequiredType: Boolean
Whether this parameter must be provided for the job to function.
Since: 1.0
label
@AuraEnabled global String labelType: String
The user-facing display label for the parameter.
Since: 1.0
name
@AuraEnabled global String nameType: String
The API name of the parameter (key used in DTO_NameValues).
Since: 1.0