类 DefaultJobParametersValidator

    • 构造器概要

      构造器 
      构造器说明
      DefaultJobParametersValidator()
      Convenient default constructor for unconstrained validation.
      DefaultJobParametersValidator​(java.lang.String[] requiredKeys, java.lang.String[] optionalKeys)
      Create a new validator with the required and optional job parameter keys provided.
    • 方法概要

      所有方法 实例方法 具体方法 
      修饰符和类型方法说明
      voidafterPropertiesSet()
      Check that there are no overlaps between required and optional keys.
      voidsetOptionalKeys​(java.lang.String[] optionalKeys)
      The keys that are optional in the parameters.
      voidsetRequiredKeys​(java.lang.String[] requiredKeys)
      The keys that are required in the parameters.
      voidvalidate​(JobParameters parameters)
      Check the parameters meet the specification provided.
      • 从类继承的方法 java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 方法详细资料

      • afterPropertiesSet

        public void afterPropertiesSet()
                                throws java.lang.IllegalStateException
        Check that there are no overlaps between required and optional keys.
        指定者:
        afterPropertiesSet 在接口中 org.springframework.beans.factory.InitializingBean
        抛出:
        java.lang.IllegalStateException - if there is an overlap
      • setRequiredKeys

        public final void setRequiredKeys​(java.lang.String[] requiredKeys)
        The keys that are required in the parameters. The default is empty, meaning that all parameters are optional, unless optional keys are explicitly specified.
        参数:
        requiredKeys - the required key values
        另请参阅:
        setOptionalKeys(String[])
      • setOptionalKeys

        public final void setOptionalKeys​(java.lang.String[] optionalKeys)
        The keys that are optional in the parameters. If any keys are explicitly optional, then to be valid all other keys must be explicitly required. The default is empty, meaning that all parameters that are not required are optional.
        参数:
        optionalKeys - the optional key values
        另请参阅:
        setRequiredKeys(String[])