A resource model validator that checks the given resource model. This base resource model validator class implements the visitor pattern to traverse through all the {@link ResourceModelComponent resource model components}to check validity of a resource model.
This validator maintains a list of all the {@link ResourceModelIssue issues}found in the model. That way all the resource model components can be validated in a single call to the {@link #validate(ResourceModelComponent) validate(...)}method and collect all the validation issues from the model.
To check a single resource class, the the {@link Resource}{@code builder(...)} can be used to create a resource model.{@link ComponentModelValidator#validate(ResourceModelComponent)}method then populates the issue list, which could be then obtained by the {@link ComponentModelValidator#getIssueList()}. Unless the list is explicitly cleared, a subsequent calls to the validate method will add new items to the list, so that it can be used to build the issue list for more than one resource. To clear the list, the {@link ComponentModelValidator#cleanIssueList()} method should be called.
@author Jakub Podlesak (jakub.podlesak at oracle.com)
@author Marek Potociar (marek.potociar at oracle.com)