|
Oracle Fusion Middleware Java API Reference for Oracle WebLogic Server 12c (12.1.3) Part Number E41849-02 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
public interface ExampleValidationBean
Defines a bean that illustrate the various validation options.
This bean declares the object-level validator
ExampleCustomValidator.validateExampleValidationBean(weblogic.descriptor.example.ExampleValidationBean) using a
BeanAnnotations.VALIDATOR annotation.
This validator will be called whenever on-demand validation is triggered.
| Method Summary | |
|---|---|
int |
getConstrainedInt()
Defines an int property whose value must be in the range [0, 10]. |
String |
getEnumeratedString()
Defines a String property whose value must be either "one", "two" or "three". |
int |
getMaximum()
Defines a property maximum that is constrained to never be less than the value of ExampleValidationBean.getMinimum() using a deferred validator. |
int |
getMinimum()
Defines a property minimum that is constrained to never exceed the value of ExampleValidationBean.getMaximum() using a deferred validator. |
String |
getNonEmptyString()
Defines a String property whose length must be greater than 0 |
int |
getNonNullString()
Defines an String property that may not be null |
String |
getURI()
Defines a String property whose value is validated by the custom validator method. |
void |
setConstrainedInt(int value)
See ExampleValidationBean.getConstrainedInt(). |
void |
setEnumeratedString(String value)
See ExampleValidationBean.getEnumeratedString(). |
void |
setMaximum(int value)
See ExampleValidationBean.getMaximum(). |
void |
setMinimum(int value)
See ExampleValidationBean.getMinimum(). |
void |
setNonEmptyString(String value)
See ExampleValidationBean.getNonEmptyString(). |
void |
setNonNullString(String value)
See ExampleValidationBean.getNonNullString(). |
void |
setURI(String value)
See ExampleValidationBean.getURI(); Uses the
PropertyAnnotations.VALIDATOR annotation to specify a custom
method to be called to validate the property value. |
| Method Detail |
|---|
int getConstrainedInt()
void setConstrainedInt(int value)
ExampleValidationBean.getConstrainedInt(). Uses PropertyAnnotations.LEGAL_MIN
and PropertyAnnotations.LEGAL_MAX annotations to specify the lower
and upper bounds.
value - int getNonNullString()
void setNonNullString(String value)
ExampleValidationBean.getNonNullString(). Uses the
PropertyAnnotations.NULLABLE annotation to indicate that this
String may not be null.
value -
String getNonEmptyString()
void setNonEmptyString(String value)
ExampleValidationBean.getNonEmptyString(). Uses the
PropertyAnnotations.LEGAL_ZERO_LENGTH annotation to indicate that
this String not have a zero length.
value -
String getEnumeratedString()
void setEnumeratedString(String value)
ExampleValidationBean.getEnumeratedString(). Uses the
PropertyAnnotations.ENUMERATION annotation to indicate that this
String may only be one of {"one", "two", "three"}.
value - String getURI()
void setURI(String value)
ExampleValidationBean.getURI(); Uses the
PropertyAnnotations.VALIDATOR annotation to specify a custom
method to be called to validate the property value. The method,
ExampleCustomValidator.validateURI(java.lang.String) will be called whenever this
setter is called.
value - int getMinimum()
ExampleValidationBean.getMaximum() using a deferred validator.
void setMinimum(int value)
ExampleValidationBean.getMinimum(). Uses the
PropertyAnnotations.DEFERRED_VALIDATOR annotation to specify a
custom method to be called whenever on-demand validation is triggered.
This method, ExampleCustomValidator.validateMinLessThanMax(weblogic.descriptor.example.ExampleValidationBean),
is free to consider multiple properties and even span beans in the
tree. Note that the same validator annotation appears on
ExampleValidationBean.setMaximum(int). In such cases, the validator will only be called
once during on-demand validation.
value - int getMaximum()
ExampleValidationBean.getMinimum() using a deferred validator.
void setMaximum(int value)
ExampleValidationBean.getMaximum(). Uses the
PropertyAnnotations.DEFERRED_VALIDATOR annotation to specify a
custom method to be called whenever on-demand validation is triggered.
See ExampleValidationBean.setMinimum(int) for more details.
value -
|
Copyright 1996, 2014, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Oracle Fusion Middleware Java API Reference for Oracle WebLogic Server 12c (12.1.3) Part Number E41849-02 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||