|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.batch.core.job.DefaultJobParametersValidator
public class DefaultJobParametersValidator
Default implementation of JobParametersValidator
.
Constructor Summary | |
---|---|
DefaultJobParametersValidator()
Convenient default constructor for unconstrained validation. |
|
DefaultJobParametersValidator(String[] requiredKeys,
String[] optionalKeys)
Create a new validator with the required and optional job parameter keys provided. |
Method Summary | |
---|---|
void |
afterPropertiesSet()
Check that there are no overlaps between required and optional keys. |
void |
setOptionalKeys(String[] optionalKeys)
The keys that are optional in the parameters. |
void |
setRequiredKeys(String[] requiredKeys)
The keys that are required in the parameters. |
void |
validate(JobParameters parameters)
Check the parameters meet the specification provided. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultJobParametersValidator()
public DefaultJobParametersValidator(String[] requiredKeys, String[] optionalKeys)
requiredKeys
- the required keysoptionalKeys
- the optional keyssetOptionalKeys(String[])
,
setRequiredKeys(String[])
Method Detail |
---|
public void afterPropertiesSet() throws IllegalStateException
afterPropertiesSet
in interface InitializingBean
IllegalStateException
- if there is an overlappublic void validate(JobParameters parameters) throws JobParametersInvalidException
validate
in interface JobParametersValidator
parameters
- some JobParameters
JobParametersInvalidException
- if the parameters are not validJobParametersValidator.validate(JobParameters)
public final void setRequiredKeys(String[] requiredKeys)
requiredKeys
- the required key valuessetOptionalKeys(String[])
public final void setOptionalKeys(String[] optionalKeys)
optionalKeys
- the optional key valuessetRequiredKeys(String[])
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |