public final class ComponentModelValidator extends Object
resource model components
to check validity of a resource model.
This validator maintains a list of all the issues
found in the model. That way all the resource model components can be validated
in a single call to the validate(...)
method and collect all the validation issues from the model.
To check a single resource class, the the Resource
builder(...)
can be used to create a resource model.
validate(ResourceModelComponent)
method then populates the issue list, which could be then obtained by the
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 cleanIssueList()
method should be called.
Constructor and Description |
---|
ComponentModelValidator(org.glassfish.hk2.api.ServiceLocator locator) |
Modifier and Type | Method and Description |
---|---|
void |
cleanIssueList()
Removes all issues from the current issue list.
|
boolean |
fatalIssuesFound()
Convenience method to see if there were fatal issues found.
|
List<ResourceModelIssue> |
getIssueList()
Returns a list of issues found after
validate(org.glassfish.jersey.server.model.ResourceModelComponent)
method has been invoked. |
void |
validate(ResourceModelComponent component)
The validate method validates a component and adds possible
issues found to it's list.
|
public ComponentModelValidator(org.glassfish.hk2.api.ServiceLocator locator)
public List<ResourceModelIssue> getIssueList()
validate(org.glassfish.jersey.server.model.ResourceModelComponent)
method has been invoked.public boolean fatalIssuesFound()
true
if there are any fatal issues present in the current
issue list.public void cleanIssueList()
ComponentModelValidator
for another resource model.public void validate(ResourceModelComponent component)
component
- resource model component.Copyright © 2007-2015, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.