3.3 Business Policy
This topic provides information on Business Policy.
OBDX supports three types of validations
DTO field validations: These are the field level validations such as syntax check of the input. These validations are achieved by using field level annotations in request DTO. These validations are not available for extension. Below is the list of out of box annotations available
For more information on fields, refer to the field description table.
Table 3-3 Field Level Annotation
| Annotation | Description |
|---|---|
| This annotation is used to validate the respective field with email regular- expression. If the field doesn't satisfy the mentioned regular-expression then the respective error code is thrown | |
| @Mandatory | This annotation marks the fields as mandatory.
Once marked, if the field is null then respective error-code is
thrown
Eg. private Account accountId; |
| @Length | This annotation marks the lengths of the fields.
Once marked, if the validation is violated then the respective
error code is
thrown.
Eg. |
| @NonNegative | This annotation checks that the value is non-negative |
| @Regex | This annotation checks if the value matches regular expression provided |
System Constraints: System performs these checks mandatorily. It is not possible to override or bypass these checks.
Business Policies: These are typically the business validations required to be performed before executing business logic. OBDX framework allows customization developer to override business policies as per the requirement.
- Adding new business policy
This topic provides information on Adding new business policy. - Extending existing business policy
This topic provides information on Extending existing business policy.
Parent topic: Extensible Points in Service Tier