public class DefaultJobValidator extends java.lang.Object implements JobValidator
Custom JobValidators should typically extend from this.
| Modifier and Type | Field and Description |
|---|---|
static int |
MAX_EXTRAS_SIZE_BYTES
The maximum size, in bytes, that the provided extras bundle can be.
|
static int |
MAX_TAG_LENGTH
The maximum length of a tag, in characters (i.e.
|
| Constructor and Description |
|---|
DefaultJobValidator(android.content.Context context) |
| Modifier and Type | Method and Description |
|---|---|
java.util.List<java.lang.String> |
validate(JobParameters job)
Attempts to validate the provided
JobParameters. |
java.util.List<java.lang.String> |
validate(JobTrigger trigger)
Attempts to validate the provided Trigger.
|
java.util.List<java.lang.String> |
validate(RetryStrategy retryStrategy)
Attempts to validate the provided RetryStrategy.
|
public static final int MAX_TAG_LENGTH
public static final int MAX_EXTRAS_SIZE_BYTES
Parcel.dataSize().public java.util.List<java.lang.String> validate(JobParameters job)
JobParameters. If the JobParameters is valid, null
will be returned. If the JobParameters has errors, a list of those errors will be returned.validate in interface JobValidatorpublic java.util.List<java.lang.String> validate(JobTrigger trigger)
Note that a Trigger that passes validation here is not necessarily valid in all permutations of a JobParameters. For example, an Immediate is never valid for a recurring job.
validate in interface JobValidatorpublic java.util.List<java.lang.String> validate(RetryStrategy retryStrategy)
validate in interface JobValidator