public class BasicValidator extends AbstractModelValidator
Performs a basic check on abstract resources. Validity check populates a list of potential issues with the given resource. The issues are divided into two categories: fatal and non-fatal issues. The former type prevents the resource to be deployed and makes the whole web application deployment fail.
To check a single resource class, one could
use the IntrospectionModeller.createResource(java.lang.Class)
method
to get an abstract resource model. AbstractModelValidator.validate(com.sun.jersey.api.model.AbstractModelComponent)
method then populates the issue list, which could be then obtained by the AbstractModelValidator.getIssueList()
.
Unless you explicitly clear the list, subsequent calls to the validate method will add new items to the list,
so that you can build the issue list for more than one resource. To clear the list, you may want to call
AbstractModelValidator.cleanIssueList()
method.
Constructor and Description |
---|
BasicValidator() |
Modifier and Type | Method and Description |
---|---|
void |
visitAbstractField(AbstractField field) |
void |
visitAbstractResource(AbstractResource resource) |
void |
visitAbstractResourceConstructor(AbstractResourceConstructor constructor) |
void |
visitAbstractResourceMethod(AbstractResourceMethod method) |
void |
visitAbstractSetterMethod(AbstractSetterMethod setterMethod) |
void |
visitAbstractSubResourceLocator(AbstractSubResourceLocator locator) |
void |
visitAbstractSubResourceMethod(AbstractSubResourceMethod method) |
cleanIssueList, fatalIssuesFound, getIssueList, validate
public void visitAbstractResource(AbstractResource resource)
public void visitAbstractResourceConstructor(AbstractResourceConstructor constructor)
public void visitAbstractField(AbstractField field)
public void visitAbstractSetterMethod(AbstractSetterMethod setterMethod)
public void visitAbstractResourceMethod(AbstractResourceMethod method)
public void visitAbstractSubResourceMethod(AbstractSubResourceMethod method)
public void visitAbstractSubResourceLocator(AbstractSubResourceLocator locator)
Copyright © 2013 Oracle Corporation. All rights reserved.