|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.glassfish.jersey.server.model.ComponentModelValidator
public final class ComponentModelValidator
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 resource model components
to check validity of a resource model.
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 Summary | |
|---|---|
ComponentModelValidator(ServiceLocator locator)
|
|
| Method Summary | |
|---|---|
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. |
void |
visitChildResource(Resource resource)
Start visiting a single child resource model. |
void |
visitInvocable(Invocable invocable)
Visit a single resource method invocable model. |
void |
visitMethodHandler(MethodHandler methodHandler)
Visit a single resource method handler model. |
void |
visitResource(Resource resource)
Start visiting a single resource model. |
void |
visitResourceHandlerConstructor(HandlerConstructor constructor)
Process a resource method handler constructor. |
void |
visitResourceMethod(ResourceMethod method)
Visit a single resource method model. |
void |
visitResourceModel(ResourceModel resourceModel)
Process a resource model. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ComponentModelValidator(ServiceLocator locator)
| Method Detail |
|---|
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()
public void validate(ResourceModelComponent component)
component - resource model component.public void visitInvocable(Invocable invocable)
ResourceModelVisitor
visitInvocable in interface ResourceModelVisitorinvocable - resource method invocable model.public void visitResource(Resource resource)
ResourceModelVisitor
visitResource in interface ResourceModelVisitorresource - resource model.public void visitChildResource(Resource resource)
ResourceModelVisitor
visitChildResource in interface ResourceModelVisitorresource - child resource model.public void visitResourceMethod(ResourceMethod method)
ResourceModelVisitor
visitResourceMethod in interface ResourceModelVisitormethod - resource method model.public void visitMethodHandler(MethodHandler methodHandler)
ResourceModelVisitor
visitMethodHandler in interface ResourceModelVisitormethodHandler - resource method handler model.public void visitResourceHandlerConstructor(HandlerConstructor constructor)
ResourceModelVisitor
visitResourceHandlerConstructor in interface ResourceModelVisitorconstructor - resource method handler constructor.public void visitResourceModel(ResourceModel resourceModel)
ResourceModelVisitor
visitResourceModel in interface ResourceModelVisitorresourceModel - resource model.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||